Commit 971f9a1f authored by Vijay Krishnavanshi's avatar Vijay Krishnavanshi Committed by Pali Rohár

ported occurances of KUrl from Statistics Plugin

parent 8f128012
......@@ -56,8 +56,7 @@ StatisticsDialog::StatisticsDialog (StatisticsContact *contact, StatisticsDB *db
KHBox *generalHBox = new KHBox(this);
generalHTMLPart = new KHTMLPart(generalHBox);
connect(generalHTMLPart->browserExtension(), SIGNAL(openUrlRequestDelayed(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments)),
this, SLOT(slotOpenURLRequest(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments)));
connect(generalHTMLPart->browserExtension(), &KParts::BrowserExtension::openUrlRequestDelayed, this, &StatisticsDialog::slotOpenURLRequest);
generalHTMLPart->setJScriptEnabled(false);
generalHTMLPart->setJavaEnabled(false);
generalHTMLPart->setMetaRefreshEnabled(false);
......@@ -108,13 +107,13 @@ StatisticsDialog::~StatisticsDialog()
}
// We only generate pages when the user clicks on a link
void StatisticsDialog::slotOpenURLRequest(const KUrl &url, const KParts::OpenUrlArguments &, const KParts::BrowserArguments &)
void StatisticsDialog::slotOpenURLRequest(const QUrl &url, const KParts::OpenUrlArguments &, const KParts::BrowserArguments &)
{
if (url.protocol() == QLatin1String("main")) {
if (url.scheme() == QLatin1String("main")) {
generatePageGeneral();
} else if (url.protocol() == QLatin1String("dayofweek")) {
} else if (url.scheme() == QLatin1String("dayofweek")) {
generatePageForDay(url.path().toInt());
} else if (url.protocol() == QLatin1String("monthofyear")) {
} else if (url.scheme() == QLatin1String("monthofyear")) {
generatePageForMonth(url.path().toInt());
}
}
......
......@@ -20,7 +20,7 @@
#include <qwidget.h>
#include <kdialog.h>
#include <kurl.h>
#include <QUrl>
#include "kopetemetacontact.h"
class QStringList;
......@@ -89,7 +89,7 @@ private Q_SLOTS:
* We manage the openUrlRequestDelayed signal from the generalHTMLPart->browserExtension() in order to
* generate requested pages on the fly.
*/
void slotOpenURLRequest(const KUrl &url, const KParts::OpenUrlArguments &, const KParts::BrowserArguments &);
void slotOpenURLRequest(const QUrl &url, const KParts::OpenUrlArguments &, const KParts::BrowserArguments &);
/**
* Color the calendar cells to show statuses across entire months
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment