[system/karton] src/qml: Recreate installation dialog on open to avoid previous values

Derek Lin <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 556458ecac0c03418ba36611bf7430957bf40afb by Derek Lin, on behalf of Martin Sh.
Committed on 19/08/2026 at 02:44.
Pushed by kenoi into branch 'master'.

Recreate installation dialog on open to avoid previous values

M  +6    -2    src/qml/VMListPage.qml

https://invent.kde.org/system/karton/-/commit/556458ecac0c03418ba36611bf7430957bf40afb

diff --git a/src/qml/VMListPage.qml b/src/qml/VMListPage.qml
index d54cd80..65198a3 100644
--- a/src/qml/VMListPage.qml
+++ b/src/qml/VMListPage.qml
@@ -9,6 +9,7 @@ import org.kde.karton
 
 
 Kirigami.ScrollablePage {
+    id: page
     title: i18nc("noun, Virtual Machines","Virtual Machines")
     topPadding: 0
     bottomPadding: 0
@@ -28,13 +29,16 @@ Kirigami.ScrollablePage {
             icon.name: "list-add-symbolic"
             text: i18nc("verb, to create a new virtual machine", "Create")
             onTriggered: source => {
-                addDomainDialog.open();
+                const dialog = addDomainDialog.createObject(page);
+                dialog.closed.connect(dialog.destroy);
+                dialog.open();
             }
         }
     ]
 
-    InstallationDialog {
+    Component {
         id: addDomainDialog
+        InstallationDialog {}
     }
 
     Component {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.