From 0bce55e480e627239ea973c3abf58d90c2d1d478 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Mon, 12 Apr 2010 13:15:25 +1000 Subject: Read Maemo orientation at startup QT-2695 --- tools/qml/deviceorientation_maemo.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tools/qml/deviceorientation_maemo.cpp b/tools/qml/deviceorientation_maemo.cpp index fa2c6e5..af90b02 100644 --- a/tools/qml/deviceorientation_maemo.cpp +++ b/tools/qml/deviceorientation_maemo.cpp @@ -50,6 +50,10 @@ public: MaemoOrientation() : DeviceOrientation(),m_current(Portrait), m_lastSeen(Portrait), m_lastSeenCount(0) { + m_current = get(); + if (m_current == UnknownOrientation) + m_current = Portrait; + startTimer(100); } @@ -57,14 +61,7 @@ public: return m_current; } - void setOrientation(Orientation orient) { - //XXX maybe better to just ignore - if (orient != m_current) { - m_current = orient; - emit orientationChanged(); - } - } - + void setOrientation(Orientation orient) { } protected: virtual void timerEvent(QTimerEvent *) -- cgit v0.12