Added QInputPanel::commit()
To be called when input context is expected to commit what it had as preedit, and resetting its state. Earlier this was done with ::reset() when in fact documentation somewhat disallowed doing so. Change-Id: I10ad0620aa42fce6d01a69265af8a4f5f9f4d397 Reviewed-on: http://codereview.qt-project.org/4401 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Vesa Rantanen <vesa.rantanen@nokia.com>
This commit is contained in:
parent
53d549fe76
commit
6d9d1e78f4
@ -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();
|
||||
|
@ -97,6 +97,7 @@ public Q_SLOTS:
|
||||
|
||||
void update(Qt::InputMethodQueries queries);
|
||||
void reset();
|
||||
void commit();
|
||||
|
||||
void invokeAction(Action a, int cursorPosition);
|
||||
|
||||
|
@ -56,6 +56,10 @@ void QPlatformInputContext::reset()
|
||||
{
|
||||
}
|
||||
|
||||
void QPlatformInputContext::commit()
|
||||
{
|
||||
}
|
||||
|
||||
void QPlatformInputContext::update(Qt::InputMethodQueries)
|
||||
{
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user