[qt] restore qt-4.7-compatible behavior to QUrl.toLocalFile (#749213)

Rex Dieter rdieter at fedoraproject.org
Thu Oct 27 18:19:34 UTC 2011


commit 8d515ac5433928edfa9b1c190caf598f23c71e88
Author: Rex Dieter <rdieter at fedoraproject.org>
Date:   Thu Oct 27 13:27:00 2011 -0500

    restore qt-4.7-compatible behavior to QUrl.toLocalFile (#749213)

 ...ere-opensource-src-4.8.0-QUrl_toLocalFile.patch |   13 +++++++++++++
 qt.spec                                            |   10 +++++++++-
 2 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/qt-everywhere-opensource-src-4.8.0-QUrl_toLocalFile.patch b/qt-everywhere-opensource-src-4.8.0-QUrl_toLocalFile.patch
new file mode 100644
index 0000000..a422766
--- /dev/null
+++ b/qt-everywhere-opensource-src-4.8.0-QUrl_toLocalFile.patch
@@ -0,0 +1,13 @@
+diff -up qt-everywhere-opensource-src-4.8.0/src/corelib/io/qurl.cpp.toLocalFile qt-everywhere-opensource-src-4.8.0/src/corelib/io/qurl.cpp
+--- qt-everywhere-opensource-src-4.8.0/src/corelib/io/qurl.cpp.toLocalFile	2011-10-03 22:44:32.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.0/src/corelib/io/qurl.cpp	2011-10-27 12:58:35.706815049 -0500
+@@ -6158,7 +6158,8 @@ QUrl QUrl::fromLocalFile(const QString &
+ QString QUrl::toLocalFile() const
+ {
+     // the call to isLocalFile() also ensures that we're parsed
+-    if (!isLocalFile())
++    // Treat URLs with no scheme as local for backward compatibility
++    if (!isLocalFile() && !d->scheme.isEmpty())
+         return QString();
+ 
+     QString tmp;
diff --git a/qt.spec b/qt.spec
index d8df9aa..96f65ed 100644
--- a/qt.spec
+++ b/qt.spec
@@ -11,7 +11,7 @@ Summary: Qt toolkit
 Name:    qt
 Epoch:   1
 Version: 4.8.0
-Release: 0.19.rc1%{?dist}
+Release: 0.20.rc1%{?dist}
 
 # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
 License: (LGPLv2 with exceptions or GPLv3 with exceptions) and ASL 2.0 and BSD and FTL and MIT
@@ -85,6 +85,10 @@ Patch70: qt-everywhere-opensource-src-4.8.0-QTBUG-14724.patch
 # Buttons in Qt applications not clickable when run under gnome-shell (#742658, QTBUG-21900)
 Patch71:  qt-everywhere-opensource-src-4.8.0-QTBUG-21900.patch
 
+# restore Qt-4.7 behavior (which kde needs) to QUrl.toLocalfile
+# https://bugzilla.redhat.com/show_bug.cgi?id=749213
+Patch72: qt-everywhere-opensource-src-4.8.0-QUrl_toLocalFile.patch
+
 # upstream patches
 
 # security patches
@@ -404,6 +408,7 @@ popd
 %patch69 -p1 -b .QTBUG-22037
 %patch70 -p1 -b .QTBUG-14724
 %patch71 -p1 -b .QTBUG-21900
+%patch72 -p1 -b .QUrl_toLocalFile
 
 # upstream patches
 
@@ -1036,6 +1041,9 @@ fi
 
 
 %changelog
+* Thu Oct 27 2011 Rex Dieter <rdieter at fedoraproject.org> 4.8.0-0.20.rc1
+- restore qt-4.7-compatible behavior to QUrl.toLocalFile (#749213)
+
 * Wed Oct 26 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:4.8.0-0.19.rc1
 - Rebuilt for glibc bug#747377
 


More information about the scm-commits mailing list