Hello community,

here is the log from the commit of package knotifications for openSUSE:Factory 
checked in at 2016-07-03 12:23:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/knotifications (Old)
 and      /work/SRC/openSUSE:Factory/.knotifications.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "knotifications"

Changes:
--------
--- /work/SRC/openSUSE:Factory/knotifications/knotifications.changes    
2016-05-19 12:08:51.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.knotifications.new/knotifications.changes       
2016-07-03 12:23:59.000000000 +0200
@@ -1,0 +2,8 @@
+Mon Jun  6 21:26:42 UTC 2016 - [email protected]
+
+- Update to 5.23.0
+  * Use QUrl::fromUserInput to construct sound url (kde#337276)
+  * For more details please see:
+    https://www.kde.org/announcements/kde-frameworks-5.23.0.php
+
+-------------------------------------------------------------------

Old:
----
  knotifications-5.22.0.tar.xz

New:
----
  knotifications-5.23.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ knotifications.spec ++++++
--- /var/tmp/diff_new_pack.9xpiyn/_old  2016-07-03 12:24:00.000000000 +0200
+++ /var/tmp/diff_new_pack.9xpiyn/_new  2016-07-03 12:24:00.000000000 +0200
@@ -18,9 +18,9 @@
 
 %bcond_without lang
 %define lname   libKF5Notifications5
-%define _tar_path 5.22
+%define _tar_path 5.23
 Name:           knotifications
-Version:        5.22.0
+Version:        5.23.0
 Release:        0
 %define kf5_version %{version}
 BuildRequires:  cmake >= 2.8.12

++++++ knotifications-5.22.0.tar.xz -> knotifications-5.23.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knotifications-5.22.0/CMakeLists.txt 
new/knotifications-5.23.0/CMakeLists.txt
--- old/knotifications-5.22.0/CMakeLists.txt    2016-05-07 17:19:45.000000000 
+0200
+++ new/knotifications-5.23.0/CMakeLists.txt    2016-06-06 13:42:02.000000000 
+0200
@@ -4,7 +4,7 @@
 
 # ECM setup
 include(FeatureSummary)
-find_package(ECM 5.22.0  NO_MODULE)
+find_package(ECM 5.23.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL 
"https://projects.kde.org/projects/kdesupport/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
@@ -17,8 +17,8 @@
 include(ECMQtDeclareLoggingCategory)
 include(ECMPoQmTools)
 
-set(KF5_VERSION "5.22.0") # handled by release scripts
-set(KF5_DEP_VERSION "5.22.0") # handled by release scripts
+set(KF5_VERSION "5.23.0") # handled by release scripts
+set(KF5_DEP_VERSION "5.23.0") # handled by release scripts
 
 ecm_setup_version(${KF5_VERSION}
   VARIABLE_PREFIX KNOTIFICATIONS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knotifications-5.22.0/metainfo.yaml 
new/knotifications-5.23.0/metainfo.yaml
--- old/knotifications-5.22.0/metainfo.yaml     2016-05-07 17:19:45.000000000 
+0200
+++ new/knotifications-5.23.0/metainfo.yaml     2016-06-06 13:42:02.000000000 
+0200
@@ -10,3 +10,7 @@
  - qmake: KNotifications
    cmake: "KF5::Notifications"
 cmakename: KF5Notifications
+
+public_lib: true
+group: Frameworks
+subgroup: Tier 2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knotifications-5.22.0/src/notifybyaudio.cpp 
new/knotifications-5.23.0/src/notifybyaudio.cpp
--- old/knotifications-5.22.0/src/notifybyaudio.cpp     2016-05-07 
17:19:45.000000000 +0200
+++ new/knotifications-5.23.0/src/notifybyaudio.cpp     2016-06-06 
13:42:02.000000000 +0200
@@ -60,16 +60,23 @@
         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;


Reply via email to