summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesus Sanchez-Palencia <jesus.palencia@openbossa.org>2010-02-10 15:31:19 -0300
committerJesus Sanchez-Palencia <jesus.palencia@openbossa.org>2010-02-10 15:31:19 -0300
commitece41a861eaeb22969b44fc40e26674476ddd2be (patch)
treeafdb1c6e690d02a3999356542a655b8f8c93aa45
parent9db6c249f796d73db0a90f2d970e8408e34a16f3 (diff)
Shared/System: Fix screen rotation flags for Qt Maemo.
Signed-off-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
-rw-r--r--shared/system.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/shared/system.cpp b/shared/system.cpp
index f7b9f9f..5bd5dbd 100644
--- a/shared/system.cpp
+++ b/shared/system.cpp
@@ -71,9 +71,12 @@ void System::setViewMode(QWidget *window, ViewMode mode)
QTimer::singleShot(0, instance(), SLOT(setLandscapeMode()));
#elif defined(Q_WS_MAEMO_5)
- bool enabled = (mode == PortraitMode);
- window->setAttribute(Qt::WA_Maemo5ForcePortraitOrientation, enabled);
- window->setAttribute(Qt::WA_Maemo5ForceLandscapeOrientation, !enabled);
+ if (mode == PortraitMode)
+ window->setAttribute(Qt::WA_Maemo5PortraitOrientation, true);
+ else if (mode == LandscapeMode)
+ window->setAttribute(Qt::WA_Maemo5LandscapeOrientation, true);
+ else
+ window->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
#else
Q_UNUSED(window);
Q_UNUSED(mode);