diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-17 23:11:22 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-17 23:11:22 (GMT) |
commit | 2c07b5d2cba8d8e499bd0861eefef12d4e00d99a (patch) | |
tree | 3e6b31daecfe217b355fa973f2f122da8468c0ac /src/gui/inputmethod | |
parent | cb2980a09aefcc207eacb500d5a3c74f064859dd (diff) | |
parent | 3773fcb78db02a2577c89f755c07c2c7dbf0de74 (diff) | |
download | Qt-2c07b5d2cba8d8e499bd0861eefef12d4e00d99a.zip Qt-2c07b5d2cba8d8e499bd0861eefef12d4e00d99a.tar.gz Qt-2c07b5d2cba8d8e499bd0861eefef12d4e00d99a.tar.bz2 |
Merge branch 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: (55 commits)
Fix thread safety regression of QNetworkConfigurationManager
Fix instability in QNetworkConfigurationManager autotest
Support word selection list with predictive text from splitview
Fix softkey icon positioning in S60 5.3
QDeclarativeMouseArea: block context menu events
ListViews loses items if all visible items are removed.
Make TextEdit word selection more natural.
Clear confusion between QMainWindow and QMainWindowLayout.
Fix for rounded corners bug in QMenu
Compile
QWidgetPrivate::setParent_sys might be using null pointer
Ensure the TextEdit cursor delegate is repositioned on mouse events.
Don't crash on an invalid replacementStart from an input method.
Fix incorrect hardware address on systems without getifaddrs()
Enable multisampling on Symbian if hw supports it
Fix QtCoreu.def file error
Introduce platform extension to QGraphicsSystem
Fix Symbian/WinsCW build break
Prevent crash in OpenGL engine when scaling images / pixmaps.
emit QNetWorkAccessManager::finished on QNetworkReply::abort()
...
Diffstat (limited to 'src/gui/inputmethod')
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index a4d53c0..23109e1 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); + } } } |