summaryrefslogtreecommitdiffstats
path: root/tools/qml/main.cpp
diff options
context:
space:
mode:
authorJoona Petrell <joona.t.petrell@nokia.com>2010-07-07 05:45:33 (GMT)
committerJoona Petrell <joona.t.petrell@nokia.com>2010-07-07 06:23:15 (GMT)
commitaf5fc41e27f068604453a927cac4d81886d1987e (patch)
tree5315176c3680f844a9e86213334234996a65dd80 /tools/qml/main.cpp
parent44d78dca77b8a5f4f0d1bb67e84c21a4c57345b6 (diff)
downloadQt-af5fc41e27f068604453a927cac4d81886d1987e.zip
Qt-af5fc41e27f068604453a927cac4d81886d1987e.tar.gz
Qt-af5fc41e27f068604453a927cac4d81886d1987e.tar.bz2
Add Symbian support for runtime.orientation property
Task-number: Reviewed-by: Martin Jones
Diffstat (limited to 'tools/qml/main.cpp')
-rw-r--r--tools/qml/main.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index d5ad9ad..dfd1726 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -56,6 +56,10 @@ QT_USE_NAMESPACE
QtMsgHandler systemMsgOutput = 0;
+#if defined(Q_WS_S60)
+#include <aknappui.h> // For locking app to portrait
+#endif
+
#if defined (Q_OS_SYMBIAN)
#include <unistd.h>
#include <sys/types.h>
@@ -207,6 +211,13 @@ int main(int argc, char ** argv)
app.setOrganizationName("Nokia");
app.setOrganizationDomain("nokia.com");
+#if defined(Q_WS_S60)
+ CAknAppUi *appUi = static_cast<CAknAppUi *>(CEikonEnv::Static()->AppUi());
+ if (appUi) {
+ appUi->SetOrientationL(CAknAppUi::EAppUiOrientationPortrait);
+ }
+#endif
+
QDeclarativeViewer::registerTypes();
QDeclarativeTester::registerTypes();