@@ -42,7 +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 string deviceSpecificOrientationOverrides
45+ property QtObject deviceSpecificOrientationOverrides
46 property int shellPrimaryOrientation
46 property int shellPrimaryOrientation
47 property int nativeOrientation
47 property int nativeOrientation
@@ -140,6 +140,7 @@ FocusScope {
140 return angle % 360;
140 return angle % 360;
143+ property alias overrides: root.deviceSpecificOrientationOverrides
143 states: [
144 states: [
144 // 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
145 // (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
@@ -164,18 +165,20 @@ FocusScope {
164 // If it doesn't support shell's current orientation
165 // If it doesn't support shell's current orientation
165 // then simply pick some arbitraty one that it does support
166 // then simply pick some arbitraty one that it does support
166 var chosenOrientation = 0;
167 var chosenOrientation = 0;
168− console.log("JOSH: SPREAD DELEGATE: " + root.deviceSpecificOrientationOverrides);
169 if (supportedOrientations & root.shellOrientation) {
168 if (supportedOrientations & root.shellOrientation) {
170 chosenOrientation = root.shellOrientation;
169 chosenOrientation = root.shellOrientation;
171 } else if (supportedOrientations & Qt.PortraitOrientation) {
170 } else if (supportedOrientations & Qt.PortraitOrientation) {
172− chosenOrientation = Qt.PortraitOrientation;
171+ chosenOrientation = overrides ?
172+ overrides.portraitOrientation : Qt.PortraitOrientation;
173 } else if (supportedOrientations & Qt.LandscapeOrientation) {
173 } else if (supportedOrientations & Qt.LandscapeOrientation) {
174− chosenOrientation = Qt.LandscapeOrientation;
174+ chosenOrientation = overrides ?
175+ overrides.landscapeOrientation : Qt.LandscapeOrientation;
175 } else if (supportedOrientations & Qt.InvertedPortraitOrientation) {
176 } else if (supportedOrientations & Qt.InvertedPortraitOrientation) {
177+ chosenOrientation = overrides ?
176− chosenOrientation = Qt.InvertedPortraitOrientation;
178+ overrides.invertedPortraitOrientation : Qt.InvertedPortraitOrientation;
177 } else if (supportedOrientations & Qt.InvertedLandscapeOrientation) {
179 } else if (supportedOrientations & Qt.InvertedLandscapeOrientation) {
180+ chosenOrientation = overrides ?
178− chosenOrientation = Qt.InvertedLandscapeOrientation;
181+ overrides.invertedLandscapeOrientation : Qt.InvertedLandscapeOrientation;
180 chosenOrientation = root.shellPrimaryOrientation;
183 chosenOrientation = root.shellPrimaryOrientation;