diff options
author | Sami Merila <sami.merila@nokia.com> | 2011-04-08 07:07:16 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2011-04-08 07:07:16 (GMT) |
commit | 2213f812acb023f7f52d930c30c0ea7a170629bf (patch) | |
tree | a3a09d471863c46122d1b7beba4913e535a4a00b /src/gui/inputmethod | |
parent | 63064c275481d0e694838e90dead784b53dc10aa (diff) | |
download | Qt-2213f812acb023f7f52d930c30c0ea7a170629bf.zip Qt-2213f812acb023f7f52d930c30c0ea7a170629bf.tar.gz Qt-2213f812acb023f7f52d930c30c0ea7a170629bf.tar.bz2 |
GraphicsView is not reset if focusItem is not set when keyboard closes
When splitview closes (i.e. keyboard is dismissed), application's
graphicsview containing the input widget (focus item) is reset back to
original graphicsview transformation.
As a fix, resetTransform is always called, when rootItem is found
from graphicsView.
Task-number: QT-4858
Reviewed-by: Guoqing Zhang
Diffstat (limited to 'src/gui/inputmethod')
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 3b5290c..868565d 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -410,12 +410,14 @@ void QCoeFepInputContext::resetSplitViewWidget(bool keepInputWidget) windowToMove->setUpdatesEnabled(false); if (!alwaysResize) { - if (gv->scene() && gv->scene()->focusItem()) { - // 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)); - if (index != -1) - disconnect(gv->scene()->focusItem()->toGraphicsObject(), SIGNAL(cursorPositionChanged()), this, SLOT(translateInputWidget())); + if (gv->scene()) { + if (gv->scene()->focusItem()) { + // 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)); + if (index != -1) + disconnect(gv->scene()->focusItem()->toGraphicsObject(), SIGNAL(cursorPositionChanged()), this, SLOT(translateInputWidget())); + } QGraphicsItem *rootItem = 0; foreach (QGraphicsItem *item, gv->scene()->items()) { |