diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.cpp b/src/scriptengines/qml/plasmoid/containmentinterface.cpp index 5ac85606f..bc99be82a 100644 --- a/src/scriptengines/qml/plasmoid/containmentinterface.cpp +++ b/src/scriptengines/qml/plasmoid/containmentinterface.cpp @@ -43,11 +43,16 @@ ContainmentInterface::ContainmentInterface(DeclarativeAppletScript *parent) qmlRegisterType(); - connect(containment(), SIGNAL(appletRemoved(Plasma::Applet *)), this, SLOT(appletRemovedForward(Plasma::Applet *))); - connect(containment(), SIGNAL(appletAdded(Plasma::Applet *, const QPointF &)), this, SLOT(appletAddedForward(Plasma::Applet *, const QPointF &))); - connect(containment(), SIGNAL(screenChanged(int, int, Plasma::Containment*)), this, SIGNAL(screenChanged())); - connect(containment(), SIGNAL(activityChanged()), this, SIGNAL(activityChanged())); - connect(containment(), SIGNAL(wallpaperChanged()), this, SLOT(loadWallpaper())); + connect(containment(), &Plasma::Containment::appletRemoved, + this, &ContainmentInterface::appletRemovedForward); + connect(containment(), &Plasma::Containment::appletAdded, + this, &ContainmentInterface::appletAddedForward); + connect(containment(), SIGNAL(screenChanged(int, int, Plasma::Containment*)), + this, SIGNAL(screenChanged())); + connect(containment(), SIGNAL(activityChanged()), + this, SIGNAL(activityChanged())); + connect(containment(), SIGNAL(wallpaperChanged()), + this, SLOT(loadWallpaper())); if (containment()->corona()) { connect(containment()->corona(), SIGNAL(availableScreenRegionChanged()), @@ -116,7 +121,7 @@ QVariantList ContainmentInterface::availableScreenRegion(int id) const return regVal; } -void ContainmentInterface::appletAddedForward(Plasma::Applet *applet, const QPointF &pos) +void ContainmentInterface::appletAddedForward(Plasma::Applet *applet) { QObject *appletGraphicObject = applet->property("graphicObject").value(); QObject *contGraphicObject = containment()->property("graphicObject").value(); @@ -142,7 +147,7 @@ void ContainmentInterface::appletAddedForward(Plasma::Applet *applet, const QPoi } m_appletInterfaces << appletGraphicObject; - emit appletAdded(appletGraphicObject, pos); + emit appletAdded(appletGraphicObject); emit appletsChanged(); } diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.h b/src/scriptengines/qml/plasmoid/containmentinterface.h index 1a9b3b72f..6f75ed67b 100644 --- a/src/scriptengines/qml/plasmoid/containmentinterface.h +++ b/src/scriptengines/qml/plasmoid/containmentinterface.h @@ -73,7 +73,7 @@ protected: void addContainmentActions(KMenu &desktopMenu, QEvent *event); Q_SIGNALS: - void appletAdded(QObject *applet, const QPointF &pos); + void appletAdded(QObject *applet); void appletRemoved(QObject *applet); void screenChanged(); void activityIdChanged(); @@ -81,7 +81,7 @@ Q_SIGNALS: void appletsChanged(); protected Q_SLOTS: - void appletAddedForward(Plasma::Applet *applet, const QPointF &pos); + void appletAddedForward(Plasma::Applet *applet); void appletRemovedForward(Plasma::Applet *applet); void loadWallpaper();