diff --git a/applet.cpp b/applet.cpp index 115e6e643..43cf714e7 100644 --- a/applet.cpp +++ b/applet.cpp @@ -725,7 +725,7 @@ void Applet::flushPendingConstraintsEvents() if (closeApplet) { closeApplet->setEnabled(unlocked); closeApplet->setVisible(unlocked); - connect(closeApplet, SIGNAL(triggered(bool)), this, SLOT(selectItemToDestroy()), Qt::UniqueConnection); + connect(closeApplet, SIGNAL(triggered(bool)), this, SLOT(destroy()), Qt::UniqueConnection); } QAction *configAction = d->actions->action("configure"); diff --git a/applet.h b/applet.h index 5ddb1f120..09b1a03a3 100644 --- a/applet.h +++ b/applet.h @@ -899,7 +899,6 @@ class PLASMA_EXPORT Applet : public QObject Applet(const QString &packagePath, uint appletId, const QVariantList &args); Q_PRIVATE_SLOT(d, void cleanUpAndDelete()) - Q_PRIVATE_SLOT(d, void selectItemToDestroy()) Q_PRIVATE_SLOT(d, void configDialogFinished()) Q_PRIVATE_SLOT(d, void updateShortcuts()) Q_PRIVATE_SLOT(d, void publishCheckboxStateChanged(int state)) diff --git a/design/qml_todos.txt b/design/qml_todos.txt index ff820c6a0..924a30d05 100644 --- a/design/qml_todos.txt +++ b/design/qml_todos.txt @@ -24,7 +24,6 @@ Functionality Blocks Porting of Applet and Containment ================================= -* AppletPrivate::selectItemToDestroy() * ContainmentPrivate::appletAt(const QPointF &point) * ContainmentPrivate::setScreen(int newScreen, int newDesktop, bool preventInvalidDesktops) * all geometry functions in Applet and Containment (width, height, geometry, raise, lower...) diff --git a/private/applet_p.cpp b/private/applet_p.cpp index 90b76ead0..45f7e1896 100644 --- a/private/applet_p.cpp +++ b/private/applet_p.cpp @@ -199,31 +199,6 @@ void AppletPrivate::init(const QString &packagePath) } } -void AppletPrivate::selectItemToDestroy() -{ - //FIXME: this will not work nicely with multiple screens and being zoomed out! - //TODO: port away from QGV - /* - if (isContainment) { - QGraphicsView *view = q->view(); - if (view && view->transform().isScaling() && - q->scene()->focusItem() != q) { - QGraphicsItem *focus = q->scene()->focusItem(); - - if (focus) { - Containment *toDestroy = dynamic_cast(focus->topLevelItem()); - - if (toDestroy) { - toDestroy->destroy(); - return; - } - } - } - }*/ - - q->destroy(); -} - void AppletPrivate::cleanUpAndDelete() { // reimplemented in the UI specific library diff --git a/private/applet_p.h b/private/applet_p.h index e9a27aa7d..3f7dc90d8 100644 --- a/private/applet_p.h +++ b/private/applet_p.h @@ -108,7 +108,6 @@ public: KConfigGroup *mainConfigGroup(); QString visibleFailureText(const QString &reason); void resetConfigurationObject(); - void selectItemToDestroy(); void addGlobalShortcutsPage(KConfigDialog *dialog); void addPublishPage(KConfigDialog *dialog); void configDialogFinished();