on xenial help sign in
Fixed shell test orientation defaults
7e21c71Nick Dedekind
tests/qmltests/Stages/tst_TabletStage.qml+4−1
@@ -53,7 +53,10 @@ Rectangle {
53 shellOrientation: Qt.LandscapeOrientation
53 shellOrientation: Qt.LandscapeOrientation
54 nativeWidth: width
54 nativeWidth: width
55 nativeHeight: height
55 nativeHeight: height
56− orientations: Orientations{} // Defaults are fine for testing
56+ orientations: Orientations {
57+ native_: Qt.LandscapeOrientation
58+ primary: Qt.LandscapeOrientation
59+ }
57 focus: true
60 focus: true
58 }
61 }
59 }
62 }
tests/qmltests/tst_Shell.qml+14−2
@@ -61,6 +61,10 @@ Rectangle {
61
61
62 anchors.centerIn: parent
62 anchors.centerIn: parent
63
63
64+ property int shellOrientation: Qt.PortraitOrientation
65+ property int nativeOrientation: Qt.PortraitOrientation
66+ property int primaryOrientation: Qt.PortraitOrientation
67+
64 state: "phone"
68 state: "phone"
65 states: [
69 states: [
66 State {
70 State {
@@ -77,6 +81,9 @@ Rectangle {
77 target: shellLoader
81 target: shellLoader
78 width: units.gu(100)
82 width: units.gu(100)
79 height: units.gu(71)
83 height: units.gu(71)
84+ shellOrientation: Qt.LandscapeOrientation
85+ nativeOrientation: Qt.LandscapeOrientation
86+ primaryOrientation: Qt.LandscapeOrientation
80 }
87 }
81 },
88 },
82 State {
89 State {
@@ -99,8 +106,13 @@ Rectangle {
99 Shell {
106 Shell {
100 id: __shell
107 id: __shell
101 usageScenario: usageScenarioSelector.model[usageScenarioSelector.selectedIndex]
108 usageScenario: usageScenarioSelector.model[usageScenarioSelector.selectedIndex]
102− orientation: Qt.PortraitOrientation
109+ nativeWidth: width
110+ nativeHeight: height
111+ orientation: shellLoader.shellOrientation
103− orientations: Orientations{} // Defaults are fine for testing
112+ orientations: Orientations {
113+ native_: shellLoader.nativeOrientation
114+ primary: shellLoader.primaryOrientation
115+ }
104 Component.onDestruction: {
116 Component.onDestruction: {
105 shellLoader.itemDestroyed = true;
117 shellLoader.itemDestroyed = true;
106 }
118 }