Revert "very basic prototype for delete undo"

This reverts commit f8ba97ae3e.
This commit is contained in:
Marco Martin 2014-10-22 17:01:15 +02:00
parent f8ba97ae3e
commit f278416753
4 changed files with 4 additions and 15 deletions

View File

@ -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)

View File

@ -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()

View File

@ -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);

View File

@ -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);