diff options
author | sibel <lesibel@free.fr> | 2011-01-15 14:00:59 +0100 |
---|---|---|
committer | sibel <lesibel@free.fr> | 2011-01-15 14:00:59 +0100 |
commit | 8b6ff40bc198c4db03a60bd18d94b34515c9632f (patch) | |
tree | cd435e2594b38c0b380a59307e3546669da3c676 /extra/qt/qt-4.7.1-fix-qtbug-15857.patch | |
parent | 70ff0684e02004b12353ef0846b1f302e5b86633 (diff) | |
download | nutyx-extra-8b6ff40bc198c4db03a60bd18d94b34515c9632f.tar.gz nutyx-extra-8b6ff40bc198c4db03a60bd18d94b34515c9632f.tar.bz2 nutyx-extra-8b6ff40bc198c4db03a60bd18d94b34515c9632f.tar.xz nutyx-extra-8b6ff40bc198c4db03a60bd18d94b34515c9632f.zip |
qt, corrections
Diffstat (limited to 'extra/qt/qt-4.7.1-fix-qtbug-15857.patch')
-rw-r--r-- | extra/qt/qt-4.7.1-fix-qtbug-15857.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/extra/qt/qt-4.7.1-fix-qtbug-15857.patch b/extra/qt/qt-4.7.1-fix-qtbug-15857.patch new file mode 100644 index 000000000..4a0dfb8b1 --- /dev/null +++ b/extra/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 + |