summaryrefslogtreecommitdiff
path: root/src/gui/text
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-12 13:06:25 +0200
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-12 13:06:25 +0200
commit1bcbd8aa87db82f045b935861510ee7480578f04 (patch)
tree2b01a5c2a3d7e68d9d9a453f2613c8f3366b5f91 /src/gui/text
parentec171d35582ea440a1a790296e1875876ae7c568 (diff)
parentd32a818ecb2e707e548f2ad7a5222062db7edf32 (diff)
downloadqt4-tools-1bcbd8aa87db82f045b935861510ee7480578f04.tar.gz
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/text')
-rw-r--r--src/gui/text/qtextcontrol.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index aaaa3caec5..2206e5e241 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())