summaryrefslogtreecommitdiff
path: root/tests/auto/controls/data/tst_rangemodel.qml
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@digia.com>2013-04-09 08:26:46 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-11 11:12:56 +0200
commit6b910dcbb51f0e03143dd1fc10b17fb396898df9 (patch)
tree84d3d0ae891be55fd4bc1a3cc16673dde3a9297c /tests/auto/controls/data/tst_rangemodel.qml
parent7a20567396d74aae386a5a588f24e5c26c3aab0f (diff)
downloadqtquickcontrols-6b910dcbb51f0e03143dd1fc10b17fb396898df9.tar.gz
Tests: Destroy created components at the end of the tests functions
To ensure the components don't interfere with other functions. Change-Id: Ie22311471021175d23ae47c9e3a1ec603e803f2c Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Diffstat (limited to 'tests/auto/controls/data/tst_rangemodel.qml')
-rw-r--r--tests/auto/controls/data/tst_rangemodel.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/controls/data/tst_rangemodel.qml b/tests/auto/controls/data/tst_rangemodel.qml
index 52697140..2ba04926 100644
--- a/tests/auto/controls/data/tst_rangemodel.qml
+++ b/tests/auto/controls/data/tst_rangemodel.qml
@@ -56,8 +56,6 @@ TestCase {
}
function init() {
- if (range !== undefined)
- range.destroy()
var component = Qt.createComponent("rangemodel/rangemodel.qml");
compare(component.status, Component.Ready)
range = component.createObject(testCase);
@@ -65,6 +63,8 @@ TestCase {
}
function cleanup() {
+ if (range !== 0)
+ range.destroy()
spy.clear()
}