summaryrefslogtreecommitdiffstats
path: root/shared/system.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'shared/system.cpp')
-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);