diff options
| author | 2025-10-11 00:06:43 +0200 | |
|---|---|---|
| committer | 2025-10-11 00:06:43 +0200 | |
| commit | ee4851ef89120d40bb375d074a3604932b5bd19a (patch) | |
| tree | dbe58947b75d7f077e621557ea91cbec47128c25 | |
| parent | Fix error handling of QSslSocket (#2718) (diff) | |
| download | KVIrc-ee4851ef89120d40bb375d074a3604932b5bd19a.tar.gz KVIrc-ee4851ef89120d40bb375d074a3604932b5bd19a.tar.bz2 KVIrc-ee4851ef89120d40bb375d074a3604932b5bd19a.zip | |
KDE notifications: don't always set notifications as persistent. (#2719)
If a timeout is set, ask qt KDE to close them.
Unfortunately we can't control the timeout
| -rw-r--r-- | src/kvirc/kernel/KviApplication.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/kvirc/kernel/KviApplication.cpp b/src/kvirc/kernel/KviApplication.cpp index 764fc408c..44ca6ea2f 100644 --- a/src/kvirc/kernel/KviApplication.cpp +++ b/src/kvirc/kernel/KviApplication.cpp @@ -792,7 +792,8 @@ void KviApplication::notifierMessage(KviWindow * pWnd, int iIconId, const QStrin actions << __tr2qs("Ignore"); pNotify->setActions(actions); - pNotify->setFlags(KNotification::CloseWhenWidgetActivated|KNotification::Persistent); + pNotify->setFlags(KNotification::CloseWhenWidgetActivated | + (uMessageLifetime == 0 ? KNotification::Persistent : KNotification::CloseOnTimeout)); pNotify->setWidget(g_pMainWindow); connect(pNotify, SIGNAL(activated()), this, SLOT(showParentFrame())); @@ -830,7 +831,8 @@ void KviApplication::notifierMessage(KviWindow * pWnd, int iIconId, const QStrin action = pNotify->addAction(__tr2qs("Ignore")); connect(action, SIGNAL(activated()), pNotify, SLOT(close())); - pNotify->setFlags(KNotification::CloseWhenWindowActivated|KNotification::Persistent); + pNotify->setFlags(KNotification::CloseWhenWindowActivated | + (uMessageLifetime == 0 ? KNotification::Persistent : KNotification::CloseOnTimeout)); pNotify->setWindow(g_pMainWindow->windowHandle()); #endif // QT_VERSION < QT_VERSION_CHECK(6, 0, 0) |
