summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2010-07-08 16:34:35 (GMT)
committermae <qt-info@nokia.com>2010-07-08 16:34:35 (GMT)
commit3cf6e87b17d6ca722eea804d8e758879836f63fd (patch)
tree37dd47df3007cdc6f05a0bedff96f7a8155a3220 /src/gui
parentb22a5e13003ff9f23b075284a1a1e0a6b0e46250 (diff)
downloadQt-3cf6e87b17d6ca722eea804d8e758879836f63fd.zip
Qt-3cf6e87b17d6ca722eea804d8e758879836f63fd.tar.gz
Qt-3cf6e87b17d6ca722eea804d8e758879836f63fd.tar.bz2
Fix crash
Got introduced with change f62f6effab8d1551d8e5e5843dc478addee96de1 Reviewed-by: Roberto Raggi
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qtextcursor.cpp1
-rw-r--r--src/gui/text/qtextdocument_p.cpp5
2 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index 63aa946..daa40a1 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -81,6 +81,7 @@ QTextCursorPrivate::QTextCursorPrivate(const QTextCursorPrivate &rhs)
currentCharFormat = rhs.currentCharFormat;
visualNavigation = rhs.visualNavigation;
keepPositionOnInsert = rhs.keepPositionOnInsert;
+ changed = rhs.changed;
priv->addCursor(this);
}
diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp
index 54bf36b..7b3f985 100644
--- a/src/gui/text/qtextdocument_p.cpp
+++ b/src/gui/text/qtextdocument_p.cpp
@@ -1229,12 +1229,15 @@ void QTextDocumentPrivate::finishEdit()
}
}
+ QList<QTextCursor> changedCursors;
foreach (QTextCursorPrivate *curs, cursors) {
if (curs->changed) {
curs->changed = false;
- emit q->cursorPositionChanged(QTextCursor(curs));
+ changedCursors.append(QTextCursor(curs));
}
}
+ foreach (const QTextCursor &cursor, changedCursors)
+ emit q->cursorPositionChanged(cursor);
contentsChanged();