summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJoona Petrell <joona.t.petrell@nokia.com>2010-07-13 15:50:22 +1000
committerToby Tomkins <toby.tomkins@nokia.com>2010-07-14 11:31:58 +1000
commit1131c251882135d1fe90d4f0f91b2b54a4568adf (patch)
tree0ebf518c8ae916c5f53d2f23da1e54e122e092de /tools
parent596ac2674f2697cb0ac304389d91c50339b988bf (diff)
downloadqt4-tools-1131c251882135d1fe90d4f0f91b2b54a4568adf.tar.gz
Only support portrait and landscape orientations on Symbian when updating the runtime.orientation property
Task-number: QTBUG-12036 Reviewed-by: Martin Jones (cherry picked from commit cb6472cb67511316f058b1eda4ffe71a1c4fe019)
Diffstat (limited to 'tools')
-rw-r--r--tools/qml/deviceorientation_symbian.cpp12
-rw-r--r--tools/qml/main.cpp11
-rw-r--r--tools/qml/qml.pro1
3 files changed, 6 insertions, 18 deletions
diff --git a/tools/qml/deviceorientation_symbian.cpp b/tools/qml/deviceorientation_symbian.cpp
index 48bfc72227..c305f942d5 100644
--- a/tools/qml/deviceorientation_symbian.cpp
+++ b/tools/qml/deviceorientation_symbian.cpp
@@ -118,18 +118,14 @@ private:
data = dataBuf();
Orientation o = UnknownOrientation;
switch (data.iDeviceOrientation) {
- case TSensrvOrientationData::EOrientationDisplayRightUp:
- o = LandscapeInverted;
- break;
case TSensrvOrientationData::EOrientationDisplayUp:
o = Portrait;
break;
- case TSensrvOrientationData::EOrientationDisplayDown:
- o = PortraitInverted;
- break;
- case TSensrvOrientationData::EOrientationDisplayLeftUp:
+ case TSensrvOrientationData::EOrientationDisplayRightUp:
o = Landscape;
break;
+ case TSensrvOrientationData::EOrientationDisplayLeftUp:
+ case TSensrvOrientationData::EOrientationDisplayDown:
case TSensrvOrientationData::EOrientationUndefined:
case TSensrvOrientationData::EOrientationDisplayUpwards:
case TSensrvOrientationData::EOrientationDisplayDownwards:
@@ -137,7 +133,7 @@ private:
break;
}
- if (m_current != o) {
+ if (m_current != o && o != UnknownOrientation) {
m_current = o;
emit orientationChanged();
}
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index baf1b4d9a1..6461b67dd5 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -55,9 +55,7 @@ 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>
@@ -204,12 +202,7 @@ 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();
diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro
index 0a51c0b8d3..bb69e8a63e 100644
--- a/tools/qml/qml.pro
+++ b/tools/qml/qml.pro
@@ -39,7 +39,6 @@ symbian {
TARGET.CAPABILITY = NetworkServices ReadUserData
!contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) {
LIBS += -lsensrvclient -lsensrvutil
- contains(QT_CONFIG, s60): LIBS += -lavkon -lcone
}
}
mac {