summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxscreen.cpp
diff options
context:
space:
mode:
authorRafael Roquetto <rafael.roquetto.qnx@kdab.com>2013-04-08 11:25:08 -0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-10 17:51:36 +0200
commitf0425e115e5fe5d29191f0752659a28e9a4b6757 (patch)
treeec371a97194fe1d44a65e1f8df35735f7750c65a /src/plugins/platforms/qnx/qqnxscreen.cpp
parent4d7f0ce8d096370f464493d9d0ceff1eace93f14 (diff)
QNX: Adjust rotation according to initial orientation
Task-number: QTBUG-29201 Change-Id: I37e82904e0f3d8b372b31ee7d1379e61c788c622 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxscreen.cpp')
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp
index 7614abdc6a..2b81559ab6 100644
--- a/src/plugins/platforms/qnx/qqnxscreen.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreen.cpp
@@ -498,6 +498,18 @@ void QQnxScreen::onWindowPost(QQnxWindow *window)
}
}
+void QQnxScreen::adjustOrientation()
+{
+ if (!m_primaryScreen)
+ return;
+
+ bool ok = false;
+ const int rotation = qgetenv("ORIENTATION").toInt(&ok);
+
+ if (ok)
+ setRotation(rotation);
+}
+
QPlatformCursor * QQnxScreen::cursor() const
{
return m_cursor;