summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2011-02-03 14:45:00 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2011-02-09 11:01:53 (GMT)
commit02500f25cc7ce5c7a9109c6cf433c79001e0594e (patch)
tree4e814fe59dba4f532e743668ac8608a56e0e0d1d
parent94244da8d4e7728a51da8ec49671b8993f2ab751 (diff)
downloadQt-02500f25cc7ce5c7a9109c6cf433c79001e0594e.zip
Qt-02500f25cc7ce5c7a9109c6cf433c79001e0594e.tar.gz
Qt-02500f25cc7ce5c7a9109c6cf433c79001e0594e.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. (cherry picked from commit 231dcfc8b6a90c3a0ab4869e0a9ab45403fd9a8c)
-rw-r--r--src/gui/kernel/qwidget_s60.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index b585968..1551162 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
@@ -511,6 +512,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);