on xenial help sign in
Fix tst_DragHandle
414a18dDaniel d'Andrada
tests/qmltests/Components/tst_DragHandle.cpp+4
@@ -101,6 +101,10 @@ void tst_DragHandle::init()
101 QVERIFY(m_view->rootObject() != 0);
101 QVERIFY(m_view->rootObject() != 0);
102 qApp->processEvents();
102 qApp->processEvents();
103
103
104+ // Hide the controls to ensure we don't hit them accidentally
105+ QQuickItem *controls = m_view->rootObject()->findChild<QQuickItem*>("controls");
106+ controls->setVisible(false);
107+
104 m_fakeTimer = new FakeTimer;
108 m_fakeTimer = new FakeTimer;
105 m_fakeTimeSource.reset(new FakeTimeSource);
109 m_fakeTimeSource.reset(new FakeTimeSource);
106}
110}
tests/qmltests/Components/tst_DragHandle.qml+1−2
@@ -156,13 +156,13 @@ Rectangle {
156 }
156 }
157
157
158 Row {
158 Row {
159+ objectName: "controls"
159 anchors.bottom: parent.bottom
160 anchors.bottom: parent.bottom
160 anchors.left: parent.left
161 anchors.left: parent.left
161 anchors.margins: units.gu(1)
162 anchors.margins: units.gu(1)
162 spacing: units.gu(1)
163 spacing: units.gu(1)
163
164
164 Button {
165 Button {
165− id: stretchButton
166 text: root.stretch ? "stretch" : "move"
166 text: root.stretch ? "stretch" : "move"
167 onClicked: { root.stretch = !root.stretch; }
167 onClicked: { root.stretch = !root.stretch; }
168 }
168 }
@@ -190,7 +190,6 @@ Rectangle {
190 }
190 }
191
191
192 Button {
192 Button {
193− id: bidirectionalButton
194 text: root.bidirectional ? "bidirectional" : "directional"
193 text: root.bidirectional ? "bidirectional" : "directional"
195 onClicked: { root.bidirectional = !root.bidirectional; }
194 onClicked: { root.bidirectional = !root.bidirectional; }
196 }
195 }