summaryrefslogtreecommitdiffstats
path: root/src/gui/inputmethod
diff options
context:
space:
mode:
authorJyri Tahtela <jyri.tahtela@nokia.com>2011-05-18 07:41:09 (GMT)
committerJyri Tahtela <jyri.tahtela@nokia.com>2011-05-18 07:41:09 (GMT)
commit9cacde74f7de702689725882633073e60c0a2baa (patch)
tree330d22dadbd28b14a7d8896823d1c33597e9993e /src/gui/inputmethod
parent006c8e22075112eff6230d8168d716e44a9e29d5 (diff)
parent2c07b5d2cba8d8e499bd0861eefef12d4e00d99a (diff)
downloadQt-9cacde74f7de702689725882633073e60c0a2baa.zip
Qt-9cacde74f7de702689725882633073e60c0a2baa.tar.gz
Qt-9cacde74f7de702689725882633073e60c0a2baa.tar.bz2
Merge remote-tracking branch 'qt/4.8'
Conflicts: doc/src/examples/wheel.qdoc src/gui/util/qflickgesture.cpp src/gui/util/qflickgesture_p.h src/gui/util/qscroller.cpp src/gui/util/qscroller.h src/gui/util/qscroller_p.h src/gui/util/qscrollerproperties.cpp src/gui/util/qscrollerproperties.h tests/auto/qscroller/tst_qscroller.cpp
Diffstat (limited to 'src/gui/inputmethod')
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp47
1 files changed, 24 insertions, 23 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index edcd9a7..daa448b 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -240,21 +240,6 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event)
return false;
switch (event->type()) {
- case QEvent::MouseButtonPress:
- // Alphanumeric keypad doesn't like it when we click and text is still getting displayed
- // It ignores the mouse event, so we need to commit and send a selection event (which will get triggered
- // after the commit)
- if (!m_preeditString.isEmpty()) {
- commitCurrentString(true);
-
- int pos = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt();
-
- QList<QInputMethodEvent::Attribute> selectAttributes;
- selectAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, pos, 0, QVariant());
- QInputMethodEvent selectEvent(QLatin1String(""), selectAttributes);
- sendEvent(selectEvent);
- }
- break;
case QEvent::KeyPress:
commitTemporaryPreeditString();
// fall through intended
@@ -333,7 +318,10 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event)
if (sControl) {
sControl->setIgnoreFocusChanged(false);
}
- return true;
+ //If m_pointerHandler has already been set, it means that fep inline editing is in progress.
+ //When this is happening, do not filter out pointer events.
+ if (!m_pointerHandler)
+ return true;
}
return false;
@@ -385,18 +373,31 @@ void QCoeFepInputContext::commitTemporaryPreeditString()
commitCurrentString(false);
}
-void QCoeFepInputContext::mouseHandler( int x, QMouseEvent *event)
+void QCoeFepInputContext::mouseHandler(int x, QMouseEvent *event)
{
Q_ASSERT(focusWidget());
if (event->type() == QEvent::MouseButtonPress && event->button() == Qt::LeftButton) {
- commitCurrentString(true);
- int pos = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt();
+ QWidget *proxy = focusWidget()->focusProxy();
+ Qt::InputMethodHints currentHints = proxy ? proxy->inputMethodHints() : focusWidget()->inputMethodHints();
+
+ //If splitview is open and T9 word is tapped, pass the pointer event to pointer handler.
+ //This will open the "suggested words" list. Pass pointer position always as zero, to make
+ //full word replacement in case user makes a selection.
+ if (S60->partial_keyboard && S60->partialKeyboardOpen
+ && m_pointerHandler
+ && !(currentHints & Qt::ImhNoPredictiveText)
+ && (x > 0 && x < m_preeditString.length())) {
+ m_pointerHandler->HandlePointerEventInInlineTextL(TPointerEvent::EButton1Up, 0, 0);
+ } else {
+ commitCurrentString(true);
+ int pos = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt();
- QList<QInputMethodEvent::Attribute> attributes;
- attributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, pos + x, 0, QVariant());
- QInputMethodEvent event(QLatin1String(""), attributes);
- sendEvent(event);
+ QList<QInputMethodEvent::Attribute> attributes;
+ attributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, pos + x, 0, QVariant());
+ QInputMethodEvent event(QLatin1String(""), attributes);
+ sendEvent(event);
+ }
}
}