diff options
| author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-11-16 08:59:05 +0100 |
|---|---|---|
| committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-11-16 09:05:49 +0100 |
| commit | 021a8ce5f767d2fdeb72cebc6d6e8bb08b87f24d (patch) | |
| tree | 8611afe7c2c906159896faee82a033b284850785 /src/widgets/kernel/qwidget.cpp | |
| parent | dba45c72729e3a250badaacafb39cf8d1798f940 (diff) | |
Give QWidget::updateMicroFocus a parameter with default
This allows for potential optimizations in widgets, e.g. no need to for the
input method to query all data when only the cursor position changed.
Change-Id: Idd1e554acd776ed4d225197ce80915d651ede904
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
| -rw-r--r-- | src/widgets/kernel/qwidget.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 5890ee4702e..4cc24499fc4 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -11473,13 +11473,13 @@ void QWidget::setShortcutAutoRepeat(int id, bool enable) #endif // QT_NO_SHORTCUT /*! - Updates the widget's micro focus. + Updates the widget's micro focus and informs input methods + that the state specified by \a query has changed. */ -void QWidget::updateMicroFocus() +void QWidget::updateMicroFocus(Qt::InputMethodQuery query) { - // updating everything since this is currently called for any kind of state change if (this == QGuiApplication::focusObject()) - QGuiApplication::inputMethod()->update(Qt::ImQueryAll); + QGuiApplication::inputMethod()->update(query); } /*! |
