@@ -42,6 +42,7 @@ FocusScope {
42 property alias application: appWindow.application
42 property alias application: appWindow.application
43 property int shellOrientationAngle
43 property int shellOrientationAngle
44 property int shellOrientation
44 property int shellOrientation
45+ property QtObject deviceSpecificOrientationOverrides
45 property int shellPrimaryOrientation
46 property int shellPrimaryOrientation
46 property int nativeOrientation
47 property int nativeOrientation
@@ -139,6 +140,7 @@ FocusScope {
139 return angle % 360;
140 return angle % 360;
143+ property alias overrides: root.deviceSpecificOrientationOverrides
142 states: [
144 states: [
143 // Sets the initial orientationAngle of the window, when it first slides into view
145 // Sets the initial orientationAngle of the window, when it first slides into view
144 // (with the splash screen likely being displayed). At that point we just try to
146 // (with the splash screen likely being displayed). At that point we just try to
@@ -166,13 +168,17 @@ FocusScope {
166 if (supportedOrientations & root.shellOrientation) {
168 if (supportedOrientations & root.shellOrientation) {
167 chosenOrientation = root.shellOrientation;
169 chosenOrientation = root.shellOrientation;
168 } else if (supportedOrientations & Qt.PortraitOrientation) {
170 } else if (supportedOrientations & Qt.PortraitOrientation) {
169− chosenOrientation = Qt.PortraitOrientation;
171+ chosenOrientation = overrides ?
172+ overrides.portraitOrientation : Qt.PortraitOrientation;
170 } else if (supportedOrientations & Qt.LandscapeOrientation) {
173 } else if (supportedOrientations & Qt.LandscapeOrientation) {
171− chosenOrientation = Qt.LandscapeOrientation;
174+ chosenOrientation = overrides ?
175+ overrides.landscapeOrientation : Qt.LandscapeOrientation;
172 } else if (supportedOrientations & Qt.InvertedPortraitOrientation) {
176 } else if (supportedOrientations & Qt.InvertedPortraitOrientation) {
177+ chosenOrientation = overrides ?
173− chosenOrientation = Qt.InvertedPortraitOrientation;
178+ overrides.invertedPortraitOrientation : Qt.InvertedPortraitOrientation;
174 } else if (supportedOrientations & Qt.InvertedLandscapeOrientation) {
179 } else if (supportedOrientations & Qt.InvertedLandscapeOrientation) {
180+ chosenOrientation = overrides ?
175− chosenOrientation = Qt.InvertedLandscapeOrientation;
181+ overrides.invertedLandscapeOrientation : Qt.InvertedLandscapeOrientation;
177 chosenOrientation = root.shellPrimaryOrientation;
183 chosenOrientation = root.shellPrimaryOrientation;