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>
This commit is contained in:
parent
dba45c7272
commit
021a8ce5f7
@ -11473,13 +11473,13 @@ void QWidget::setShortcutAutoRepeat(int id, bool enable)
|
|||||||
#endif // QT_NO_SHORTCUT
|
#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())
|
if (this == QGuiApplication::focusObject())
|
||||||
QGuiApplication::inputMethod()->update(Qt::ImQueryAll);
|
QGuiApplication::inputMethod()->update(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -667,7 +667,7 @@ public:
|
|||||||
void setInputMethodHints(Qt::InputMethodHints hints);
|
void setInputMethodHints(Qt::InputMethodHints hints);
|
||||||
|
|
||||||
protected Q_SLOTS:
|
protected Q_SLOTS:
|
||||||
void updateMicroFocus();
|
void updateMicroFocus(Qt::InputMethodQuery query = Qt::ImQueryAll);
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
void create(WId = 0, bool initializeWindow = true,
|
void create(WId = 0, bool initializeWindow = true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user