diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-05-09 01:00:49 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-05-09 13:06:11 +0000 |
commit | e56d3b03ed92743f33eb7ca1a5aa61dbdedaf19b (patch) | |
tree | c29a80a940cca1281014732aff4237c915f32dc4 /src/widgets/widgets | |
parent | 2a79af6b5c67eba6f967c7443bf73bbe11206a62 (diff) | |
parent | 9444416a46ee0e6bb0d9d9be9a4883b388644c59 (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
src/corelib/tools/qlocale_data_p.h
(Regenerated by running the scripts in util/local_database/)
src/gui/opengl/qopengltextureuploader.cpp
Done-With: Edward Welbourne <edward.welbourne@qt.io>
Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io>
Change-Id: I12df7f066ed0a25eb109f61c4b8d8dea63b683e2
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r-- | src/widgets/widgets/qlineedit.cpp | 6 | ||||
-rw-r--r-- | src/widgets/widgets/qwidgettextcontrol.cpp | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp index ad3d372bd3..3c0f0b791b 100644 --- a/src/widgets/widgets/qlineedit.cpp +++ b/src/widgets/widgets/qlineedit.cpp @@ -1369,6 +1369,12 @@ void QLineEdit::setReadOnly(bool enable) QEvent event(QEvent::ReadOnlyChange); QCoreApplication::sendEvent(this, &event); update(); +#ifndef QT_NO_ACCESSIBILITY + QAccessible::State changedState; + changedState.readOnly = true; + QAccessibleStateChangeEvent ev(this, changedState); + QAccessible::updateAccessibility(&ev); +#endif } } diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp index 711c4bfd2a..07d631cfe9 100644 --- a/src/widgets/widgets/qwidgettextcontrol.cpp +++ b/src/widgets/widgets/qwidgettextcontrol.cpp @@ -1972,6 +1972,8 @@ void QWidgetTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) || e->preeditString() != cursor.block().layout()->preeditAreaText() || e->replacementLength() > 0; + int oldCursorPos = cursor.position(); + cursor.beginEditBlock(); if (isGettingInput) { cursor.removeSelectedText(); @@ -2076,6 +2078,8 @@ void QWidgetTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) if (cursor.d) cursor.d->setX(); + if (oldCursorPos != cursor.position()) + emit q->cursorPositionChanged(); if (oldPreeditCursor != preeditCursor) emit q->microFocusChanged(); } |