From 2365f2c6573e60686beaf5e80727330d447efd9d Mon Sep 17 00:00:00 2001 From: David Faure Date: Sun, 11 Mar 2012 10:28:36 +0100 Subject: [PATCH] Some KUrl-QUrl porting. --- containment.cpp | 2 +- private/dataengineconsumer.cpp | 15 ++++++------- private/dataengineconsumer_p.h | 2 +- private/remotedataengine.cpp | 11 +++++----- private/remotedataengine_p.h | 6 +++--- private/remoteservice.cpp | 37 ++++++++++++++++++++------------- private/remoteservice_p.h | 9 ++++---- remote/accessappletjob.cpp | 8 +++---- remote/accessappletjob.h | 6 +++--- remote/accessmanager.cpp | 14 ++++++------- remote/accessmanager.h | 8 +++---- remote/authorizationinterface.h | 1 - remote/authorizationmanager.h | 1 - remote/authorizationrule.h | 1 - remote/clientpinrequest.h | 1 - remote/serviceaccessjob.cpp | 6 +++--- remote/serviceaccessjob.h | 6 ++---- remote/signing.cpp | 6 +++--- remote/signing.h | 2 +- runnercontext.cpp | 8 +++---- scripting/wallpaperscript.cpp | 2 +- scripting/wallpaperscript.h | 2 +- service.cpp | 2 +- service.h | 3 ++- wallpaper.cpp | 2 +- wallpaper.h | 2 +- 26 files changed, 84 insertions(+), 79 deletions(-) diff --git a/containment.cpp b/containment.cpp index ce5558f15..cb88f546b 100644 --- a/containment.cpp +++ b/containment.cpp @@ -1594,7 +1594,7 @@ void ContainmentPrivate::mimeTypeRetrieved(KIO::Job *job, const QString &mimeTyp if (wallpaper) { //kDebug() << "Wallpaper dropped:" << tjob->url(); - wallpaper->addUrls(KUrl::List() << tjob->url()); + wallpaper->addUrls(QList() << tjob->url()); } } else { addApplet(actionsToApplets[choice], args, QRectF(posi, QSize())); diff --git a/private/dataengineconsumer.cpp b/private/dataengineconsumer.cpp index d078a0044..c22f12608 100644 --- a/private/dataengineconsumer.cpp +++ b/private/dataengineconsumer.cpp @@ -28,6 +28,7 @@ #include "plasma/dataenginemanager.h" #include "plasma/private/remotedataengine_p.h" #include +#include namespace Plasma { @@ -57,12 +58,12 @@ void ServiceMonitor::slotJobFinished(Plasma::ServiceJob *job) kDebug() << "engine does not exist yet!"; #endif } else { - KUrl engineLocation(location); + QUrlPathInfo engineLocation(location); engineLocation.setFileName(job->result().toString()); #ifndef NDEBUG - kDebug() << "setting location : " << engineLocation.prettyUrl(); + kDebug() << "setting location : " << engineLocation.url(); #endif - m_consumer->m_remoteEngines[pair]->setLocation(engineLocation); + m_consumer->m_remoteEngines[pair]->setLocation(engineLocation.url()); } } @@ -127,9 +128,9 @@ DataEngine *DataEngineConsumer::dataEngine(const QString &name) return engine; } -DataEngine *DataEngineConsumer::remoteDataEngine(const KUrl &location, const QString &name) +DataEngine *DataEngineConsumer::remoteDataEngine(const QUrl &location, const QString &name) { - QPair pair(location.prettyUrl(), name); + QPair pair(location.toString(), name); #ifndef NDEBUG kDebug() << "pair = " << pair; #endif @@ -143,10 +144,10 @@ DataEngine *DataEngineConsumer::remoteDataEngine(const KUrl &location, const QSt #ifndef NDEBUG kDebug() << "new remote dataengine at " << location; #endif - RemoteDataEngine *engine = new RemoteDataEngine(KUrl()); + RemoteDataEngine *engine = new RemoteDataEngine(QUrl()); m_remoteEngines[pair] = engine; Service *plasmoidService = Service::access(location); - plasmoidService->setDestination(location.prettyUrl()); + plasmoidService->setDestination(location.toString()); m_engineNameForService[plasmoidService] = name; #ifndef NDEBUG kDebug() << "name = " << name; diff --git a/private/dataengineconsumer_p.h b/private/dataengineconsumer_p.h index d3c7808c3..e7bfa7b2d 100644 --- a/private/dataengineconsumer_p.h +++ b/private/dataengineconsumer_p.h @@ -56,7 +56,7 @@ public: DataEngineConsumer(); ~DataEngineConsumer(); DataEngine *dataEngine(const QString &name); - DataEngine *remoteDataEngine(const KUrl &location, const QString &name); + DataEngine *remoteDataEngine(const QUrl &location, const QString &name); private: QSet m_loadedEngines; diff --git a/private/remotedataengine.cpp b/private/remotedataengine.cpp index 43a3a92c9..7c2b08dc6 100644 --- a/private/remotedataengine.cpp +++ b/private/remotedataengine.cpp @@ -28,12 +28,13 @@ #include #include -#include +#include +#include namespace Plasma { -RemoteDataEngine::RemoteDataEngine(KUrl location, QObject* parent, const QVariantList& args) +RemoteDataEngine::RemoteDataEngine(const QUrl &location, QObject* parent, const QVariantList& args) : Plasma::DataEngine(parent, args), m_service(0), m_location(location), @@ -52,7 +53,7 @@ RemoteDataEngine::~RemoteDataEngine() { } -void RemoteDataEngine::setLocation(KUrl location) +void RemoteDataEngine::setLocation(const QUrl &location) { m_location = location; setMinimumPollingInterval(1000); @@ -186,11 +187,11 @@ void RemoteDataEngine::remoteCallFinished(Plasma::ServiceJob *job) kDebug() << "setting serviceForSource for " << source; #endif QString resource = job->result().toString(); - KUrl loc = m_location; + QUrlPathInfo loc(m_location); loc.setFileName(resource); RemoteService *rs = m_serviceForSource.value(source); if (rs) { - rs->setLocation(loc); + rs->setLocation(loc.url()); } else { #ifndef NDEBUG kDebug() << "no such service?" << source; diff --git a/private/remotedataengine_p.h b/private/remotedataengine_p.h index 0f1ac7242..ea0fc7620 100644 --- a/private/remotedataengine_p.h +++ b/private/remotedataengine_p.h @@ -36,10 +36,10 @@ class RemoteDataEngine : public Plasma::DataEngine Q_OBJECT public: - RemoteDataEngine(KUrl location, QObject* parent = 0, const QVariantList &args = QVariantList()); + RemoteDataEngine(const QUrl &location, QObject* parent = 0, const QVariantList &args = QVariantList()); ~RemoteDataEngine(); Plasma::Service* serviceForSource(const QString& source); - void setLocation(KUrl location); + void setLocation(const QUrl &location); protected: QStringList sources() const; @@ -59,7 +59,7 @@ private: QHash m_serviceForSource; QHash m_pendingServices; QStringList m_pendingSources; - KUrl m_location; + QUrl m_location; QString m_uuid; }; diff --git a/private/remoteservice.cpp b/private/remoteservice.cpp index 7f5f5e59d..210f3d574 100644 --- a/private/remoteservice.cpp +++ b/private/remoteservice.cpp @@ -42,9 +42,10 @@ #include #include -#include +#include +#include -namespace Plasma +namespace Plasma { RemoteService::RemoteService(QObject* parent) @@ -55,7 +56,7 @@ RemoteService::RemoteService(QObject* parent) { } -RemoteService::RemoteService(QObject* parent, KUrl location) +RemoteService::RemoteService(QObject* parent, const QUrl &location) : Service(parent), m_location(location), m_client(0), @@ -83,10 +84,16 @@ void RemoteService::slotReadyForRemoteAccess() setLocation(m_location); } -void RemoteService::setLocation(const KUrl &location) +static QByteArray resourcePathFromUrl(const QUrl& location) +{ + QUrlPathInfo pi(location); + return pi.path(QUrlPathInfo::StripTrailingSlash).remove(0, 1).toUtf8(); +} + +void RemoteService::setLocation(const QUrl &location) { #ifndef NDEBUG - kDebug() << "Setting RemoteService location to " << location.prettyUrl(); + kDebug() << "Setting RemoteService location to " << location; #endif m_uuid = QUuid::createUuid().toString(); @@ -113,8 +120,7 @@ void RemoteService::setLocation(const KUrl &location) QDataStream stream(&identityByteArray, QIODevice::WriteOnly); stream << identity.toPublicCredentials(); - Jolie::Message getOpDesc(location.path(KUrl::RemoveTrailingSlash).remove(0, 1).toUtf8(), - "startConnection"); + Jolie::Message getOpDesc(resourcePathFromUrl(location), "startConnection"); Jolie::Value data; data.children(JolieMessage::Field::IDENTITY) << Jolie::Value(identityByteArray); data.children(JolieMessage::Field::UUID) << Jolie::Value(m_uuid.toAscii()); @@ -128,7 +134,11 @@ void RemoteService::setLocation(const KUrl &location) QString RemoteService::location() const { - return m_location.prettyUrl(); +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + return m_location.toString(); +#else + return m_location.toDisplayString(); +#endif } bool RemoteService::isReady() const @@ -151,8 +161,7 @@ void RemoteService::callCompleted(Jolie::PendingCallWatcher *watcher) kDebug() << "Started connection: fetching .operations"; #endif m_token = JolieMessage::field(JolieMessage::Field::TOKEN, response); - Jolie::Message getOpDesc(m_location.path(KUrl::RemoveTrailingSlash).remove(0, 1).toUtf8(), - "getOperations"); + Jolie::Message getOpDesc(resourcePathFromUrl(m_location), "getOperations"); //TODO: async Jolie::PendingCall pendingReply = m_client->asyncCall(signMessage(getOpDesc)); Jolie::PendingCallWatcher *watcher = new Jolie::PendingCallWatcher(pendingReply, this); @@ -174,7 +183,7 @@ void RemoteService::callCompleted(Jolie::PendingCallWatcher *watcher) m_operationsScheme = JolieMessage::field(JolieMessage::Field::OPERATIONSDESCRIPTION, response); m_token = JolieMessage::field(JolieMessage::Field::TOKEN, response); m_ready = true; - setName(m_location.prettyUrl()); + setName(location()); //if there's stuff in the queue, let it continue. slotFinished(); } @@ -212,8 +221,7 @@ void RemoteService::callCompleted(Jolie::PendingCallWatcher *watcher) void RemoteService::slotGotPin(Plasma::ClientPinRequest *request) { - Jolie::Message getOpDesc(m_location.path(KUrl::RemoveTrailingSlash).remove(0, 1).toUtf8(), - "getOperations"); + Jolie::Message getOpDesc(resourcePathFromUrl(m_location), "getOperations"); Jolie::Value value; value.children(JolieMessage::Field::PARAMETERS) << Jolie::Value(QByteArray()); if (!request->pin().isEmpty()) { @@ -243,8 +251,7 @@ void RemoteService::slotUpdateEnabledOperations() //TODO: maybe push the get enabled operations also on the queue? if (!m_busy) { m_busy = true; - Jolie::Message getOpDesc(m_location.path(KUrl::RemoveTrailingSlash).remove(0, 1).toUtf8(), - "getEnabledOperations"); + Jolie::Message getOpDesc(resourcePathFromUrl(m_location), "getEnabledOperations"); Jolie::PendingCall pendingReply = m_client->asyncCall(signMessage(getOpDesc)); Jolie::PendingCallWatcher *watcher = new Jolie::PendingCallWatcher(pendingReply, this); diff --git a/private/remoteservice_p.h b/private/remoteservice_p.h index 3a26150d3..a12c02570 100644 --- a/private/remoteservice_p.h +++ b/private/remoteservice_p.h @@ -21,6 +21,7 @@ #include #include +#include #include "../service.h" @@ -30,7 +31,7 @@ namespace Jolie class PendingCallWatcher; } -namespace Plasma +namespace Plasma { class ClientPinRequest; @@ -42,10 +43,10 @@ class RemoteService : public Plasma::Service public: RemoteService(QObject* parent); - RemoteService(QObject* parent, KUrl location); + RemoteService(QObject* parent, const QUrl &location); ~RemoteService(); - void setLocation(const KUrl &location); + void setLocation(const QUrl &location); QString location() const; bool isReady() const; @@ -67,7 +68,7 @@ class RemoteService : public Plasma::Service Jolie::Message signMessage(const Jolie::Message &message) const; private: - KUrl m_location; + QUrl m_location; Jolie::Client *m_client; QByteArray m_token; QByteArray m_operationsScheme; diff --git a/remote/accessappletjob.cpp b/remote/accessappletjob.cpp index 047c0bcbd..461435b78 100644 --- a/remote/accessappletjob.cpp +++ b/remote/accessappletjob.cpp @@ -43,7 +43,7 @@ namespace Plasma class AccessAppletJobPrivate { public: - AccessAppletJobPrivate(const KUrl &location, AccessAppletJob *owner) + AccessAppletJobPrivate(const QUrl &location, AccessAppletJob *owner) : q(owner), location(location), applet(0) @@ -166,11 +166,11 @@ public: } AccessAppletJob *q; - KUrl location; + QUrl location; Applet *applet; }; -AccessAppletJob::AccessAppletJob(const KUrl &location, QObject *parent) +AccessAppletJob::AccessAppletJob(const QUrl &location, QObject *parent) : KJob(parent), d(new AccessAppletJobPrivate(location, this)) { @@ -191,7 +191,7 @@ void AccessAppletJob::start() { #ifdef ENABLE_REMOTE_WIDGETS #ifndef NDEBUG - kDebug() << "fetching a plasmoid from location = " << d->location.prettyUrl(); + kDebug() << "fetching a plasmoid from location = " << d->location; #endif Service *service = Service::access(d->location); connect(service, SIGNAL(serviceReady(Plasma::Service*)), diff --git a/remote/accessappletjob.h b/remote/accessappletjob.h index 0cd294b5b..885f5201e 100644 --- a/remote/accessappletjob.h +++ b/remote/accessappletjob.h @@ -24,7 +24,7 @@ #include -class KUrl; +class QUrl; namespace Plasma { @@ -55,7 +55,7 @@ protected: * @param location the location of the service * @param parent the parent object for this service */ - AccessAppletJob(const KUrl &location, QObject *parent = 0); + AccessAppletJob(const QUrl &location, QObject *parent = 0); void start(); @@ -68,7 +68,7 @@ private: Q_PRIVATE_SLOT(d, void slotTimeout()) AccessAppletJobPrivate * const d; - + friend class AccessManager; friend class AccessManagerPrivate; friend class AccessAppletJobPrivate; diff --git a/remote/accessmanager.cpp b/remote/accessmanager.cpp index 1ca3c195d..06e3a37d1 100644 --- a/remote/accessmanager.cpp +++ b/remote/accessmanager.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include @@ -48,7 +48,7 @@ public: QString name; QString description; QString icon; - KUrl url; + QUrl url; }; RemoteObjectDescription::RemoteObjectDescription() @@ -79,12 +79,12 @@ QString RemoteObjectDescription::name() const } -void RemoteObjectDescription::setUrl(const KUrl &url) +void RemoteObjectDescription::setUrl(const QUrl &url) { d->url = url; } -KUrl RemoteObjectDescription::url() const +QUrl RemoteObjectDescription::url() const { return d->url; } @@ -136,11 +136,11 @@ AccessManager::~AccessManager() delete d; } -AccessAppletJob *AccessManager::accessRemoteApplet(const KUrl &location) const +AccessAppletJob *AccessManager::accessRemoteApplet(const QUrl &location) const { AuthorizationManager::self()->d->prepareForServiceAccess(); - KUrl resolvedLocation; + QUrl resolvedLocation; if (location.scheme() == "plasma+zeroconf") { if (d->zeroconfServices.contains(location.host())) { resolvedLocation = d->services[location.host()].url(); @@ -222,7 +222,7 @@ void AccessManagerPrivate::slotAddService(DNSSD::RemoteService::Ptr service) kDebug() << "result for resolve = " << ip; #endif - KUrl url(QString("plasma://%1:%2/%3").arg(ip) + QUrl url(QString("plasma://%1:%2/%3").arg(ip) .arg(service->port()) .arg(service->serviceName())); diff --git a/remote/accessmanager.h b/remote/accessmanager.h index 8a9f0202b..51926abc8 100644 --- a/remote/accessmanager.h +++ b/remote/accessmanager.h @@ -30,7 +30,7 @@ #include class QString; -class KUrl; +class QUrl; namespace Plasma { @@ -59,8 +59,8 @@ public: void setName(const QString &name); QString name() const; - void setUrl(const KUrl &url); - KUrl url() const; + void setUrl(const QUrl &url); + QUrl url() const; void setDescription(const QString &description); QString description() const; @@ -91,7 +91,7 @@ class PLASMA_EXPORT AccessManager : public QObject * @returns a job that can be used to track when a remote plasmoid is ready for use, and to * obtain the applet when the package is sent over. */ - AccessAppletJob *accessRemoteApplet(const KUrl &location) const; + AccessAppletJob *accessRemoteApplet(const QUrl &location) const; /** * @returns a list of applets that are announced on the network through zeroconf. Use the diff --git a/remote/authorizationinterface.h b/remote/authorizationinterface.h index 5a30df185..0ccf5b6e8 100644 --- a/remote/authorizationinterface.h +++ b/remote/authorizationinterface.h @@ -25,7 +25,6 @@ #include class QString; -class KUrl; namespace Plasma { diff --git a/remote/authorizationmanager.h b/remote/authorizationmanager.h index 1402f84c7..2661568ee 100644 --- a/remote/authorizationmanager.h +++ b/remote/authorizationmanager.h @@ -25,7 +25,6 @@ #include class QString; -class KUrl; namespace Plasma { diff --git a/remote/authorizationrule.h b/remote/authorizationrule.h index 018dbe22d..7fe391e36 100644 --- a/remote/authorizationrule.h +++ b/remote/authorizationrule.h @@ -25,7 +25,6 @@ #include class QString; -class KUrl; namespace QCA { diff --git a/remote/clientpinrequest.h b/remote/clientpinrequest.h index e3a16f314..9d37d7cc2 100644 --- a/remote/clientpinrequest.h +++ b/remote/clientpinrequest.h @@ -25,7 +25,6 @@ #include class QString; -class KUrl; namespace Plasma { diff --git a/remote/serviceaccessjob.cpp b/remote/serviceaccessjob.cpp index 18c25ea74..33d512edf 100644 --- a/remote/serviceaccessjob.cpp +++ b/remote/serviceaccessjob.cpp @@ -26,7 +26,7 @@ namespace Plasma class ServiceAccessJobPrivate { public: - ServiceAccessJobPrivate(ServiceAccessJob *owner, KUrl location) + ServiceAccessJobPrivate(ServiceAccessJob *owner, const QUrl& location) : q(owner), service(0), location(location) @@ -45,10 +45,10 @@ public: ServiceAccessJob *q; Service *service; - KUrl location; + QUrl location; }; -ServiceAccessJob::ServiceAccessJob(KUrl location, QObject *parent) +ServiceAccessJob::ServiceAccessJob(const QUrl& location, QObject *parent) : KJob(parent), d(new ServiceAccessJobPrivate(this, location)) { diff --git a/remote/serviceaccessjob.h b/remote/serviceaccessjob.h index 4216313f6..a081ec6ec 100644 --- a/remote/serviceaccessjob.h +++ b/remote/serviceaccessjob.h @@ -25,8 +25,6 @@ #include -class KUrl; - namespace Plasma { @@ -55,7 +53,7 @@ protected: * @param location the location of the service * @param parent the parent object for this service */ - ServiceAccessJob(KUrl location, QObject *parent = 0); + ServiceAccessJob(const QUrl& location, QObject *parent = 0); void start(); @@ -64,7 +62,7 @@ private: Q_PRIVATE_SLOT(d, void slotServiceReady()) ServiceAccessJobPrivate * const d; - + friend class AccessManager; friend class AccessManagerPrivate; friend class ServiceAccessJobPrivate; diff --git a/remote/signing.cpp b/remote/signing.cpp index 56e940c9a..4c85049ef 100644 --- a/remote/signing.cpp +++ b/remote/signing.cpp @@ -551,13 +551,13 @@ QString Signing::signerOf(const Package &package) const return d->verifySignature(contents, QString()); } -QString Signing::signerOf(const KUrl &package, const KUrl &signature) const +QString Signing::signerOf(const QUrl &package, const QUrl &signature) const { #ifndef NDEBUG - kDebug() << "Checking existence of " << package.pathOrUrl(); + kDebug() << "Checking existence of " << package; #endif #ifndef NDEBUG - kDebug() << "Checking existence of " << signature.pathOrUrl(); + kDebug() << "Checking existence of " << signature; #endif if (!package.isLocalFile() || (!signature.isEmpty() && !signature.isLocalFile())) { diff --git a/remote/signing.h b/remote/signing.h index b9f968de0..a3fa17072 100644 --- a/remote/signing.h +++ b/remote/signing.h @@ -146,7 +146,7 @@ public: * On success, this information can then be used with trustLevelOf and/or * descriptiveString to get more information on the key. */ - QString signerOf(const KUrl &package, const KUrl &signature = KUrl()) const ; + QString signerOf(const QUrl &package, const QUrl &signature = QUrl()) const ; /** * @return the QString path of the keystore being used. diff --git a/runnercontext.cpp b/runnercontext.cpp index a41986162..02a4b8bc1 100644 --- a/runnercontext.cpp +++ b/runnercontext.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include "abstractrunner.h" @@ -198,14 +198,14 @@ class RunnerContextPrivate : public QSharedData type = (space > 0) ? RunnerContext::ShellCommand : RunnerContext::Executable; } else { - KUrl url(term); + QUrl url = QUrl::fromUserInput(term); // check for a normal URL first //kDebug() << url << KProtocolInfo::protocolClass(url.scheme()) << url.hasHost() << // url.host() << url.isLocalFile() << path << path.indexOf('/'); const bool hasProtocol = !url.scheme().isEmpty(); const bool isLocalProtocol = KProtocolInfo::protocolClass(url.scheme()) == ":local"; - if (hasProtocol && - ((!isLocalProtocol && url.hasHost()) || + if (hasProtocol && + ((!isLocalProtocol && !url.host().isEmpty()) || (isLocalProtocol && url.scheme() != "file"))) { // we either have a network protocol with a host, so we can show matches for it // or we have a non-file url that may be local so a host isn't required diff --git a/scripting/wallpaperscript.cpp b/scripting/wallpaperscript.cpp index 4b1dd2a77..0ea94b55a 100644 --- a/scripting/wallpaperscript.cpp +++ b/scripting/wallpaperscript.cpp @@ -114,7 +114,7 @@ void WallpaperScript::wheelEvent(QGraphicsSceneWheelEvent *event) Q_UNUSED(event) } -void WallpaperScript::addUrls(const KUrl::List urls) +void WallpaperScript::addUrls(const QList & urls) { Q_UNUSED(urls) } diff --git a/scripting/wallpaperscript.h b/scripting/wallpaperscript.h index b56989185..7e575a1f1 100644 --- a/scripting/wallpaperscript.h +++ b/scripting/wallpaperscript.h @@ -139,7 +139,7 @@ public: /** * Adds urls (e.g. from a drop) */ - virtual void addUrls(const KUrl::List urls); + virtual void addUrls(const QList& urls); protected: /** diff --git a/service.cpp b/service.cpp index 9ddecf2dc..712f98aa6 100644 --- a/service.cpp +++ b/service.cpp @@ -64,7 +64,7 @@ Service::~Service() delete d; } -Service *Service::access(const KUrl &url, QObject *parent) +Service *Service::access(const QUrl &url, QObject *parent) { return new RemoteService(parent, url); } diff --git a/service.h b/service.h index 0be82f134..b76f60fb1 100644 --- a/service.h +++ b/service.h @@ -32,6 +32,7 @@ class QGraphicsWidget; class QIODevice; class QWidget; +class QUrl; namespace Plasma { @@ -105,7 +106,7 @@ public: * Used to access a service from an url. Always check for the signal serviceReady() that fires * when this service is actually ready for use. */ - static Service *access(const KUrl &url, QObject *parent = 0); + static Service *access(const QUrl &url, QObject *parent = 0); /** * Sets the destination for this Service to operate on diff --git a/wallpaper.cpp b/wallpaper.cpp index 3317e1002..9ad392090 100644 --- a/wallpaper.cpp +++ b/wallpaper.cpp @@ -124,7 +124,7 @@ Wallpaper::~Wallpaper() delete d; } -void Wallpaper::addUrls(const KUrl::List &urls) +void Wallpaper::addUrls(const QList &urls) { if (d->script) { d->script->addUrls(urls); diff --git a/wallpaper.h b/wallpaper.h index 9d54f318d..655ee6080 100644 --- a/wallpaper.h +++ b/wallpaper.h @@ -202,7 +202,7 @@ class PLASMA_EXPORT Wallpaper : public QObject * This is triggered by events in the user interface such as * drag and drop of files. */ - virtual void addUrls(const KUrl::List &urls); + virtual void addUrls(const QList &urls); /** * This method is called when the wallpaper should be painted.