summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--navit/graphics/qt5/loader.qml9
1 files changed, 7 insertions, 2 deletions
diff --git a/navit/graphics/qt5/loader.qml b/navit/graphics/qt5/loader.qml
index ed9425bf7..9882cb23a 100644
--- a/navit/graphics/qt5/loader.qml
+++ b/navit/graphics/qt5/loader.qml
@@ -5,8 +5,6 @@ import QtQuick.Window 2.0
Window {
width: 200; height: 200
- Screen.orientationUpdateMask: Qt.PortraitOrientation + Qt.LandscapeOrientation + Qt.InvertedPortraitOrientation + Qt.InvertedLandscapeOrientation
-
Item {
id: root
anchors.fill: parent
@@ -35,5 +33,12 @@ Window {
source: "graphics_qt5.qml"
objectName: "navit_loader"
}
+ Component.onCompleted: {
+ // orientation update mask is defined since QML 5.4 So make this compatible to 5.2
+ // by just calling this if available
+ if(Screen.hasOwnProperty('orientationUpdateMask')) {
+ Screen.orientationUpdateMask = Qt.PortraitOrientation + Qt.LandscapeOrientation + Qt.InvertedPortraitOrientation + Qt.InvertedLandscapeOrientation;
+ }
+ }
}
}