on xenial help sign in
Make fake TestView more obviously intentionally-blank
commit026d77e47976c25ca5562e2a4449cd57a6f0d08e authorMichael Terry <michael.terry@canonical.com> dateTue 10 Feb 2015, 15:09 (12 years ago) parent1d3cf0b
2 files changed+20−37
tests/qmltests/Greeter/TestView.qml+6 tests/qmltests/Greeter/tst_Greeter.qml+14−37
tests/qmltests/Greeter/TestView.qml+6
@@ -83,5 +83,11 @@ Item {
8383 Rectangle {
8484 anchors.fill: parent
8585 color: "black"
86+
87+ Label {
88+ text: "Fake view, nothing to see here"
89+ color: "white"
90+ anchors.centerIn: parent
91+ }
8692 }
8793}
tests/qmltests/Greeter/tst_Greeter.qml+14−37
@@ -36,47 +36,24 @@ Item {
3636 loader.active = true;
3737 }
3838
39− Row {
40− anchors.fill: parent
41− Loader {
42− id: loader
43−
44− active: false
45− width: parent.width - controls.width
46− height: parent.height
47−
48− property bool itemDestroyed: false
49− sourceComponent: Component {
50− Greeter {
51− width: loader.width
52− height: loader.height
53− background: defaultBackground
54− viewSource: Qt.resolvedUrl("TestView.qml")
55−
56− Component.onDestruction: {
57− loader.itemDestroyed = true;
58− }
59− }
60− }
61− }
39+ Loader {
40+ id: loader
6241
63− Rectangle {
64− id: controls
65− color: "white"
66− width: units.gu(40)
67− height: parent.height
42+ active: false
43+ anchors.fill: parent
6844
69− Column {
70− anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
71− spacing: units.gu(1)
45+ property bool itemDestroyed: false
46+ sourceComponent: Component {
47+ Greeter {
48+ width: loader.width
49+ height: loader.height
50+ background: defaultBackground
51+ viewSource: Qt.resolvedUrl("TestView.qml")
7252
73− Row {
74− Button {
75− text: "Show Greeter"
76− onClicked: loader.item.show()
77− }
53+ Component.onDestruction: {
54+ loader.itemDestroyed = true;
7855 }
79− }
56+ }
8057 }
8158 }
8259