diff --git a/kf5-knotifications.spec b/kf5-knotifications.spec index 7dea6dd..2d01184 100644 --- a/kf5-knotifications.spec +++ b/kf5-knotifications.spec @@ -26,8 +26,6 @@ Source0: http://download.kde.org/%{stable}/frameworks/%{versiondir}/%{fra ## upstream patches -# https://git.reviewboard.kde.org/r/127830 -Patch100: knotifications-review127830.patch BuildRequires: dbusmenu-qt5-devel BuildRequires: extra-cmake-modules >= %{version} diff --git a/knotifications-review127830.patch b/knotifications-review127830.patch deleted file mode 100644 index 3683c02..0000000 --- a/knotifications-review127830.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/src/notifybyaudio.cpp b/src/notifybyaudio.cpp -index 6ae63b8df8e7aa692e88b03ca7b7538c78101917..903e9969895af543c9ef56b39c88b3072c1a099b 100644 ---- a/src/notifybyaudio.cpp -+++ b/src/notifybyaudio.cpp -@@ -60,16 +60,23 @@ void NotifyByAudio::notify(KNotification *notification, KNotifyConfig *config) - return; - } - -- QUrl soundURL = QUrl(soundFilename); // this CTOR accepts both absolute paths (/usr/share/sounds/blabla.ogg and blabla.ogg) w/o screwing the scheme -- if (soundURL.isRelative() && !soundURL.toString().startsWith('/')) { // QUrl considers url.scheme.isEmpty() == url.isRelative() -- soundURL = QUrl::fromLocalFile(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("sounds/") + soundFilename)); -- -- if (soundURL.isEmpty()) { -- qCWarning(LOG_KNOTIFICATIONS) << "Audio notification requested, but sound file from notifyrc file was not found, aborting audio notification"; -- -- finish(notification); -- return; -+ QUrl soundURL; -+ const auto dataLocations = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation); -+ foreach (const QString &dataLocation, dataLocations) { -+ soundURL = QUrl::fromUserInput(soundFilename, -+ dataLocation + "/sounds", -+ QUrl::AssumeLocalFile); -+ if (soundURL.isLocalFile() && QFile::exists(soundURL.toLocalFile())) { -+ break; -+ } else if (!soundURL.isLocalFile() && soundURL.isValid()) { -+ break; - } -+ soundURL.clear(); -+ } -+ if (soundURL.isEmpty()) { -+ qCWarning(LOG_KNOTIFICATIONS) << "Audio notification requested, but sound file from notifyrc file was not found, aborting audio notification"; -+ finish(notification); -+ return; - } - - Phonon::MediaObject *m;