summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2009-09-09 15:42:07 (GMT)
committermae <qt-info@nokia.com>2009-09-09 15:45:38 (GMT)
commitea6c2a63fc0cdb452c7ed7ccfc8bab9cc1ef52f7 (patch)
treef8fef93d32284b57074e0aa4defee0e2a7b0c476 /src/gui/text
parent07880542ecc479807c23c5646d263135240822ff (diff)
downloadQt-ea6c2a63fc0cdb452c7ed7ccfc8bab9cc1ef52f7.zip
Qt-ea6c2a63fc0cdb452c7ed7ccfc8bab9cc1ef52f7.tar.gz
Qt-ea6c2a63fc0cdb452c7ed7ccfc8bab9cc1ef52f7.tar.bz2
Fix crash (assert) in QTextDocument
When loading binary files as text, QTextCursor did not check for beginning and end of frame (QChar(0xfdd0) and QChar(0xfdd1)), while QTextDocument asserted that those characters were absent. The patch makes QTextCursor::insertText() treat frame bounderies like paragraph separators. Reviewed-by: ck
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qtextcursor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index 4e367c9..8b85d2d 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -1328,6 +1328,8 @@ void QTextCursor::insertText(const QString &text, const QTextCharFormat &_format
if (ch == QLatin1Char('\n')
|| ch == QChar::ParagraphSeparator
+ || ch == QTextBeginningOfFrame
+ || ch == QTextEndOfFrame
|| ch == QLatin1Char('\r')) {
if (!hasEditBlock) {