diff --git a/src/gui/kernel/qinputpanel.cpp b/src/gui/kernel/qinputpanel.cpp index a11a5d47a6..5219adecf1 100644 --- a/src/gui/kernel/qinputpanel.cpp +++ b/src/gui/kernel/qinputpanel.cpp @@ -162,6 +162,13 @@ void QInputPanel::reset() ic->reset(); } +void QInputPanel::commit() +{ + QPlatformInputContext *ic = QGuiApplicationPrivate::platformIntegration()->inputContext(); + if (ic) + ic->commit(); +} + void QInputPanel::invokeAction(Action a, int cursorPosition) { QPlatformInputContext *ic = QGuiApplicationPrivate::platformIntegration()->inputContext(); diff --git a/src/gui/kernel/qinputpanel.h b/src/gui/kernel/qinputpanel.h index b0f0e2387b..c16a18eea9 100644 --- a/src/gui/kernel/qinputpanel.h +++ b/src/gui/kernel/qinputpanel.h @@ -97,6 +97,7 @@ public Q_SLOTS: void update(Qt::InputMethodQueries queries); void reset(); + void commit(); void invokeAction(Action a, int cursorPosition); diff --git a/src/gui/kernel/qplatforminputcontext_qpa.cpp b/src/gui/kernel/qplatforminputcontext_qpa.cpp index 32800833ab..328d4f5b74 100644 --- a/src/gui/kernel/qplatforminputcontext_qpa.cpp +++ b/src/gui/kernel/qplatforminputcontext_qpa.cpp @@ -56,6 +56,10 @@ void QPlatformInputContext::reset() { } +void QPlatformInputContext::commit() +{ +} + void QPlatformInputContext::update(Qt::InputMethodQueries) { } diff --git a/src/gui/kernel/qplatforminputcontext_qpa.h b/src/gui/kernel/qplatforminputcontext_qpa.h index 3bdce73019..1720e634c7 100644 --- a/src/gui/kernel/qplatforminputcontext_qpa.h +++ b/src/gui/kernel/qplatforminputcontext_qpa.h @@ -60,6 +60,7 @@ public: virtual ~QPlatformInputContext(); virtual void reset(); + virtual void commit(); virtual void update(Qt::InputMethodQueries); virtual void invokeAction(QInputPanel::Action, int cursorPosition);