Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package kf6-knotifications for
openSUSE:Factory checked in at 2026-10-11 15:15:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kf6-knotifications (Old)
and /work/SRC/openSUSE:Factory/.kf6-knotifications.new.3698736 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kf6-knotifications"
Sun Oct 11 15:15:42 2026 rev:32 rq:1383945 version:6.31.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/kf6-knotifications/kf6-knotifications.changes
2026-09-11 18:02:38.450120209 +0200
+++
/work/SRC/openSUSE:Factory/.kf6-knotifications.new.3698736/kf6-knotifications.changes
2026-10-11 15:18:22.556380827 +0200
@@ -1,0 +2,15 @@
+Wed Oct 7 06:47:31 UTC 2026 - Christophe Marin <[email protected]>
+
+- Update to 6.31.0
+ * New feature release
+ * For more details please see:
+ * https://kde.org/announcements/frameworks/6/6.31.0
+- Changes since 6.30.0:
+ * Update dependency version to 6.31.0
+ * Fix handling of deleted audio notifications (kde#525380)
+ * Use ECMInstalledLibraryCheck
+ * CMake config file: ensure ECM's Canberra find module w/ static builds
+ * Merge audio plugin into other plugins
+ * Update version to 6.31.0
+
+-------------------------------------------------------------------
Old:
----
knotifications-6.30.0.tar.xz
knotifications-6.30.0.tar.xz.sig
New:
----
knotifications-6.31.0.tar.xz
knotifications-6.31.0.tar.xz.sig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kf6-knotifications.spec ++++++
--- /var/tmp/diff_new_pack.GtKfAK/_old 2026-10-11 15:18:23.488419728 +0200
+++ /var/tmp/diff_new_pack.GtKfAK/_new 2026-10-11 15:18:23.493419936 +0200
@@ -28,11 +28,11 @@
%define mypython_sitearch %{expand:%%%{mypython}_sitearch}
%endif
-# Full KF6 version (e.g. 6.30.0)
+# Full KF6 version (e.g. 6.31.0)
%{!?_kf6_version: %global _kf6_version %{version}}
%bcond_without released
Name: kf6-knotifications
-Version: 6.30.0
+Version: 6.31.0
Release: 0
Summary: KDE Desktop notifications
License: LGPL-2.1-or-later
++++++ knotifications-6.30.0.tar.xz -> knotifications-6.31.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/knotifications-6.30.0/.kde-ci.yml
new/knotifications-6.31.0/.kde-ci.yml
--- old/knotifications-6.30.0/.kde-ci.yml 2026-09-04 13:40:09.000000000
+0200
+++ new/knotifications-6.31.0/.kde-ci.yml 2026-10-02 15:20:56.000000000
+0200
@@ -8,3 +8,4 @@
test-before-installing: True
require-passing-tests-on: ['Linux', 'FreeBSD', 'Windows']
enable-lsan: True
+ run-installed-library-check-on: ['@all']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/knotifications-6.30.0/CMakeLists.txt
new/knotifications-6.31.0/CMakeLists.txt
--- old/knotifications-6.30.0/CMakeLists.txt 2026-09-04 13:40:09.000000000
+0200
+++ new/knotifications-6.31.0/CMakeLists.txt 2026-10-02 15:20:56.000000000
+0200
@@ -1,12 +1,12 @@
-cmake_minimum_required(VERSION 3.29)
+cmake_minimum_required(VERSION 3.30)
-set(KF_VERSION "6.30.0") # handled by release scripts
-set(KF_DEP_VERSION "6.30.0") # handled by release scripts
+set(KF_VERSION "6.31.0") # handled by release scripts
+set(KF_DEP_VERSION "6.31.0") # handled by release scripts
project(KNotifications VERSION ${KF_VERSION})
# ECM setup
include(FeatureSummary)
-find_package(ECM 6.30.0 NO_MODULE)
+find_package(ECM 6.31.0 NO_MODULE)
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake
Modules." URL "https://commits.kde.org/extra-cmake-modules")
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND
FATAL_ON_MISSING_REQUIRED_PACKAGES)
@@ -25,6 +25,7 @@
include(ECMDeprecationSettings)
include(ECMQmlModule)
include(ECMGenerateQDoc)
+include(ECMInstalledLibraryCheck)
include(CMakeDependentOption)
set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of
deprecated API excluded from the build [default=0].")
@@ -38,7 +39,7 @@
SOVERSION 6)
# Dependencies
-set(REQUIRED_QT_VERSION 6.9.0)
+set(REQUIRED_QT_VERSION 6.10.0)
set(CMAKE_AUTORCC TRUE)
find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Gui)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/knotifications-6.30.0/KF6NotificationsConfig.cmake.in
new/knotifications-6.31.0/KF6NotificationsConfig.cmake.in
--- old/knotifications-6.30.0/KF6NotificationsConfig.cmake.in 2026-09-04
13:40:09.000000000 +0200
+++ new/knotifications-6.31.0/KF6NotificationsConfig.cmake.in 2026-10-02
15:20:56.000000000 +0200
@@ -15,7 +15,14 @@
endif()
if (@Canberra_FOUND@)
+ # FindCanberra only provided by ECM, so temporarily add its find
modules
+ set(_popped_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
+ find_dependency(ECM @ECM_VERSION@)
+ list(APPEND CMAKE_MODULE_PATH ${ECM_FIND_MODULE_DIR})
+
find_dependency(Canberra)
+
+ set(CMAKE_MODULE_PATH ${_popped_CMAKE_MODULE_PATH})
endif()
endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/knotifications-6.30.0/src/CMakeLists.txt
new/knotifications-6.31.0/src/CMakeLists.txt
--- old/knotifications-6.30.0/src/CMakeLists.txt 2026-09-04
13:40:09.000000000 +0200
+++ new/knotifications-6.31.0/src/CMakeLists.txt 2026-10-02
15:20:56.000000000 +0200
@@ -103,7 +103,7 @@
target_link_libraries(KF6Notifications PRIVATE "-framework Foundation"
"-framework AppKit")
endif()
-ecm_generate_headers(KNotifications_HEADERS
+ecm_generate_headers(KNotifications_CamelCase_HEADERS
HEADER_NAMES
KNotification
KNotificationConfiguration
@@ -119,6 +119,7 @@
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/knotifications_export.h
${KNotifications_HEADERS}
+ ${KNotifications_CamelCase_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KNotifications COMPONENT Devel
)
@@ -137,6 +138,19 @@
)
endif()
+ecm_add_installed_library_check(KF6Notifications
+ PACKAGE_NAME "KF6Notifications"
+ PACKAGE_TARGET_NAMESPACE "KF6::"
+)
+
+ecm_installed_library_check_include_strings(KF6Notifications
+ HEADERS ${KNotifications_CamelCase_HEADERS}
+)
+
+ecm_installed_library_check_version_preprocessor_macros(KF6Notifications
+ PREFIX KNOTIFICATIONS
+)
+
if (TARGET Qt6::Qml)
add_subdirectory(qml)
endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/knotifications-6.30.0/src/knotificationmanager.cpp
new/knotifications-6.31.0/src/knotificationmanager.cpp
--- old/knotifications-6.30.0/src/knotificationmanager.cpp 2026-09-04
13:40:09.000000000 +0200
+++ new/knotifications-6.31.0/src/knotificationmanager.cpp 2026-10-02
15:20:56.000000000 +0200
@@ -38,15 +38,11 @@
#endif
#include "debug_p.h"
-#if defined(HAVE_CANBERRA)
-#include "notifybyaudio.h"
-#endif
-
typedef QHash<QString, QString> Dict;
struct Q_DECL_HIDDEN KNotificationManager::Private {
QHash<int, KNotification *> notifications;
- QHash<QString, KNotificationPlugin *> notifyPlugins;
+ KNotificationPlugin *plugin = nullptr;
QStringList dirtyConfigCache;
bool portalDBusServiceExists = false;
@@ -68,9 +64,6 @@
KNotificationManager::KNotificationManager()
: d(new Private)
{
- qDeleteAll(d->notifyPlugins);
- d->notifyPlugins.clear();
-
#ifdef HAVE_DBUS
if (isInsideSandbox()) {
QDBusConnectionInterface *interface =
QDBusConnection::sessionBus().interface();
@@ -86,51 +79,9 @@
#endif
}
-KNotificationManager::~KNotificationManager() = default;
-
-KNotificationPlugin *KNotificationManager::pluginForAction(const QString
&action)
+KNotificationManager::~KNotificationManager()
{
- KNotificationPlugin *plugin = d->notifyPlugins.value(action);
-
- // We already loaded a plugin for this action.
- if (plugin) {
- return plugin;
- }
-
- auto addPlugin = [this](KNotificationPlugin *plugin) {
- d->notifyPlugins[plugin->optionName()] = plugin;
- connect(plugin, &KNotificationPlugin::finished, this,
&KNotificationManager::notifyPluginFinished);
- connect(plugin, &KNotificationPlugin::xdgActivationTokenReceived,
this, &KNotificationManager::xdgActivationTokenReceived);
- connect(plugin, &KNotificationPlugin::actionInvoked, this,
&KNotificationManager::notificationActivated);
- connect(plugin, &KNotificationPlugin::replied, this,
&KNotificationManager::notificationReplied);
- };
-
- // Load plugin.
- // We have a series of built-ins up first, and fall back to trying
- // to instantiate an externally supplied plugin.
- if (action == QLatin1String("Popup")) {
-#if defined(Q_OS_ANDROID)
- plugin = new NotifyByAndroid(this);
-#elif defined(WITH_SNORETOAST)
- plugin = new NotifyBySnore(this);
-#elif defined(Q_OS_MACOS)
- plugin = new NotifyByMacOSNotificationCenter(this);
-#elif defined(HAVE_DBUS)
- if (d->portalDBusServiceExists) {
- plugin = new NotifyByPortal(this);
- } else {
- plugin = new NotifyByPopup(this);
- }
-#endif
- addPlugin(plugin);
- } else if (action == QLatin1String("Sound")) {
-#if defined(HAVE_CANBERRA)
- plugin = new NotifyByAudio(this);
- addPlugin(plugin);
-#endif
- }
-
- return plugin;
+ delete d->plugin;
}
void KNotificationManager::notifyPluginFinished(KNotification *notification)
@@ -206,25 +157,8 @@
KNotification *n = d->notifications.value(id);
qCDebug(LOG_KNOTIFICATIONS) << "Closing notification" << id;
- // Find plugins that are actually acting on this notification
- // call close() only on those, otherwise each
KNotificationPlugin::close()
- // will call finish() which may close-and-delete the KNotification
object
- // before it finishes calling close on all the other plugins.
- // For example: Action=Popup is a single actions but there is 5 loaded
- // plugins, calling close() on the second would already
close-and-delete
- // the notification
- KNotifyConfig notifyConfig(n->appName(), n->eventId());
- QString notifyActions =
notifyConfig.readEntry(QStringLiteral("Action"));
-
- const auto listActions = notifyActions.split(QLatin1Char('|'));
- for (const QString &action : listActions) {
- if (!d->notifyPlugins.contains(action)) {
- qCDebug(LOG_KNOTIFICATIONS) << "No plugin for action" <<
action;
- continue;
- }
-
- d->notifyPlugins[action]->close(n);
- }
+ Q_ASSERT(d->plugin);
+ d->plugin->close(n);
}
}
@@ -267,43 +201,40 @@
n->d->needUpdate = false;
}
- const auto actionsList = notifyActions.split(QLatin1Char('|'));
+ n->ref();
- // Make sure all plugins can ref the notification
- // otherwise a plugin may finish and deref before everyone got a chance to
ref
- for (const QString &action : actionsList) {
- KNotificationPlugin *notifyPlugin = pluginForAction(action);
-
- if (!notifyPlugin) {
- qCDebug(LOG_KNOTIFICATIONS) << "No plugin for action" << action;
- continue;
+ if (!d->plugin) {
+#if defined(Q_OS_ANDROID)
+ d->plugin = new NotifyByAndroid(this);
+#elif defined(WITH_SNORETOAST)
+ d->plugin = new NotifyBySnore(this);
+#elif defined(Q_OS_MACOS)
+ d->plugin = new NotifyByMacOSNotificationCenter(this);
+#elif defined(HAVE_DBUS)
+ if (d->portalDBusServiceExists) {
+ d->plugin = new NotifyByPortal(this);
+ } else {
+ d->plugin = new NotifyByPopup(this);
}
+#endif
- n->ref();
+ connect(d->plugin, &KNotificationPlugin::finished, this,
&KNotificationManager::notifyPluginFinished);
+ connect(d->plugin, &KNotificationPlugin::xdgActivationTokenReceived,
this, &KNotificationManager::xdgActivationTokenReceived);
+ connect(d->plugin, &KNotificationPlugin::actionInvoked, this,
&KNotificationManager::notificationActivated);
+ connect(d->plugin, &KNotificationPlugin::replied, this,
&KNotificationManager::notificationReplied);
}
- for (const QString &action : actionsList) {
- KNotificationPlugin *notifyPlugin = pluginForAction(action);
-
- if (!notifyPlugin) {
- qCDebug(LOG_KNOTIFICATIONS) << "No plugin for action" << action;
- continue;
- }
-
- qCDebug(LOG_KNOTIFICATIONS) << "Calling notify on" <<
notifyPlugin->optionName();
- notifyPlugin->notify(n, notifyConfig);
- }
+ d->plugin->notify(n, notifyConfig);
connect(n, &KNotification::closed, this,
&KNotificationManager::notificationClosed);
}
void KNotificationManager::update(KNotification *n)
{
- KNotifyConfig notifyConfig(n->appName(), n->eventId());
+ Q_ASSERT(d->plugin);
- for (KNotificationPlugin *p : std::as_const(d->notifyPlugins)) {
- p->update(n, notifyConfig);
- }
+ KNotifyConfig notifyConfig(n->appName(), n->eventId());
+ d->plugin->update(n, notifyConfig);
}
void KNotificationManager::reemit(KNotification *n)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/knotifications-6.30.0/src/knotificationmanager_p.h
new/knotifications-6.31.0/src/knotificationmanager_p.h
--- old/knotifications-6.30.0/src/knotificationmanager_p.h 2026-09-04
13:40:09.000000000 +0200
+++ new/knotifications-6.31.0/src/knotificationmanager_p.h 2026-10-02
15:20:56.000000000 +0200
@@ -24,8 +24,6 @@
static KNotificationManager *self();
~KNotificationManager() override;
- KNotificationPlugin *pluginForAction(const QString &action);
-
/*
* send the dbus call to the knotify server
*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/knotifications-6.30.0/src/knotifyconfig.cpp
new/knotifications-6.31.0/src/knotifyconfig.cpp
--- old/knotifications-6.30.0/src/knotifyconfig.cpp 2026-09-04
13:40:09.000000000 +0200
+++ new/knotifications-6.31.0/src/knotifyconfig.cpp 2026-10-02
15:20:56.000000000 +0200
@@ -139,3 +139,21 @@
const QString group = QLatin1String("Event/") + d->eventId;
return d->readEntry(group, key, true);
}
+
+KNotifyConfig::Actions KNotifyConfig::actions() const
+{
+ const QString notifyActions = readEntry(QStringLiteral("Action"));
+ const auto actionsList =
QStringView(notifyActions).split(QLatin1Char('|'));
+
+ Actions ret;
+
+ if (actionsList.contains(u"Popup")) {
+ ret.setFlag(Popup);
+ }
+
+ if (actionsList.contains(u"Sound")) {
+ ret.setFlag(Sound);
+ }
+
+ return ret;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/knotifications-6.30.0/src/knotifyconfig.h
new/knotifications-6.31.0/src/knotifyconfig.h
--- old/knotifications-6.30.0/src/knotifyconfig.h 2026-09-04
13:40:09.000000000 +0200
+++ new/knotifications-6.31.0/src/knotifyconfig.h 2026-10-02
15:20:56.000000000 +0200
@@ -23,6 +23,18 @@
{
public:
/*!
+ * \value Popup Show a popup
+ * \value Sound Play a sound
+ *
+ * \since 6.30
+ */
+ enum Action {
+ Popup = 0x1,
+ Sound = 0x2,
+ };
+ Q_DECLARE_FLAGS(Actions, Action)
+
+ /*!
* Creates a notify config for the given application name and event id
*
* \a applicationName The application name, typically the name of the
notifyrc file without its extension.
@@ -79,6 +91,12 @@
QString readPathEntry(const QString &key) const;
/*!
+ * The actions for this notification.
+ * \since 6.30
+ */
+ Actions actions() const;
+
+ /*!
* reparse the cached configs. to be used when the config may have changed
*/
static void reparseConfiguration();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/knotifications-6.30.0/src/notifybyandroid.cpp
new/knotifications-6.31.0/src/notifybyandroid.cpp
--- old/knotifications-6.30.0/src/notifybyandroid.cpp 2026-09-04
13:40:09.000000000 +0200
+++ new/knotifications-6.31.0/src/notifybyandroid.cpp 2026-10-02
15:20:56.000000000 +0200
@@ -152,6 +152,10 @@
void NotifyByAndroid::notify(KNotification *notification, const KNotifyConfig
¬ifyConfig)
{
+ if (!notifyConfig.actions().testFlag(KNotifyConfig::Popup)) {
+ return;
+ }
+
const auto n = createAndroidNotification(notification, notifyConfig);
m_notifications.insert(notification->id(), notification);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/knotifications-6.30.0/src/notifybyaudio.cpp
new/knotifications-6.31.0/src/notifybyaudio.cpp
--- old/knotifications-6.30.0/src/notifybyaudio.cpp 2026-09-04
13:40:09.000000000 +0200
+++ new/knotifications-6.31.0/src/notifybyaudio.cpp 2026-10-02
15:20:56.000000000 +0200
@@ -24,7 +24,7 @@
const QString DEFAULT_SOUND_THEME = QStringLiteral("ocean");
NotifyByAudio::NotifyByAudio(QObject *parent)
- : KNotificationPlugin(parent)
+ : QObject(parent)
, m_soundTheme(DEFAULT_SOUND_THEME)
, m_enabled(true)
{
@@ -100,8 +100,6 @@
const QString soundName = notifyConfig.readEntry(QStringLiteral("Sound"));
if (soundName.isEmpty()) {
qCWarning(LOG_KNOTIFICATIONS) << "Audio notification requested, but no
sound name provided in notifyrc file, aborting audio notification";
-
- finish(notification);
return;
}
@@ -120,7 +118,6 @@
// Looping happens in the finishCallback
if (!playSound(m_currentId, soundName, fallbackUrl)) {
- finish(notification);
return;
}
@@ -174,12 +171,19 @@
void NotifyByAudio::finishCallback(uint32_t id, int error_code)
{
- KNotification *notification = m_notifications.value(id, nullptr);
- if (!notification) {
+ const auto it = m_notifications.constFind(id);
+ if (it == m_notifications.constEnd()) {
// We may have gotten a late finish callback.
return;
}
+ const auto notification = *it;
+ if (!notification) {
+ // Notification was already deleted
+ finishNotification(notification, id);
+ return;
+ }
+
if (error_code == CA_SUCCESS) {
// Loop the sound now if we have one
auto soundInfoIt = m_loopSoundUrls.constFind(id);
@@ -207,7 +211,6 @@
int ret = ca_context_cancel(m_context, id);
if (ret != CA_SUCCESS) {
qCWarning(LOG_KNOTIFICATIONS) << "Failed to cancel canberra
context for audio notification:" << ca_strerror(ret);
- return;
}
}
@@ -223,7 +226,6 @@
{
m_notifications.remove(id);
m_loopSoundUrls.remove(id);
- finish(notification);
}
#include "moc_notifybyaudio.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/knotifications-6.30.0/src/notifybyaudio.h
new/knotifications-6.31.0/src/notifybyaudio.h
--- old/knotifications-6.30.0/src/notifybyaudio.h 2026-09-04
13:40:09.000000000 +0200
+++ new/knotifications-6.31.0/src/notifybyaudio.h 2026-10-02
15:20:56.000000000 +0200
@@ -11,6 +11,7 @@
#include "knotificationplugin.h"
#include <QHash>
+#include <QPointer>
#include <QUrl>
#include <KConfigWatcher>
@@ -19,7 +20,7 @@
struct ca_context;
-class NotifyByAudio : public KNotificationPlugin
+class NotifyByAudio : public QObject
{
Q_OBJECT
@@ -27,12 +28,8 @@
explicit NotifyByAudio(QObject *parent = nullptr);
~NotifyByAudio() override;
- QString optionName() override
- {
- return QStringLiteral("Sound");
- }
- void notify(KNotification *notification, const KNotifyConfig
¬ifyConfig) override;
- void close(KNotification *notification) override;
+ void notify(KNotification *notification, const KNotifyConfig
¬ifyConfig);
+ void close(KNotification *notification);
private Q_SLOTS:
void finishCallback(uint32_t id, int error_code);
@@ -47,7 +44,7 @@
ca_context *m_context = nullptr;
quint32 m_currentId = 0;
- QHash<quint32, KNotification *> m_notifications;
+ QHash<quint32, QPointer<KNotification>> m_notifications;
// in case we loop we store the URL for the notification to be able to
replay it
QHash<quint32, std::pair<QString, QUrl>> m_loopSoundUrls;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/knotifications-6.30.0/src/notifybymacosnotificationcenter.mm
new/knotifications-6.31.0/src/notifybymacosnotificationcenter.mm
--- old/knotifications-6.30.0/src/notifybymacosnotificationcenter.mm
2026-09-04 13:40:09.000000000 +0200
+++ new/knotifications-6.31.0/src/notifybymacosnotificationcenter.mm
2026-10-02 15:20:56.000000000 +0200
@@ -103,6 +103,10 @@
{
Q_UNUSED(notifyConfig);
+ if (!notifyConfig.actions().testFlag(KNotifyConfig::Popup)) {
+ return;
+ }
+
int internalId =
MacOSNotificationCenterPrivate::instance()->m_internalCounter++;
NSUserNotification *osxNotification = [[[NSUserNotification alloc] init]
autorelease];
NSString *notificationId = [NSString stringWithFormat: @"%d",
notification->id()];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/knotifications-6.30.0/src/notifybypopup.cpp
new/knotifications-6.31.0/src/notifybypopup.cpp
--- old/knotifications-6.30.0/src/notifybypopup.cpp 2026-09-04
13:40:09.000000000 +0200
+++ new/knotifications-6.31.0/src/notifybypopup.cpp 2026-10-02
15:20:56.000000000 +0200
@@ -55,8 +55,18 @@
m_notificationQueue.append(qMakePair(notification, notifyConfig));
queryPopupServerCapabilities();
} else {
- if (!sendNotificationToServer(notification, notifyConfig)) {
- finish(notification); // an error occurred.
+ if (notifyConfig.actions().testFlag(KNotifyConfig::Popup)) {
+ if (!sendNotificationToServer(notification, notifyConfig)) {
+ finish(notification); // an error occurred.
+ }
+ }
+
+ if (notifyConfig.actions().testFlag(KNotifyConfig::Sound)) {
+ if (!m_audio) {
+ m_audio = std::make_unique<NotifyByAudio>();
+ }
+
+ m_audio->notify(notification, notifyConfig);
}
}
}
@@ -68,6 +78,10 @@
void NotifyByPopup::close(KNotification *notification)
{
+ if (m_audio) {
+ m_audio->close(notification);
+ }
+
QMutableListIterator<QPair<KNotification *, KNotifyConfig>>
iter(m_notificationQueue);
while (iter.hasNext()) {
auto &item = iter.next();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/knotifications-6.30.0/src/notifybypopup.h
new/knotifications-6.31.0/src/notifybypopup.h
--- old/knotifications-6.30.0/src/notifybypopup.h 2026-09-04
13:40:09.000000000 +0200
+++ new/knotifications-6.31.0/src/notifybypopup.h 2026-10-02
15:20:56.000000000 +0200
@@ -16,6 +16,8 @@
#include "notifications_interface.h"
+#include "notifybyaudio.h"
+
class KNotification;
class QDBusPendingCallWatcher;
@@ -88,6 +90,8 @@
org::freedesktop::Notifications m_dbusInterface;
+ std::unique_ptr<NotifyByAudio> m_audio;
+
Q_DISABLE_COPY_MOVE(NotifyByPopup)
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/knotifications-6.30.0/src/notifybyportal.cpp
new/knotifications-6.31.0/src/notifybyportal.cpp
--- old/knotifications-6.30.0/src/notifybyportal.cpp 2026-09-04
13:40:09.000000000 +0200
+++ new/knotifications-6.31.0/src/notifybyportal.cpp 2026-10-02
15:20:56.000000000 +0200
@@ -12,6 +12,7 @@
#include "debug_p.h"
#include "knotification.h"
#include "knotifyconfig.h"
+#include "notifybyaudio.h"
#include <QBuffer>
#include <QDBusConnection>
@@ -84,6 +85,8 @@
*/
uint nextId;
+ std::unique_ptr<NotifyByAudio> m_audio;
+
NotifyByPortal *const q;
};
@@ -137,11 +140,21 @@
return;
}
- // check if Notifications DBus service exists on bus, use it if it does
- if (d->dbusServiceExists) {
- if (!d->sendNotificationToPortal(notification, notifyConfig)) {
- finish(notification); // an error occurred.
+ if (notifyConfig.actions().testFlag(KNotifyConfig::Popup)) {
+ // check if Notifications DBus service exists on bus, use it if it does
+ if (d->dbusServiceExists) {
+ if (!d->sendNotificationToPortal(notification, notifyConfig)) {
+ finish(notification); // an error occurred.
+ }
+ }
+ }
+
+ if (notifyConfig.actions().testFlag(KNotifyConfig::Sound)) {
+ if (!d->m_audio) {
+ d->m_audio = std::make_unique<NotifyByAudio>();
}
+
+ d->m_audio->notify(notification, notifyConfig);
}
}
@@ -150,6 +163,10 @@
if (d->dbusServiceExists) {
d->closePortalNotification(notification);
}
+
+ if (d->m_audio) {
+ d->m_audio->close(notification);
+ }
}
void NotifyByPortal::update(KNotification *notification, const KNotifyConfig
¬ifyConfig)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/knotifications-6.30.0/src/notifybysnore.cpp
new/knotifications-6.31.0/src/notifybysnore.cpp
--- old/knotifications-6.30.0/src/notifybysnore.cpp 2026-09-04
13:40:09.000000000 +0200
+++ new/knotifications-6.31.0/src/notifybysnore.cpp 2026-10-02
15:20:56.000000000 +0200
@@ -145,6 +145,11 @@
void NotifyBySnore::notify(KNotification *notification, const KNotifyConfig
¬ifyConfig)
{
Q_UNUSED(notifyConfig);
+
+ if (!notifyConfig.actions().testFlag(KNotifyConfig::Popup)) {
+ return;
+ }
+
// HACK work around that notification->id() is only populated after
returning from here
// note that config will be invalid at that point, so we can't pass that
along
QMetaObject::invokeMethod(