Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
5.0.0, 5.1.0 Beta 1
-
None
-
7fe2b4a4d9b2c082d08c9380bbcce46ed7527585
Description
In test cases, objects can be created using createQmlObject. The problem is if you create an object in one test function and call destroy() on the object before the function returns, the object is not deleted when the next function starts.
I try putting the destroy call inside a slot but that did not help.
See attached testcase: qmltestcase_destroy.tar.gz.
This is a problem for example when test functions use mouseClicks/keyPress because the non deleted object(s) can interfere with the current test. The order in which the tests are run can also change the tests results.
Nb: I saw QTBUG-14950 saying the the object is deleted when the script block returns. The example works (see attached destroytest3.qml) but only when using mouse click. This is not applicable for testcases.