summaryrefslogtreecommitdiffstats
path: root/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-05-29 15:12:13 +0200
committeraxis <qt-info@nokia.com>2009-06-03 13:16:40 +0200
commit48e3dc574f24f31d9506e7fcf2ec53e1c9638684 (patch)
tree54576020a1ba22ab647904259e69a85c72b24bcb /src/gui/inputmethod/qcoefepinputcontext_s60.cpp
parent0cd99b1b5363a0e06dd660ba0322ef216481f8f7 (diff)
Made S60 FEP use the new QInputMethodEvent::Selection API.
Diffstat (limited to 'src/gui/inputmethod/qcoefepinputcontext_s60.cpp')
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 92018e71e5..bdc79a84da 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