From 866e8ac1ab9ed4fdcc3e16c2d86f20e304ea38df Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Tue, 20 Dec 2016 09:47:39 +0100 Subject: 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 --- tests/auto/controls/data/tst_roundbutton.qml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tests') 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(); } } -- cgit v1.2.3