diff --git a/kf5-knotifyconfig.spec b/kf5-knotifyconfig.spec index c3b4c65..a65096f 100644 --- a/kf5-knotifyconfig.spec +++ b/kf5-knotifyconfig.spec @@ -26,8 +26,6 @@ URL: https://quickgit.kde.org/?p=%{framework}.git Source0: http://download.kde.org/%{stable}/frameworks/%{versiondir}/%{framework}-%{version}.tar.xz ## upstream patches -# https://git.reviewboard.kde.org/r/127829/ -Patch100: knotifyconfig-reviewboard127829.patch BuildRequires: extra-cmake-modules >= %{version} BuildRequires: kf5-kcompletion-devel >= %{version} diff --git a/knotifyconfig-reviewboard127829.patch b/knotifyconfig-reviewboard127829.patch deleted file mode 100644 index 98d57b9..0000000 --- a/knotifyconfig-reviewboard127829.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/src/knotifyconfigactionswidget.cpp b/src/knotifyconfigactionswidget.cpp -index 98286c4d0e8a7deec5d35986a261222931afb60d..38578919b8bbb94debf9ba7986ed6b77eec0dc91 100644 ---- a/src/knotifyconfigactionswidget.cpp -+++ b/src/knotifyconfigactionswidget.cpp -@@ -133,14 +133,19 @@ void KNotifyConfigActionsWidget::save(KNotifyConfigElement *config) - - void KNotifyConfigActionsWidget::slotPlay() - { -- QUrl soundURL = QUrl(m_ui.Sound_select->text()); // 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() -- const QString soundString = soundURL.toString(); -- // we need a way to get the application name in order to ba able to do this : -- /*QString search = QString("%1/sounds/%2").arg(config->appname).arg(soundFile); -- search = locate("data", search); -- if ( search.isEmpty() )*/ -- soundURL = QUrl::fromLocalFile(QStandardPaths::locate(QStandardPaths::GenericDataLocation, "sounds/" + soundString)); -+ const QString soundFilename = m_ui.Sound_select->text(); -+ 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 HAVE_PHONON - Phonon::MediaObject *media = Phonon::createPlayer(Phonon::NotificationCategory, soundURL);