summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorPekka Vuorela <pekka.ta.vuorela@nokia.com>2012-03-20 18:52:50 +0200
committerQt by Nokia <qt-info@nokia.com>2012-03-21 12:33:49 +0100
commita80d2c73c1ec98c5b3d3d9319a735d822d6b5dff (patch)
treec593ceebd5daa43aa48a9eb19df78d81defbb92f /src/widgets/widgets
parent0f9e98a5861326dfe57fc42dd298ca66b183bf63 (diff)
Fix QWidgetTextController issue when used with QtQuick1 TextEdit
Calling QInputMethod::invokeAction() was not checking for proper event type and was requiring context widget unnecessarily. Fixes some parts of QTBUG-24035 Change-Id: I51fe9ed02a018ced36319eb672a088503649b275 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp
index 9eeffc1231..86dfb30389 100644
--- a/src/widgets/widgets/qwidgettextcontrol.cpp
+++ b/src/widgets/widgets/qwidgettextcontrol.cpp
@@ -1829,7 +1829,7 @@ bool QWidgetTextControlPrivate::sendMouseEventToInputContext(
#if !defined(QT_NO_IM)
Q_Q(QWidgetTextControl);
- if (contextWidget && isPreediting()) {
+ if (isPreediting()) {
QTextLayout *layout = cursor.block().layout();
int cursorPos = q->hitTest(pos, Qt::FuzzyHit) - cursor.position();
@@ -1837,7 +1837,7 @@ bool QWidgetTextControlPrivate::sendMouseEventToInputContext(
cursorPos = -1;
if (cursorPos >= 0) {
- if (e->type() == QEvent::MouseButtonRelease)
+ if (eventType == QEvent::MouseButtonRelease)
qApp->inputMethod()->invokeAction(QInputMethod::Click, cursorPos);
e->setAccepted(true);