SUMMARY I'm pretty sure KNotification::closed should be emitted when a notification times out with the KNotification::CloseOnTimeout flag. However, I also noticed that calling KNotification::close removes a notification from notification history, which is not something I want for my usecase. I'm not sure if there's a bug or if this needs to be a feature request. Spectacle needs a way to let a notification with a URL pointing to a file remain on the screen before it has expired and in history without keeping Spectacle alive. STEPS TO REPRODUCE 1. Create a KNotification object with the KNotification::CloseOnTimeout flag. 2. Send the notification while the GUI isn't visible and a QEventLoopLocker is active to keep the application alive. 3. Connect KNotification::closed to a lambda that deletes the event loop locker when the notification is closed. OBSERVED RESULT The notification appears, expires and is sent to history, but KNotification::closed is never emitted. If I use a QTimer to call KNotification::close, the notification disappears from notification history, which is undesirable for my usecase. EXPECTED RESULT It should be possible to separate the notification being visible on the screen or in history from the lifetime of the sending app. SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20250502 KDE Plasma Version: 6.3.80 KDE Frameworks Version: 6.15.0 Qt Version: 6.9.0 Kernel Version: 6.14.4-1-default (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 4800H with Radeon Graphics Memory: 32 GiB of RAM (30.8 GiB usable) Graphics Processor: AMD Radeon Graphics Manufacturer: Eluktronics Product Name: THINN-15
You can't have both. Either we send a close or we don't. The spec doesn't work that way. But exactly this bug is why i have been against breaking the spec in the way we did.