wok diff qt4/stuff/fix-qtbug-15857.patch @ rev 8959

Updated conky, xcircuit, xpad depends.
author Christopher Rogers <slaxemulator@gmail.com>
date Tue Mar 01 19:10:42 2011 +0000 (2011-03-01)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/qt4/stuff/fix-qtbug-15857.patch	Tue Mar 01 19:10:42 2011 +0000
     1.3 @@ -0,0 +1,32 @@
     1.4 +From 6ae84f1183e91c910ca92a55e37f8254ace805c0 Mon Sep 17 00:00:00 2001
     1.5 +From: Jiang Jiang <jiang.jiang@nokia.com>
     1.6 +Date: Mon, 6 Dec 2010 13:07:36 +0100
     1.7 +Subject: [PATCH] Fix QTextEdit::selectAll crash from textChanged()
     1.8 +
     1.9 +Doing selectAll() after the entire block of text has been removed
    1.10 +will cause this crash, because we didn't check if the block we
    1.11 +found is valid or not.
    1.12 +
    1.13 +Task-number: QTBUG-15857
    1.14 +Reviewed-by: Eskil
    1.15 +---
    1.16 + src/gui/text/qtextcursor.cpp |    3 +++
    1.17 + 1 files changed, 3 insertions(+), 0 deletions(-)
    1.18 +
    1.19 +diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
    1.20 +index 769ab2f..f73cc4b 100644
    1.21 +--- a/src/gui/text/qtextcursor.cpp
    1.22 ++++ b/src/gui/text/qtextcursor.cpp
    1.23 +@@ -363,6 +363,9 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor
    1.24 +     bool adjustX = true;
    1.25 +     QTextBlock blockIt = block();
    1.26 + 
    1.27 ++    if (!blockIt.isValid())
    1.28 ++        return false;
    1.29 ++
    1.30 +     if (op >= QTextCursor::Left && op <= QTextCursor::WordRight
    1.31 +         && blockIt.textDirection() == Qt::RightToLeft) {
    1.32 +         if (op == QTextCursor::Left)
    1.33 +-- 
    1.34 +1.6.1
    1.35 +