summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-04-12 03:15:25 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-04-12 03:15:25 (GMT)
commit0bce55e480e627239ea973c3abf58d90c2d1d478 (patch)
treee474165808f55976f7326abec90005f3086d9572 /tools
parent23c60d17534cc2d5d980aa14d5dae5327de83032 (diff)
downloadQt-0bce55e480e627239ea973c3abf58d90c2d1d478.zip
Qt-0bce55e480e627239ea973c3abf58d90c2d1d478.tar.gz
Qt-0bce55e480e627239ea973c3abf58d90c2d1d478.tar.bz2
Read Maemo orientation at startup
QT-2695
Diffstat (limited to 'tools')
-rw-r--r--tools/qml/deviceorientation_maemo.cpp13
1 files 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 *)