tests/auto/qml/qqmlqt/data/LaterComponent2.qml
raw| 1 | import QtQuick 2.0 |
| 2 | |
| 3 | Item { |
| 4 | id: deleteme2 |
| 5 | function testFn() { |
| 6 | // this function shouldn't be called, |
| 7 | // since the object will have been deleted. |
| 8 | var crashy = Qt.createQmlObject("import QtQuick 2.0; Item { }", deleteme2) // invalid calling context if invoked after gc |
| 9 | row.test11_1 = 2; |
| 10 | } |
| 11 | |
| 12 | Component.onDestruction: row.test11_1 = 1; // success == the object was deleted, but testFn wasn't called. |
| 13 | } |