summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativetextedit.cpp
diff options
context:
space:
mode:
authorJoona Petrell <joona.t.petrell@nokia.com>2010-07-22 04:50:01 (GMT)
committerJoona Petrell <joona.t.petrell@nokia.com>2010-07-22 05:28:30 (GMT)
commit0767c2ff719a35c16c72fac97e6ff612e8c71e21 (patch)
tree1d7d140fc328132dface53d3afae7591661d428d /src/declarative/graphicsitems/qdeclarativetextedit.cpp
parentddb5e1eef379c7f32a594d91b00ff3514c46b62a (diff)
downloadQt-0767c2ff719a35c16c72fac97e6ff612e8c71e21.zip
Qt-0767c2ff719a35c16c72fac97e6ff612e8c71e21.tar.gz
Qt-0767c2ff719a35c16c72fac97e6ff612e8c71e21.tar.bz2
Fix TextEdit text attribute and text stored in the internal QTextDocument having different contents
Task-number: QTBUG-12339 Reviewed-by: Martin Jones
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetextedit.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index f7b2ebf..8117676 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -256,7 +256,6 @@ void QDeclarativeTextEdit::setText(const QString &text)
Q_D(QDeclarativeTextEdit);
if (QDeclarativeTextEdit::text() == text)
return;
- d->text = text;
d->richText = d->format == RichText || (d->format == AutoText && Qt::mightBeRichText(text));
if (d->richText) {
#ifndef QT_NO_TEXTHTMLPARSER
@@ -1291,9 +1290,11 @@ void QDeclarativeTextEditPrivate::init()
void QDeclarativeTextEdit::q_textChanged()
{
+ Q_D(QDeclarativeTextEdit);
+ d->text = text();
updateSize();
updateMicroFocus();
- emit textChanged(text());
+ emit textChanged(d->text);
}
void QDeclarativeTextEdit::moveCursorDelegate()