diff --git a/src/plasma/plasma.h b/src/plasma/plasma.h index 7c12a9c5f..15c346b24 100644 --- a/src/plasma/plasma.h +++ b/src/plasma/plasma.h @@ -253,8 +253,7 @@ public: ActiveStatus = 2, /**< The Item is active **/ NeedsAttentionStatus = 3, /**< The Item needs attention **/ RequiresAttentionStatus = 4, /**< The Item needs persistent attention **/ - AcceptingInputStatus = 5, /**< The Item is accepting input **/ - AwaitingDeletionStatus = -1 /**< The user asked to delete this applet*/ + AcceptingInputStatus = 5 /**< The Item is accepting input **/ }; Q_ENUMS(ItemStatus) diff --git a/src/plasma/private/applet_p.cpp b/src/plasma/private/applet_p.cpp index eb9af97d9..44ecd2577 100644 --- a/src/plasma/private/applet_p.cpp +++ b/src/plasma/private/applet_p.cpp @@ -220,13 +220,6 @@ void AppletPrivate::askDestroy() return; //don't double delete } - if (itemStatus == Types::AwaitingDeletionStatus) { - transient = true; - cleanUpAndDelete(); - } else { - q->setStatus(Types::AwaitingDeletionStatus); - } - /* if (q->isContainment()) { QMessageBox *box = new QMessageBox(QMessageBox::Warning, i18nc("@title:window %1 is the name of the containment", "Remove %1", q->title()), i18nc("%1 is the name of the containment", "Do you really want to remove this %1?", q->title()), QMessageBox::StandardButtons(QMessageBox::Yes | QMessageBox::No)); box->setWindowFlags((Qt::WindowFlags)(box->windowFlags() | Qt::WA_DeleteOnClose)); @@ -245,9 +238,10 @@ void AppletPrivate::askDestroy() }); return; - }*/ + } - + transient = true; + cleanUpAndDelete(); } void AppletPrivate::globalShortcutChanged() diff --git a/src/plasma/private/containment_p.cpp b/src/plasma/private/containment_p.cpp index c6c45a475..383677226 100644 --- a/src/plasma/private/containment_p.cpp +++ b/src/plasma/private/containment_p.cpp @@ -115,9 +115,6 @@ void ContainmentPrivate::configChanged() void ContainmentPrivate::checkStatus(Plasma::Types::ItemStatus appletStatus) { - if (appletStatus == Types::AwaitingDeletionStatus) { - return; - } //qDebug() << "================== "<< appletStatus << q->status(); if (appletStatus == q->status()) { emit q->statusChanged(appletStatus); diff --git a/src/scriptengines/qml/plasmoid/appletinterface.cpp b/src/scriptengines/qml/plasmoid/appletinterface.cpp index 206973716..24a36b3d5 100644 --- a/src/scriptengines/qml/plasmoid/appletinterface.cpp +++ b/src/scriptengines/qml/plasmoid/appletinterface.cpp @@ -72,7 +72,6 @@ AppletInterface::AppletInterface(DeclarativeAppletScript *script, const QVariant connect(applet(), &Plasma::Applet::statusChanged, this, &AppletInterface::statusChanged); - connect(applet(), &Plasma::Applet::activated, this, &AppletInterface::activated);