summaryrefslogtreecommitdiffstats
path: root/qt/qt-4.7.1-fix-qtbug-15857.patch
diff options
context:
space:
mode:
authorpiernov <piernov@piernov.org>2012-05-13 21:25:08 +0200
committerpiernov <piernov@piernov.org>2012-05-13 21:25:08 +0200
commitf35fb119bf993d3454668f50a17334e09b77160b (patch)
tree9f1d840f10e24848f8b94eb9c5c4e811e0984232 /qt/qt-4.7.1-fix-qtbug-15857.patch
parent2814457a550d6a14e6134ac4c06b1f96a92d2061 (diff)
parent933ac25d27eb5fa5f8f983ab8ac8d507e773c044 (diff)
downloadnutyx-pakxe-f35fb119bf993d3454668f50a17334e09b77160b.tar.gz
nutyx-pakxe-f35fb119bf993d3454668f50a17334e09b77160b.tar.bz2
nutyx-pakxe-f35fb119bf993d3454668f50a17334e09b77160b.tar.xz
nutyx-pakxe-f35fb119bf993d3454668f50a17334e09b77160b.zip
Merge branch 'master' of http://kiao.no-ip.info/NuTyX/git/nutyx-pakxe
Diffstat (limited to 'qt/qt-4.7.1-fix-qtbug-15857.patch')
-rw-r--r--qt/qt-4.7.1-fix-qtbug-15857.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/qt/qt-4.7.1-fix-qtbug-15857.patch b/qt/qt-4.7.1-fix-qtbug-15857.patch
new file mode 100644
index 000000000..4a0dfb8b1
--- /dev/null
+++ b/qt/qt-4.7.1-fix-qtbug-15857.patch
@@ -0,0 +1,32 @@
+From 6ae84f1183e91c910ca92a55e37f8254ace805c0 Mon Sep 17 00:00:00 2001
+From: Jiang Jiang <jiang.jiang@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
+