From f03b3f5c3370bcb0376d7dafedd9953d1fb7b5c1 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: May 06 2016 01:18:27 +0000 Subject: 5.21.0-3 - pull in phonon-related path fixes (reviewboard#127830) - update %check deps --- diff --git a/kf5-knotifications.spec b/kf5-knotifications.spec index addd964..c95d99a 100644 --- a/kf5-knotifications.spec +++ b/kf5-knotifications.spec @@ -9,7 +9,7 @@ Name: kf5-%{framework} Version: 5.21.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: KDE Frameworks 5 Tier 2 solution with abstraction for system notifications License: LGPLv2+ @@ -24,6 +24,11 @@ URL: https://quickgit.kde.org/?p=%{framework}.git %endif Source0: http://download.kde.org/%{stable}/frameworks/%{versiondir}/%{framework}-%{version}.tar.xz + +## upstream patches +# https://git.reviewboard.kde.org/r/127830 +Patch100: knotifications-review127830.patch + BuildRequires: dbusmenu-qt5-devel BuildRequires: extra-cmake-modules >= %{version} BuildRequires: kf5-kcodecs-devel >= %{version} @@ -36,7 +41,9 @@ BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qttools-devel BuildRequires: qt5-qtx11extras-devel %if 0%{?tests} -BuildRequires: xorg-x11-server-Xvfb dbus-x11 +BuildRequires: dbus-x11 +BuildRequires: time +BuildRequires: xorg-x11-server-Xvfb %endif Requires: kf5-filesystem >= %{version} @@ -104,6 +111,10 @@ time make test -C %{_target_platform} ARGS="--output-on-failure --timeout 300" | %changelog +* Thu May 05 2016 Rex Dieter - 5.21.0-3 +- pull in phonon-related path fixes (reviewboard#127830) +- update %%check deps + * Thu Apr 28 2016 Rex Dieter - 5.21.0-2 - support bootstrap, %%check: enable tests (advisory) diff --git a/knotifications-review127830.patch b/knotifications-review127830.patch new file mode 100644 index 0000000..3683c02 --- /dev/null +++ b/knotifications-review127830.patch @@ -0,0 +1,37 @@ +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;