[arch-commits] Commit in qt/trunk (PKGBUILD fix-qtbug-15857.patch)

Andrea Scarpino andrea at archlinux.org
Wed Dec 8 22:39:03 UTC 2010


    Date: Wednesday, December 8, 2010 @ 17:39:02
  Author: andrea
Revision: 102628

upgpkg: qt 4.7.1-2
fix crash when an entire block of text is removed (FS#22025)

Added:
  qt/trunk/fix-qtbug-15857.patch
Modified:
  qt/trunk/PKGBUILD

-----------------------+
 PKGBUILD              |   11 ++++++++---
 fix-qtbug-15857.patch |   32 ++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-12-08 18:28:23 UTC (rev 102627)
+++ PKGBUILD	2010-12-08 22:39:02 UTC (rev 102628)
@@ -4,7 +4,7 @@
 
 pkgname=qt
 pkgver=4.7.1
-pkgrel=1
+pkgrel=2
 pkgdesc='A cross-platform application and UI framework'
 arch=('i686' 'x86_64')
 url='http://qt.nokia.com/'
@@ -24,12 +24,14 @@
 _pkgfqn="qt-everywhere-opensource-src-${pkgver}"
 source=("ftp://ftp.qt.nokia.com/qt/source/${_pkgfqn}.tar.gz"
         'assistant.desktop' 'designer.desktop' 'linguist.desktop'
-        'qtconfig.desktop')
+        'qtconfig.desktop'
+        'fix-qtbug-15857.patch')
 md5sums=('6f88d96507c84e9fea5bf3a71ebeb6d7'
          'fc211414130ab2764132e7370f8e5caa'
          '85179f5e0437514f8639957e1d8baf62'
          'f11852b97583610f3dbb669ebc3e21bc'
-         '6b771c8a81dd90b45e8a79afa0e5bbfd')
+         '6b771c8a81dd90b45e8a79afa0e5bbfd'
+         'c359d7b8c3a7fdd99512feaab8c2e26b')
 
 build() {
 	unset QMAKESPEC
@@ -39,6 +41,9 @@
 
 	cd $srcdir/$_pkgfqn
 
+    # Already fixed upstream
+    patch -Np1 -i ${srcdir}/fix-qtbug-15857.patch
+
 	sed -i "s|-O2|$CXXFLAGS|" mkspecs/common/g++.conf
 	sed -i "/^QMAKE_RPATH/s| -Wl,-rpath,||g" mkspecs/common/g++.conf
 	sed -i "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" mkspecs/common/g++.conf

Added: fix-qtbug-15857.patch
===================================================================
--- fix-qtbug-15857.patch	                        (rev 0)
+++ fix-qtbug-15857.patch	2010-12-08 22:39:02 UTC (rev 102628)
@@ -0,0 +1,32 @@
+From 6ae84f1183e91c910ca92a55e37f8254ace805c0 Mon Sep 17 00:00:00 2001
+From: Jiang Jiang <jiang.jiang at nokia.com>
+Date: Mon, 6 Dec 2010 13:07:36 +0100
+Subject: [PATCH] Fix QTextEdit::selectAll crash from textChanged()
+
+Doing selectAll() after the entire block of text has been removed
+will cause this crash, because we didn't check if the block we
+found is valid or not.
+
+Task-number: QTBUG-15857
+Reviewed-by: Eskil
+---
+ src/gui/text/qtextcursor.cpp |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
+index 769ab2f..f73cc4b 100644
+--- a/src/gui/text/qtextcursor.cpp
++++ b/src/gui/text/qtextcursor.cpp
+@@ -363,6 +363,9 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor
+     bool adjustX = true;
+     QTextBlock blockIt = block();
+ 
++    if (!blockIt.isValid())
++        return false;
++
+     if (op >= QTextCursor::Left && op <= QTextCursor::WordRight
+         && blockIt.textDirection() == Qt::RightToLeft) {
+         if (op == QTextCursor::Left)
+-- 
+1.6.1
+




More information about the arch-commits mailing list