aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2016-12-20 09:47:39 +0100
committerMitch Curtis <mitch.curtis@qt.io>2016-12-21 10:01:50 +0000
commit866e8ac1ab9ed4fdcc3e16c2d86f20e304ea38df (patch)
treefce6e1ea377e7d9fa9f56d674fe279f0ef252b59 /tests
parent6e46d74b4d04fbf21ec7e57418ab5568f786b0e7 (diff)
tst_roundbutton: use TestCase's new createTemporaryObject functions
This ensures that the appropriate objects are destroyed at the end of each test function, even if the test fails. Change-Id: Iac4d5ad149111bdc5ac5b56bf246424b6f943bce Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/controls/data/tst_roundbutton.qml4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/auto/controls/data/tst_roundbutton.qml b/tests/auto/controls/data/tst_roundbutton.qml
index aa956776..cc593131 100644
--- a/tests/auto/controls/data/tst_roundbutton.qml
+++ b/tests/auto/controls/data/tst_roundbutton.qml
@@ -56,7 +56,7 @@ TestCase {
}
function test_radius() {
- var control = roundButton.createObject(testCase);
+ var control = createTemporaryObject(roundButton, testCase);
verify(control);
var implicitRadius = control.radius;
@@ -73,7 +73,5 @@ TestCase {
control.width = 10;
compare(control.radius, 5);
-
- control.destroy();
}
}