diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-12 11:06:25 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-12 11:06:25 (GMT) |
commit | 1bcbd8aa87db82f045b935861510ee7480578f04 (patch) | |
tree | 2b01a5c2a3d7e68d9d9a453f2613c8f3366b5f91 /src/gui | |
parent | ec171d35582ea440a1a790296e1875876ae7c568 (diff) | |
parent | d32a818ecb2e707e548f2ad7a5222062db7edf32 (diff) | |
download | Qt-1bcbd8aa87db82f045b935861510ee7480578f04.zip Qt-1bcbd8aa87db82f045b935861510ee7480578f04.tar.gz Qt-1bcbd8aa87db82f045b935861510ee7480578f04.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Fix crash with QTextEdit::textChanged() when deleting a character
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/text/qtextcontrol.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index aaaa3ca..2206e5e 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -1199,7 +1199,8 @@ void QTextControlPrivate::keyPressEvent(QKeyEvent *e) blockFmt.setIndent(blockFmt.indent() - 1); cursor.setBlockFormat(blockFmt); } else { - cursor.deletePreviousChar(); + QTextCursor localCursor = cursor; + localCursor.deletePreviousChar(); } goto accept; } @@ -1232,7 +1233,8 @@ void QTextControlPrivate::keyPressEvent(QKeyEvent *e) } #endif else if (e == QKeySequence::Delete) { - cursor.deleteChar(); + QTextCursor localCursor = cursor; + localCursor.deleteChar(); } else if (e == QKeySequence::DeleteEndOfWord) { if (!cursor.hasSelection()) |