From 92ac51465f15ebd56196765b0b68aef1e1278e66 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Tue, 15 Oct 2019 20:06:04 +0200 Subject: [PATCH] Simplify page pushing --- app/qml/main.qml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/app/qml/main.qml b/app/qml/main.qml index a220aa161..1f131d50f 100644 --- a/app/qml/main.qml +++ b/app/qml/main.qml @@ -31,16 +31,6 @@ Kirigami.ApplicationWindow width: 900 height: 500 - Component { - id: findDevicesComp - FindDevicesPage {} - } - - Component { - id: deviceComp - DevicePage {} - } - Kirigami.Action { id: findDevicesAction text: i18n ("Find devices...") @@ -49,7 +39,7 @@ Kirigami.ApplicationWindow onTriggered: { root.pageStack.clear() - root.pageStack.push(findDevicesComp); + root.pageStack.push(Qt.resolvedUrl("FindDevicesPage.qml")); } } @@ -112,7 +102,7 @@ Kirigami.ApplicationWindow onTriggered: { root.pageStack.clear() root.pageStack.push( - deviceComp, + Qt.resolvedUrl("DevicePage.qml"), {currentDevice: device} ); } @@ -137,5 +127,5 @@ Kirigami.ApplicationWindow id: contextDrawer } - pageStack.initialPage: findDevicesComp + pageStack.initialPage: Qt.resolvedUrl("FindDevicesPage.qml") }