@@ -42,6 +42,7 @@ FocusScope {
4242 property alias application: appWindow.application
4343 property int shellOrientationAngle
4444 property int shellOrientation
45+ property QtObject deviceSpecificOrientationOverrides
4546 property int shellPrimaryOrientation
4647 property int nativeOrientation
4748
@@ -139,6 +140,7 @@ FocusScope {
139140 return angle % 360;
140141 }
141142
143+ property alias overrides: root.deviceSpecificOrientationOverrides
142144 states: [
143145 // Sets the initial orientationAngle of the window, when it first slides into view
144146 // (with the splash screen likely being displayed). At that point we just try to
@@ -166,13 +168,17 @@ FocusScope {
166168 if (supportedOrientations & root.shellOrientation) {
167169 chosenOrientation = root.shellOrientation;
168170 } else if (supportedOrientations & Qt.PortraitOrientation) {
169− chosenOrientation = Qt.PortraitOrientation;
171+ chosenOrientation = overrides ?
172+ overrides.portraitOrientation : Qt.PortraitOrientation;
170173 } else if (supportedOrientations & Qt.LandscapeOrientation) {
171− chosenOrientation = Qt.LandscapeOrientation;
174+ chosenOrientation = overrides ?
175+ overrides.landscapeOrientation : Qt.LandscapeOrientation;
172176 } else if (supportedOrientations & Qt.InvertedPortraitOrientation) {
173− chosenOrientation = Qt.InvertedPortraitOrientation;
177+ chosenOrientation = overrides ?
178+ overrides.invertedPortraitOrientation : Qt.InvertedPortraitOrientation;
174179 } else if (supportedOrientations & Qt.InvertedLandscapeOrientation) {
175− chosenOrientation = Qt.InvertedLandscapeOrientation;
180+ chosenOrientation = overrides ?
181+ overrides.invertedLandscapeOrientation : Qt.InvertedLandscapeOrientation;
176182 } else {
177183 chosenOrientation = root.shellPrimaryOrientation;
178184 }