diff options
author | axis <qt-info@nokia.com> | 2009-05-29 13:12:13 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-06-03 11:16:40 (GMT) |
commit | 48e3dc574f24f31d9506e7fcf2ec53e1c9638684 (patch) | |
tree | 54576020a1ba22ab647904259e69a85c72b24bcb /src/gui/inputmethod | |
parent | 0cd99b1b5363a0e06dd660ba0322ef216481f8f7 (diff) | |
download | Qt-48e3dc574f24f31d9506e7fcf2ec53e1c9638684.zip Qt-48e3dc574f24f31d9506e7fcf2ec53e1c9638684.tar.gz Qt-48e3dc574f24f31d9506e7fcf2ec53e1c9638684.tar.bz2 |
Made S60 FEP use the new QInputMethodEvent::Selection API.
Diffstat (limited to 'src/gui/inputmethod')
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 92018e7..bdc79a8 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -636,13 +636,13 @@ void QCoeFepInputContext::SetCursorSelectionForFepL(const TCursorSelection& aCur if (!w) return; - int pos = w->inputMethodQuery(Qt::ImCursorPosition).toInt() + aCursorSelection.iCursorPos + 1; + int pos = aCursorSelection.iAnchorPos; + int length = aCursorSelection.iCursorPos - pos; QList<QInputMethodEvent::Attribute> attributes; - attributes << QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, pos, 1, QVariant()); + attributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, pos, length, QVariant()); QInputMethodEvent event(m_preeditString, attributes); - // ### FIXME Sets preeditcursor and not cursor. Probably needs new API. - //sendEvent(event); + sendEvent(event); } void QCoeFepInputContext::GetCursorSelectionForFep(TCursorSelection& aCursorSelection) const |