diff options
author | axis <qt-info@nokia.com> | 2010-08-27 08:31:39 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2010-09-03 03:24:50 (GMT) |
commit | 100c82d636b0e1c98285f1a2bf044f2e4d854606 (patch) | |
tree | 563b440bf96dbc6c2ba1e68b0cc917cbdd86e10c | |
parent | 41b70c74dee1d3ae9ca33a007b0afe9cee51a980 (diff) | |
download | Qt-100c82d636b0e1c98285f1a2bf044f2e4d854606.zip Qt-100c82d636b0e1c98285f1a2bf044f2e4d854606.tar.gz Qt-100c82d636b0e1c98285f1a2bf044f2e4d854606.tar.bz2 |
Revert "Long-press shortcuts for symbols on QWERTY keyboard don't work"
This reverts commit 05eacd9ad40f8adb5aaa12a8b90113a73b43f642.
Conflicts:
src/gui/inputmethod/qcoefepinputcontext_p.h
src/gui/inputmethod/qcoefepinputcontext_s60.cpp
(cherry picked from commit c5901037f0d3ccd45b0c79b38ef5b04552dad0aa)
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_p.h | 1 | ||||
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 15 | ||||
-rw-r--r-- | src/gui/widgets/qlinecontrol.cpp | 2 |
3 files changed, 2 insertions, 16 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h index d5243c3..cc14e89 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_p.h +++ b/src/gui/inputmethod/qcoefepinputcontext_p.h @@ -151,7 +151,6 @@ private: int m_inlinePosition; MFepInlineTextFormatRetriever *m_formatRetriever; MFepPointerEventHandlerDuringInlineEdit *m_pointerHandler; - int m_cursorPos; QBasicTimer m_tempPreeditStringTimeout; bool m_hasTempPreeditString; }; diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 394d374..890c58b 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -79,7 +79,6 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent) m_inlinePosition(0), m_formatRetriever(0), m_pointerHandler(0), - m_cursorPos(0), m_hasTempPreeditString(false) { m_fepState->SetObjectProvider(this); @@ -581,8 +580,6 @@ void QCoeFepInputContext::StartFepInlineEditL(const TDesC& aInitialInlineText, commitTemporaryPreeditString(); - m_cursorPos = w->inputMethodQuery(Qt::ImCursorPosition).toInt(); - QList<QInputMethodEvent::Attribute> attributes; m_cursorVisibility = aCursorVisibility ? 1 : 0; @@ -805,23 +802,13 @@ void QCoeFepInputContext::commitCurrentString(bool cancelFepTransaction) { int longPress = 0; - if (m_preeditString.size() == 0) { - QWidget *w = focusWidget(); - if (!cancelFepTransaction && w) { - // We must replace the last character only if the input box has already accepted one - if (w->inputMethodQuery(Qt::ImCursorPosition).toInt() != m_cursorPos) - longPress = 1; - } - } - QList<QInputMethodEvent::Attribute> attributes; QInputMethodEvent event(QLatin1String(""), attributes); - event.setCommitString(m_preeditString, 0-longPress, longPress); + event.setCommitString(m_preeditString, 0, 0); m_preeditString.clear(); sendEvent(event); m_hasTempPreeditString = false; - longPress = 0; if (cancelFepTransaction) { CCoeFep* fep = CCoeEnv::Static()->Fep(); diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index d027b91..b6dfd13 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -419,7 +419,7 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event) int c = m_cursor; // cursor position after insertion of commit string - if (event->replacementStart() == 0) + if (event->replacementStart() <= 0) c += event->commitString().length() + qMin(-event->replacementStart(), event->replacementLength()); m_cursor += event->replacementStart(); |