restore to the actual previous status
Change-Id: I43b7f5812daffe2b846fbc1f7b57d6db51961358
This commit is contained in:
parent
30d3ab72d1
commit
e2f06e9ece
@ -62,6 +62,7 @@ AppletPrivate::AppletPrivate(KService::Ptr service, const KPluginInfo *info, int
|
||||
actions(AppletPrivate::defaultActions(applet)),
|
||||
activationAction(0),
|
||||
itemStatus(Types::UnknownStatus),
|
||||
oldItemStatus(Types::UnknownStatus),
|
||||
modificationsTimer(0),
|
||||
deleteNotificationTimer(0),
|
||||
hasConfigurationInterface(false),
|
||||
@ -232,6 +233,7 @@ void AppletPrivate::askDestroy()
|
||||
} else {
|
||||
//There is no confirmation anymore for panels removal:
|
||||
//this needs users feedback
|
||||
oldItemStatus = itemStatus;
|
||||
q->setStatus(Types::AwaitingDeletionStatus);
|
||||
//no parent, but it won't leak, since it will be closed both in case of timeout
|
||||
//or direct action
|
||||
@ -242,7 +244,7 @@ void AppletPrivate::askDestroy()
|
||||
deleteNotification->setActions(actions);
|
||||
QObject::connect(deleteNotification.data(), &KNotification::action1Activated,
|
||||
[=]() {
|
||||
q->setStatus(Types::PassiveStatus);
|
||||
q->setStatus(qMax(oldItemStatus, Types::UnknownStatus));
|
||||
if (deleteNotification) {
|
||||
deleteNotification->close();
|
||||
}
|
||||
|
@ -100,6 +100,7 @@ public:
|
||||
QAction *activationAction;
|
||||
|
||||
Types::ItemStatus itemStatus;
|
||||
Types::ItemStatus oldItemStatus;
|
||||
|
||||
// timerEvent bookkeeping
|
||||
QBasicTimer constraintsTimer;
|
||||
|
Loading…
Reference in New Issue
Block a user