diff options
author | link2xt <link2xt@testrun.org> | 2021-05-22 15:18:40 +0300 |
---|---|---|
committer | link2xt <link2xt@testrun.org> | 2021-05-22 15:18:52 +0300 |
commit | ace0d420686be26ea88cca64406a7b6cf5e10260 (patch) | |
tree | 851694b4bb84389f800443c9a062da8c6b778890 /qml | |
parent | 837336dc93b66912d48a3b7a2e8c1991b4d3650f (diff) | |
download | kdeltachat-ace0d420686be26ea88cca64406a7b6cf5e10260.tar.gz kdeltachat-ace0d420686be26ea88cca64406a7b6cf5e10260.zip |
Set pageStack as the parent of dynamically created components
It fixes segmentation fault when application window is closed.
Diffstat (limited to 'qml')
-rw-r--r-- | qml/ChatlistPage.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qml/ChatlistPage.qml b/qml/ChatlistPage.qml index 587de96..a92e7b8 100644 --- a/qml/ChatlistPage.qml +++ b/qml/ChatlistPage.qml @@ -37,7 +37,7 @@ Kirigami.ScrollablePage { onTriggered: { let settingsPageComponent = Qt.createComponent("qrc:/qml/SettingsPage.qml") if (settingsPageComponent.status == Component.Ready) { - let settingsPage = settingsPageComponent.createObject(chatlistPage, {context: chatlistPage.context}) + let settingsPage = settingsPageComponent.createObject(pageStack, {context: chatlistPage.context}) pageStack.layers.push(settingsPage) } else { console.log("Can't open Settings page") @@ -120,7 +120,7 @@ Kirigami.ScrollablePage { console.log("Depth is " + pageStack.depth) let chatPageComponent = Qt.createComponent("qrc:/qml/ChatPage.qml") if (chatPageComponent.status == Component.Ready) { - let myPage = chatPageComponent.createObject(chatlistPage, {chatId: chatId, context: chatlistPage.context, eventEmitter: chatlistPage.eventEmitter}) + let myPage = chatPageComponent.createObject(pageStack, {chatId: chatId, context: chatlistPage.context, eventEmitter: chatlistPage.eventEmitter}) if (pageStack.depth == 1) { pageStack.push(myPage) } else if (pageStack.depth == 2) { |