From 4bbcbec3fa514ebadfb1cd3826925239598fcaa1 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Tue, 27 Sep 2011 17:21:16 +1000 Subject: 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 Reviewed-by: Friedemann Kleint --- src/gui/text/qlinecontrol.cpp | 4 ++-- 1 file 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 -- cgit v1.2.3