[kdelibs] fix knotify, workaround Qt 4.8 QUrl.toLocalFile behavior change (#749213)

Rex Dieter rdieter at fedoraproject.org
Wed Oct 26 19:19:52 UTC 2011


commit 47ce31f2975b8659b091c8608442caa75e77a607
Author: Rex Dieter <rdieter at fedoraproject.org>
Date:   Wed Oct 26 14:27:16 2011 -0500

    fix knotify, workaround Qt 4.8 QUrl.toLocalFile behavior change (#749213)

 kdelibs-4.7.2-knotify_qt48_qurl.patch |   16 ++++++++++++++++
 kdelibs.spec                          |   10 +++++++++-
 2 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/kdelibs-4.7.2-knotify_qt48_qurl.patch b/kdelibs-4.7.2-knotify_qt48_qurl.patch
new file mode 100644
index 0000000..c837e22
--- /dev/null
+++ b/kdelibs-4.7.2-knotify_qt48_qurl.patch
@@ -0,0 +1,16 @@
+diff -up kdelibs-4.7.2/knotify/config/knotifyconfigactionswidget.cpp.qt48 kdelibs-4.7.2/knotify/config/knotifyconfigactionswidget.cpp
+--- kdelibs-4.7.2/knotify/config/knotifyconfigactionswidget.cpp.qt48	2011-05-20 15:24:54.000000000 -0500
++++ kdelibs-4.7.2/knotify/config/knotifyconfigactionswidget.cpp	2011-10-26 14:18:14.000278236 -0500
+@@ -129,6 +129,12 @@ void KNotifyConfigActionsWidget::slotPla
+ 	if ( soundURL.isRelative() )
+ 	{
+ 		QString soundString = soundURL.toLocalFile();
++		// hack around http://bugs.kde.org/285028
++		if ( soundString.isEmpty() ) 
++		{
++			soundURL.setUrl("file:" + soundURL.url());
++			soundString = soundURL.toLocalFile();
++		}
+ 		// 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 = KGlobal::mainComponent().dirs()->findResource("data", search);
diff --git a/kdelibs.spec b/kdelibs.spec
index 8675e4a..27623fd 100644
--- a/kdelibs.spec
+++ b/kdelibs.spec
@@ -23,7 +23,7 @@
 
 Summary: KDE Libraries
 Version: 4.7.2
-Release: 3%{?dist}
+Release: 4%{?dist}
 
 Name: kdelibs
 Epoch: 6
@@ -124,6 +124,10 @@ Patch50: kdelibs-4.7.0-knewstuff2_gpg2.patch
 # https://git.reviewboard.kde.org/r/101231/
 Patch51: kdelibs-4.6.2-uri_mimetypes.patch
 
+# workaround Qt 4.8 QUrl.toLocalFile behavior change
+# http://bugzilla.redhat.com/749213
+Patch52: kdelibs-4.7.2-knotify_qt48_qurl.patch
+
 ## upstream
 # fix nepomuk queries *not* using wide-unicode
 Patch100: kdelibs-4.7.2-nepomuk_unicode.patch
@@ -319,6 +323,7 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage
 # upstreamable patches
 %patch50 -p1 -b .knewstuff2_gpg2
 %patch51 -p1 -b .uri_mimetypes
+%patch52 -p1 -b .knotify_qt48_qurl
 
 # upstream patches
 %patch100 -p1 -b .nepomuk_unicode
@@ -574,6 +579,9 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Wed Oct 26 2011 Rex Dieter <rdieter at fedoraproject.org> 4.7.2-4
+- fix knotify, workaround Qt 4.8 QUrl.toLocalFile behavior change (#749213)
+
 * Tue Oct 25 2011 Rex Dieter <rdieter at fedoraproject.org> 4.7.2-3
 - no_libkactivities toggle, -devel: Provides: libkactivities-devel
 


More information about the scm-commits mailing list