From 76bc2663dd926b987be6fb880ae95ff964014e0f Mon Sep 17 00:00:00 2001 From: Pekka Vuorela Date: Tue, 28 Feb 2012 14:23:36 +0200 Subject: [PATCH] Deprecate QInputMethodEvent::setTentativeCommitString() Free form tentative commit proved to require too much fiddling on rendered text vs. logical content. Needs simpler mechanism. Change-Id: Ia4e341abf342d25675fd1129efb11094dde410b2 Reviewed-by: Joona Petrell --- src/gui/kernel/qevent.cpp | 2 ++ src/gui/kernel/qevent.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index e8ed5c0765..436ed56ea0 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -1698,6 +1698,7 @@ void QInputMethodEvent::setCommitString(const QString &commitString, int replace 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. + \deprecated */ void QInputMethodEvent::setTentativeCommitString(const QString &tentativeCommitString) { @@ -1758,6 +1759,7 @@ void QInputMethodEvent::setTentativeCommitString(const QString &tentativeCommitS 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. + \deprecated \sa setTentativeCommitString() */ diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index d70f6be201..a042922f61 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -444,7 +444,7 @@ public: QInputMethodEvent(); QInputMethodEvent(const QString &preeditText, const QList &attributes); void setCommitString(const QString &commitString, int replaceFrom = 0, int replaceLength = 0); - void setTentativeCommitString(const QString &tentativeCommitString); + QT_DEPRECATED void setTentativeCommitString(const QString &tentativeCommitString); inline const QList &attributes() const { return attrs; } inline const QString &preeditString() const { return preedit; } @@ -452,7 +452,7 @@ public: inline const QString &commitString() const { return commit; } inline int replacementStart() const { return replace_from; } inline int replacementLength() const { return replace_length; } - inline const QString &tentativeCommitString() const { return tentativeCommit; } + QT_DEPRECATED inline const QString &tentativeCommitString() const { return tentativeCommit; } QInputMethodEvent(const QInputMethodEvent &other);