aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/client/loadmodel.qml2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/client/loadmodel.qml b/tests/client/loadmodel.qml
index 2eeb8e6..7a1f045 100644
--- a/tests/client/loadmodel.qml
+++ b/tests/client/loadmodel.qml
@@ -10,6 +10,7 @@ Item {
onResetChanged: {
if (reset) {
+ // destroy the current model and check if it will not crash the QML engine
view.model.destroy();
}
}
@@ -23,6 +24,7 @@ Item {
}
Component.onCompleted: {
+ // dynamically create the model to destroy it later
var model = Qt.createQmlObject("import QMenuModel 0.1; QDBusMenuModel { id: menuModel; busType: globalBusType; busName: globalBusName; objectPath: globalObjectPath; }", view, "");
model.start();
view.model = model;