diff options
author | Pekka Vuorela <pekka.ta.vuorela@nokia.com> | 2011-10-12 11:08:00 +0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-05 23:47:02 +0100 |
commit | 8bd40fef0733a4796a308b3bc137a05296e142c4 (patch) | |
tree | 10ff24637ab73cd1516bda8c39bd121aac412e97 /src/gui/kernel/qevent.cpp | |
parent | 4b3d88a9c67402b6a234d597bab25846f039bbdb (diff) |
Support tentative commit string with input method.
Tentative commit string allows input method to notify editor
what is expected to be committed in the place of preedit.
This commit adds such support in QLineEdit.
Change-Id: If855619bc6843652db0d6254f7e7063bb8ad0936
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/gui/kernel/qevent.cpp')
-rw-r--r-- | src/gui/kernel/qevent.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index ba81e5512c..2c0858ae00 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -1644,6 +1644,17 @@ void QInputMethodEvent::setCommitString(const QString &commitString, int replace } /*! + Sets the tentative commit string to \a tentativeCommitString. + + The tentative commit string is what the preedit string is expected to be committed as. + The string can be used within the editor to trigger code that reacts on text changes such as validators. +*/ +void QInputMethodEvent::setTentativeCommitString(const QString &tentativeCommitString) +{ + tentativeCommit = tentativeCommitString; +} + +/*! \fn const QList<Attribute> &QInputMethodEvent::attributes() const Returns the list of attributes passed to the QInputMethodEvent @@ -1692,6 +1703,14 @@ void QInputMethodEvent::setCommitString(const QString &commitString, int replace \sa replacementStart(), setCommitString() */ +/*! + \fn const QString &tentativeCommitString() const + + Returns the text as which preedit string is expected to be committed as. + The string can be used within the editor to trigger code that reacts on text changes such as validators. + + \sa setTentativeCommitString() +*/ /*! \class QInputMethodQueryEvent |