irreversibly delete on notification close

Change-Id: I3216286a707a1904b6917bfd19c007f99ffa4475
This commit is contained in:
Marco Martin 2014-10-28 17:18:37 +01:00
parent eee9a90aab
commit 099a22d9da

View File

@ -251,6 +251,15 @@ void AppletPrivate::askDestroy()
deleteNotificationTimer = 0;
}
});
QObject::connect(deleteNotification.data(), &KNotification::closed,
[=]() {
//If the timer still exists, it meand the undo action was NOT triggered
if (deleteNotificationTimer) {
transient = true;
cleanUpAndDelete();
}
});
deleteNotification->sendEvent();
if (!deleteNotificationTimer) {
deleteNotificationTimer = new QTimer(q);