summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2011-09-27 17:21:16 +1000
committerQt by Nokia <qt-info@nokia.com>2011-09-27 09:58:44 +0200
commit4bbcbec3fa514ebadfb1cd3826925239598fcaa1 (patch)
tree8eed9be6f3b8ada9373a1d72b07b3d9729d184e4
parentfff26f62877f947e5cf67276cefa69ce064783de (diff)
Update QLineControl's state correctly with QT_NO_ACCESSIBLITY.
Always call finishChange in setText, not just when QT_NO_ACCESSIBILITY is undefined, otherwise lots of things don't get updated. Task-number: QTBUG-21686 Change-Id: I58b320814fb379b462e39b7e675fe6e9fc41ba8a Reviewed-on: http://codereview.qt-project.org/5594 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
-rw-r--r--src/gui/text/qlinecontrol.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/text/qlinecontrol.cpp b/src/gui/text/qlinecontrol.cpp
index 0113f4b176..33de367d96 100644
--- a/src/gui/text/qlinecontrol.cpp
+++ b/src/gui/text/qlinecontrol.cpp
@@ -654,10 +654,10 @@ void QLineControl::internalSetText(const QString &txt, int pos, bool edited)
m_cursor = (pos < 0 || pos > m_text.length()) ? m_text.length() : pos;
m_textDirty = (oldText != m_text);
+ bool changed = finishChange(-1, true, edited);
#ifdef QT_NO_ACCESSIBILITY
- Q_UNUSED(edited)
+ Q_UNUSED(changed)
#else
- bool changed = finishChange(-1, true, edited);
if (changed)
QAccessible::updateAccessibility(parent(), 0, QAccessible::TextUpdated);
#endif