diff --git a/src/plasma/CMakeLists.txt b/src/plasma/CMakeLists.txt index 3ded583a7..4cbdb1388 100644 --- a/src/plasma/CMakeLists.txt +++ b/src/plasma/CMakeLists.txt @@ -137,9 +137,18 @@ kconfig_add_kcfg_files(plasma_LIB_SRCS data/kconfigxt/libplasma-theme-global.kcf kde4_add_library(plasma SHARED ${plasma_LIB_SRCS}) -target_link_libraries(plasma ${QT_QTUITOOLS_LIBRARY} - ${QT_QTNETWORK_LIBRARY} ${QT_QTSQL_LIBRARY} - ${KDE4_KDEUI_LIBS} ${ThreadWeaver_LIBRARIES} ${KAuth_LIBRARIES} ${KWindowSystem_LIBRARIES} ${PLASMA_EXTRA_LIBS} ki18n ${kde4support_LIBRARY}) +target_link_libraries(plasma + ${QT_QTUITOOLS_LIBRARY} + ${QT_QTNETWORK_LIBRARY} ${QT_QTSQL_LIBRARY} + ${Qt5Quick_LIBRARIES} + ${KDE4_KDEUI_LIBS} + ${ThreadWeaver_LIBRARIES} + ${KAuth_LIBRARIES} + ${KWindowSystem_LIBRARIES} + ${PLASMA_EXTRA_LIBS} + ki18n + ${kde4support_LIBRARY} +) #FIXME gpgme++ is in kdepimlibs, neeeds to be elsewhere target_link_libraries(plasma kdeclarative ${KArchive_LIBRARIES}) diff --git a/src/plasma/private/service_p.h b/src/plasma/private/service_p.h index 7583e2993..4f3cb8247 100644 --- a/src/plasma/private/service_p.h +++ b/src/plasma/private/service_p.h @@ -103,7 +103,7 @@ public: KConfig *dummyConfig; DNSSD::PublicService *publicService; QMultiHash associatedWidgets; - QMultiHash associatedItems; + QMultiHash associatedItems; QSet disabledOperations; }; diff --git a/src/plasma/service.cpp b/src/plasma/service.cpp index c77b38c95..9821abf9c 100644 --- a/src/plasma/service.cpp +++ b/src/plasma/service.cpp @@ -23,8 +23,8 @@ #include "config-plasma.h" #include -#include #include +#include #include #include @@ -68,7 +68,7 @@ void ServicePrivate::associatedWidgetDestroyed(QObject *obj) void ServicePrivate::associatedItemDestroyed(QObject *obj) { - associatedItems.remove(static_cast(obj)); + associatedItems.remove(static_cast(obj)); } KConfigGroup ServicePrivate::dummyGroup() @@ -172,7 +172,7 @@ ServiceJob *Service::startOperationCall(const KConfigGroup &description, QObject return job; } -void Service::associateItem(QGraphicsObject *widget, const QString &operation) +void Service::associateItem(QQuickItem *widget, const QString &operation) { if (!widget) { return; @@ -186,7 +186,7 @@ void Service::associateItem(QGraphicsObject *widget, const QString &operation) widget->setEnabled(!d->disabledOperations.contains(operation)); } -void Service::disassociateItem(QGraphicsObject *widget) +void Service::disassociateItem(QQuickItem *widget) { if (!widget) { return; @@ -241,7 +241,7 @@ void Service::setOperationEnabled(const QString &operation, bool enable) } { - QHashIterator it(d->associatedItems); + QHashIterator it(d->associatedItems); while (it.hasNext()) { it.next(); if (it.value() == operation) { @@ -278,7 +278,7 @@ void Service::setOperationsScheme(QIODevice *xml) } { - QHashIterator it(d->associatedItems); + QHashIterator it(d->associatedItems); while (it.hasNext()) { it.next(); it.key()->setEnabled(d->config->hasGroup(it.value())); diff --git a/src/plasma/service.h b/src/plasma/service.h index c4d27bc12..a068cfdba 100644 --- a/src/plasma/service.h +++ b/src/plasma/service.h @@ -32,7 +32,7 @@ class QIODevice; class QWidget; class QUrl; -class QGraphicsObject; +class QQuickItem; namespace Plasma { @@ -166,7 +166,7 @@ public: * @param item the QGraphicsObject to associate with the service * @param operation the operation to associate the item with */ - Q_INVOKABLE void associateItem(QGraphicsObject *item, const QString &operation); + Q_INVOKABLE void associateItem(QQuickItem *item, const QString &operation); /** * Disassociates a graphics item if it has been associated with an operation @@ -176,7 +176,7 @@ public: * * @param widget the QGraphicsItem to disassociate. */ - Q_INVOKABLE void disassociateItem(QGraphicsObject *widget); + Q_INVOKABLE void disassociateItem(QQuickItem *widget); /** * @return a parameter map for the given description