diff options
author | axis <qt-info@nokia.com> | 2011-02-03 14:45:00 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2011-02-04 11:33:34 (GMT) |
commit | 231dcfc8b6a90c3a0ab4869e0a9ab45403fd9a8c (patch) | |
tree | a03869e7623c767227c159ae6ef1fef9f4f54d69 /src/gui/kernel | |
parent | 0c494b2c3d05a00f0cb167daed24730a2cc5815e (diff) | |
download | Qt-231dcfc8b6a90c3a0ab4869e0a9ab45403fd9a8c.zip Qt-231dcfc8b6a90c3a0ab4869e0a9ab45403fd9a8c.tar.gz Qt-231dcfc8b6a90c3a0ab4869e0a9ab45403fd9a8c.tar.bz2 |
Fixed a bug where the softkeys would leave a see-through "hole".
In cases where the widget was created from the event loop instead of
main(), the middle three softkeys would not get the right visibility
and would leave a "hole" in the application where one could see what
was beneath it. It could also be clicked, which would bring the app
to the background which was really annoying.
Fixed by setting the visibility manually upon creation. It should
still be possible to alter the visibility of the toolbar manually
after the widget creation, if someone requires that.
Task: QTBUG-16578
RevBy: Gareth Stockwell
AutoTest: N/A, but tested with various combinations of fullscreen,
non-fullscreen and softkey visibility modes. No
regressions.
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 8e4e99a..6af809f 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -54,6 +54,7 @@ #ifdef Q_WS_S60 #include <aknappui.h> +#include <akntoolbar.h> #include <eikbtgpc.h> #endif @@ -508,6 +509,18 @@ void QWidgetPrivate::show_sys() Q_ASSERT(!oldCba); S60->setButtonGroupContainer(cba); + // If the creation of the first widget is delayed, for example by doing it + // inside the event loop, S60 somehow "forgets" to set the visibility of the + // toolbar (the three middle softkeys) when you flip the phone over, so we + // need to do it ourselves to avoid a "hole" in the application, even though + // Qt itself does not use the toolbar directly.. + CAknAppUi *appui = dynamic_cast<CAknAppUi *>(CEikonEnv::Static()->AppUi()); + if (appui) { + CAknToolbar *toolbar = appui->PopupToolbar(); + if (toolbar && !toolbar->IsVisible()) + toolbar->SetToolbarVisibility(ETrue); + } + CEikMenuBar *menuBar = new(ELeave) CEikMenuBar; menuBar->ConstructL(ui, 0, R_AVKON_MENUPANE_EMPTY); menuBar->SetMenuType(CEikMenuBar::EMenuOptions); |