diff options
author | Sami Merila <sami.merila@nokia.com> | 2011-03-23 12:42:06 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2011-03-23 12:42:06 (GMT) |
commit | 2d2af1cac203bb5d47c6a4b1ce23930bdb03b996 (patch) | |
tree | c3e372ff93f28c57edf3c25a1c15a0fc0aafb1ab /src/gui/inputmethod | |
parent | e06d2bc80672776fc4fb0ca8a3861a4f9d493133 (diff) | |
download | Qt-2d2af1cac203bb5d47c6a4b1ce23930bdb03b996.zip Qt-2d2af1cac203bb5d47c6a4b1ce23930bdb03b996.tar.gz Qt-2d2af1cac203bb5d47c6a4b1ce23930bdb03b996.tar.bz2 |
GraphicsViews: Focused widget is not visible after orientation change
Clean up previous fix a little bit, by merging if-statements.
Task-number: QTBUG-17576
Reviewed-by: Guoqing Zhang
Diffstat (limited to 'src/gui/inputmethod')
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 767b974..5fccf96 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -330,18 +330,20 @@ bool QCoeFepInputContext::symbianFilterEvent(QWidget *keyWidget, const QSymbianE // This should also happen for commands. reset(); - if (event->windowServerEvent() && event->windowServerEvent()->Type() == EEventWindowVisibilityChanged) { - if (S60->splitViewLastWidget) { - QGraphicsView *gv = qobject_cast<QGraphicsView*>(S60->splitViewLastWidget); - const bool alwaysResize = (gv && gv->verticalScrollBarPolicy() != Qt::ScrollBarAlwaysOff); - - if (alwaysResize) { - TUint visibleFlags = event->windowServerEvent()->VisibilityChanged()->iFlags; - if (visibleFlags & TWsVisibilityChangedEvent::EPartiallyVisible) - ensureFocusWidgetVisible(S60->splitViewLastWidget); - if (visibleFlags & TWsVisibilityChangedEvent::ENotVisible) - resetSplitViewWidget(true); - } + if (event->type() == QSymbianEvent::WindowServerEvent + && event->windowServerEvent() + && event->windowServerEvent()->Type() == EEventWindowVisibilityChanged + && S60->splitViewLastWidget) { + + QGraphicsView *gv = qobject_cast<QGraphicsView*>(S60->splitViewLastWidget); + const bool alwaysResize = (gv && gv->verticalScrollBarPolicy() != Qt::ScrollBarAlwaysOff); + + if (alwaysResize) { + TUint visibleFlags = event->windowServerEvent()->VisibilityChanged()->iFlags; + if (visibleFlags & TWsVisibilityChangedEvent::EPartiallyVisible) + ensureFocusWidgetVisible(S60->splitViewLastWidget); + if (visibleFlags & TWsVisibilityChangedEvent::ENotVisible) + resetSplitViewWidget(true); } } |