From 6cab88d2d4f36cc3ccd17990f5095d2f2e289aa8 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Tue, 17 Sep 2024 19:09:09 +0100 Subject: [PATCH] Store window geometry using KConfig.WindowStateSaver --- CMakeLists.txt | 2 +- app/qml/Main.qml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 621c5482b..b099cccf4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,7 @@ ecm_setup_version(${RELEASE_SERVICE_VERSION} ecm_set_disabled_deprecation_versions( QT 6.6 - KF 6.0 + KF 6.5 ) # Make the version header available by linking against kdeconnectversion diff --git a/app/qml/Main.qml b/app/qml/Main.qml index fc91a1714..a1f4473e2 100644 --- a/app/qml/Main.qml +++ b/app/qml/Main.qml @@ -9,6 +9,7 @@ import QtQuick.Controls as QQC2 import QtQuick.Layouts import org.kde.kirigami as Kirigami import org.kde.kdeconnect +import org.kde.config as KConfig Kirigami.ApplicationWindow { id: root @@ -19,6 +20,10 @@ Kirigami.ApplicationWindow { pageStack.globalToolBar.canContainHandles: true pageStack.globalToolBar.showNavigationButtons: applicationWindow().pageStack.currentIndex > 0 ? Kirigami.ApplicationHeaderStyle.ShowBackButton : 0 + KConfig.WindowStateSaver { + configGroupName: "MainWindow" + } + globalDrawer: Kirigami.OverlayDrawer { id: drawer edge: Qt.application.layoutDirection === Qt.RightToLeft ? Qt.RightEdge : Qt.LeftEdge