[SCM] qtbase packaging branch, master, updated. debian/5.3.2+dfsg-3-3-g8e3c4b7

Lisandro Damián Nicanor Pérez lisandro at moszumanska.debian.org
Wed Oct 8 21:28:18 UTC 2014


Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qtbase.git;a=commitdiff;h=8e3c4b7

The following commit has been merged in the master branch:
commit 8e3c4b7463d59271e3c5f28a2f52fb53e3b10bd8
Author: Lisandro Damián Nicanor Pérez Meyer <perezmeyer at gmail.com>
Date:   Wed Oct 8 18:28:00 2014 -0300

    Backport fix_bug_in_internal_comparison_operator.patch
---
 debian/changelog                                   |  2 +
 .../fix_bug_in_internal_comparison_operator.patch  | 73 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 76 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 62d17db..398840a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ qtbase-opensource-src (5.3.2+dfsg-4) UNRELEASED; urgency=medium
   [ Lisandro Damián Nicanor Pérez Meyer ]
   * Move QPlatformSupport stuff from qtbase5-dev to qtbase5-private-dev, as it
     belongs there. Update Breaks+Replaces.
+  * Backport fix_bug_in_internal_comparison_operator.patch to fix a UTF-8
+    problem on QJson (Closes: #764452).
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Thu, 02 Oct 2014 17:39:20 -0300
 
diff --git a/debian/patches/fix_bug_in_internal_comparison_operator.patch b/debian/patches/fix_bug_in_internal_comparison_operator.patch
new file mode 100644
index 0000000..01e30ea
--- /dev/null
+++ b/debian/patches/fix_bug_in_internal_comparison_operator.patch
@@ -0,0 +1,73 @@
+Author: Lars Knoll <lars.knoll at digia.com>
+Date: Fri, 5 Sep 2014 12:58:19 +0200
+Description: [PATCH] Fix bugs in internal comparison operators
+ Lisandro removed the tests part as it didn't apply and we are not
+ running them anyway.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+
+The comparison operators between QJsonPrivate::String
+and QJsonPrivate::Latin1String weren't all correct, leading
+to wrong sorting of keys in QJsonObjects when the keys were
+outside of the latin1 range and resulting lookup errors.
+
+Task-number: QTBUG-41100
+Change-Id: Idceff615f85d7ab874ad2a8e4a6c1ce8c2aa0f65
+Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki at digia.com>
+---
+ src/corelib/json/qjson_p.h |   23 ++++++++++++++++++++---
+ 1 file changed, 20 insertions(+), 3 deletions(-)
+
+--- a/src/corelib/json/qjson_p.h
++++ b/src/corelib/json/qjson_p.h
+@@ -352,7 +352,7 @@ public:
+         return !memcmp(d->utf16, str.d->utf16, d->length*sizeof(ushort));
+     }
+     inline bool operator<(const String &other) const;
+-    inline bool operator >=(const String &other) const { return other < *this; }
++    inline bool operator >=(const String &other) const { return !(*this < other); }
+ 
+     inline QString toString() const {
+ #if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
+@@ -412,12 +412,29 @@ public:
+             val = d->length - str.d->length;
+         return val >= 0;
+     }
++    inline bool operator<(const String &str) const
++    {
++        const qle_ushort *uc = (qle_ushort *) str.d->utf16;
++        if (!uc || *uc == 0)
++            return false;
++
++        const uchar *c = (uchar *)d->latin1;
++        const uchar *e = c + qMin((int)d->length, (int)str.d->length);
+ 
++        while (c < e) {
++            if (*c != *uc)
++                break;
++            ++c;
++            ++uc;
++        }
++        return (c == e ? (int)d->length < (int)str.d->length : *c < *uc);
++
++    }
+     inline bool operator ==(const String &str) const {
+         return (str == *this);
+     }
+     inline bool operator >=(const String &str) const {
+-        return (str < *this);
++        return !(*this < str);
+     }
+ 
+     inline QString toString() const {
+@@ -454,7 +471,7 @@ inline bool String::operator <(const Str
+         a++,b++;
+     if (l==-1)
+         return (alen < blen);
+-    return (ushort)*a - (ushort)*b;
++    return (ushort)*a < (ushort)*b;
+ }
+ 
+ inline bool String::operator<(const Latin1String &str) const
diff --git a/debian/patches/series b/debian/patches/series
index 67bb3b7..6acfddb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,6 +2,7 @@ remove_icon_from_example.patch
 hurd_opengl_incldir.diff
 mips_more_pre-mips32.diff
 gnukfreebsd.diff
+fix_bug_in_internal_comparison_operator.patch
 
 # Patches that need to be upstreamed
 fix_sparc_atomics.patch

-- 
qtbase packaging



More information about the pkg-kde-commits mailing list