Hello community, here is the log from the commit of package knotifyconfig for openSUSE:Factory checked in at 2016-07-03 12:24:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/knotifyconfig (Old) and /work/SRC/openSUSE:Factory/.knotifyconfig.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "knotifyconfig" Changes: -------- --- /work/SRC/openSUSE:Factory/knotifyconfig/knotifyconfig.changes 2016-05-19 12:08:56.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.knotifyconfig.new/knotifyconfig.changes 2016-07-03 12:24:06.000000000 +0200 @@ -1,0 +2,8 @@ +Mon Jun 6 21:26:49 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: ---- knotifyconfig-5.22.0.tar.xz New: ---- knotifyconfig-5.23.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ knotifyconfig.spec ++++++ --- /var/tmp/diff_new_pack.gSQI0M/_old 2016-07-03 12:24:07.000000000 +0200 +++ /var/tmp/diff_new_pack.gSQI0M/_new 2016-07-03 12:24:07.000000000 +0200 @@ -18,9 +18,9 @@ %bcond_without lang %define lname libKF5NotifyConfig5 -%define _tar_path 5.22 +%define _tar_path 5.23 Name: knotifyconfig -Version: 5.22.0 +Version: 5.23.0 Release: 0 %define kf5_version %{version} BuildRequires: cmake >= 2.8.12 ++++++ knotifyconfig-5.22.0.tar.xz -> knotifyconfig-5.23.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifyconfig-5.22.0/CMakeLists.txt new/knotifyconfig-5.23.0/CMakeLists.txt --- old/knotifyconfig-5.22.0/CMakeLists.txt 2016-05-07 17:20:13.000000000 +0200 +++ new/knotifyconfig-5.23.0/CMakeLists.txt 2016-06-06 13:42:39.000000000 +0200 @@ -4,15 +4,15 @@ # Dependencies 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) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) set(REQUIRED_QT_VERSION 5.4.0) -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 # Required Qt5 components to build this framework find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Widgets DBus) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifyconfig-5.22.0/metainfo.yaml new/knotifyconfig-5.23.0/metainfo.yaml --- old/knotifyconfig-5.22.0/metainfo.yaml 2016-05-07 17:20:13.000000000 +0200 +++ new/knotifyconfig-5.23.0/metainfo.yaml 2016-06-06 13:42:39.000000000 +0200 @@ -11,3 +11,7 @@ - qmake: KNotifyConfig cmake: "KF5::NotifyConfig" cmakename: KF5NotifyConfig + +public_lib: true +group: Frameworks +subgroup: Tier 3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifyconfig-5.22.0/src/knotifyconfigactionswidget.cpp new/knotifyconfig-5.23.0/src/knotifyconfigactionswidget.cpp --- old/knotifyconfig-5.22.0/src/knotifyconfigactionswidget.cpp 2016-05-07 17:20:13.000000000 +0200 +++ new/knotifyconfig-5.23.0/src/knotifyconfigactionswidget.cpp 2016-06-06 13:42:39.000000000 +0200 @@ -133,14 +133,19 @@ 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);
