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>
bb10
Andrew den Exter 2011-09-27 17:21:16 +10:00 committed by Qt by Nokia
parent fff26f6287
commit 4bbcbec3fa
1 changed files with 3 additions and 3 deletions

View File

@ -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);
#ifdef QT_NO_ACCESSIBILITY
Q_UNUSED(edited)
#else
bool changed = finishChange(-1, true, edited);
#ifdef QT_NO_ACCESSIBILITY
Q_UNUSED(changed)
#else
if (changed)
QAccessible::updateAccessibility(parent(), 0, QAccessible::TextUpdated);
#endif