From de12ff38f2be5362321aa8e79cfbfd9692e18ab0 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Tue, 16 Aug 2011 14:02:42 +0300 Subject: Disabled splitscreen translation still moves screen Do not connect (or disconnect) signal cursorPositionChanged() to slot translateInputWidget() if auto-translation of splitview is disabled. Task-number: QTBUG-20813 Reviewed-by: Miikka Heikkinen --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index c3d293b..d0dda83 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -474,7 +474,7 @@ void QCoeFepInputContext::resetSplitViewWidget(bool keepInputWidget) if (!alwaysResize) { if (gv->scene()) { - if (gv->scene()->focusItem()) { + if (gv->scene()->focusItem() && S60->partial_keyboardAutoTranslation) { // Check if the widget contains cursorPositionChanged signal and disconnect from it. QByteArray signal = QMetaObject::normalizedSignature(SIGNAL(cursorPositionChanged())); int index = gv->scene()->focusItem()->toGraphicsObject()->metaObject()->indexOfSignal(signal.right(signal.length() - 1)); @@ -580,7 +580,7 @@ void QCoeFepInputContext::ensureFocusWidgetVisible(QWidget *widget) if (!moveWithinVisibleArea) { // Check if the widget contains cursorPositionChanged signal and connect to it. QByteArray signal = QMetaObject::normalizedSignature(SIGNAL(cursorPositionChanged())); - if (gv->scene() && gv->scene()->focusItem()) { + if (gv->scene() && gv->scene()->focusItem() && S60->partial_keyboardAutoTranslation) { int index = gv->scene()->focusItem()->toGraphicsObject()->metaObject()->indexOfSignal(signal.right(signal.length() - 1)); if (index != -1) connect(gv->scene()->focusItem()->toGraphicsObject(), SIGNAL(cursorPositionChanged()), this, SLOT(translateInputWidget())); -- cgit v0.12