summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_s60.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-04-07 15:13:08 +0200
committerOlivier Goffart <olivier.goffart@nokia.com>2011-04-07 15:14:27 +0200
commit7c8980ee041e874a6c430f01b2daff4955517b03 (patch)
treeaa19249a7fb469176fb22adfa9a1b702ae3be6c0 /src/gui/kernel/qwidget_s60.cpp
parent8031eada2f81963865390b4d899631b09d4ca6f3 (diff)
parenta05f73499a187c67a394893e2cc74516ccbc46f5 (diff)
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts: src/gui/text/qfontengine_mac.mm tests/auto/qdiriterator/tst_qdiriterator.cpp
Diffstat (limited to 'src/gui/kernel/qwidget_s60.cpp')
-rw-r--r--src/gui/kernel/qwidget_s60.cpp33
1 files changed, 1 insertions, 32 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index c74c7ebf2b..83e46e5444 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -1210,41 +1210,10 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
}
#ifdef Q_WS_S60
- // Hide window decoration when switching to fullscreen / minimized otherwise show decoration.
// The window decoration visibility has to be changed before doing actual window state
// change since in that order the availableGeometry will return directly the right size and
// we will avoid unnecessary redraws
- Qt::WindowStates comparisonState = newstate;
- QWidget *parentWindow = parentWidget();
- if (parentWindow) {
- while (parentWindow->parentWidget())
- parentWindow = parentWindow->parentWidget();
- comparisonState = parentWindow->windowState();
- } else {
- parentWindow = this;
- }
-
- const bool decorationsVisible = !(comparisonState & (Qt::WindowFullScreen | Qt::WindowMinimized));
- const bool parentIsFullscreen = comparisonState & Qt::WindowFullScreen;
- const bool parentCbaVisibilityHint = parentWindow->windowFlags() & Qt::WindowSoftkeysVisibleHint;
- bool buttonGroupVisibility = (decorationsVisible || (parentIsFullscreen && parentCbaVisibilityHint));
-
- // For non-toplevel normal and maximized windows, show cba if window has softkey
- // actions even if topmost parent is not showing cba. Do the same for fullscreen
- // windows that request it.
- if (!buttonGroupVisibility
- && parentWidget()
- && !(newstate & Qt::WindowMinimized)
- && ((windowFlags() & Qt::WindowSoftkeysVisibleHint) || !(newstate & Qt::WindowFullScreen))) {
- for (int i = 0; i < actions().size(); ++i) {
- if (actions().at(i)->softKeyRole() != QAction::NoSoftKey) {
- buttonGroupVisibility = true;
- break;
- }
- }
- }
- S60->setStatusPaneAndButtonGroupVisibility(decorationsVisible, buttonGroupVisibility);
-
+ bool decorationsVisible = S60->setRecursiveDecorationsVisibility(this, newstate);
#endif // Q_WS_S60
// Ensure the initial size is valid, since we store it as normalGeometry below.