diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2010-07-13 05:50:22 (GMT) |
---|---|---|
committer | Toby Tomkins <toby.tomkins@nokia.com> | 2010-07-14 01:31:58 (GMT) |
commit | 1131c251882135d1fe90d4f0f91b2b54a4568adf (patch) | |
tree | 0ebf518c8ae916c5f53d2f23da1e54e122e092de /tools | |
parent | 596ac2674f2697cb0ac304389d91c50339b988bf (diff) | |
download | Qt-1131c251882135d1fe90d4f0f91b2b54a4568adf.zip Qt-1131c251882135d1fe90d4f0f91b2b54a4568adf.tar.gz Qt-1131c251882135d1fe90d4f0f91b2b54a4568adf.tar.bz2 |
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.cpp | 12 | ||||
-rw-r--r-- | tools/qml/main.cpp | 11 | ||||
-rw-r--r-- | tools/qml/qml.pro | 1 |
3 files changed, 6 insertions, 18 deletions
diff --git a/tools/qml/deviceorientation_symbian.cpp b/tools/qml/deviceorientation_symbian.cpp index 48bfc72..c305f94 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 baf1b4d..6461b67 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 0a51c0b..bb69e8a 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 { |