From 8dc7d1d39dd0eeee68c234c90226f02da322abf1 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Mon, 15 Sep 2025 13:25:41 +0200 Subject: [PATCH] Fix most qml warnings in StateKeys --- src/devtools/CMakeLists.txt | 2 ++ src/devtools/StateKeys.qml | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/devtools/CMakeLists.txt b/src/devtools/CMakeLists.txt index 3865022ab..1b538a6cc 100644 --- a/src/devtools/CMakeLists.txt +++ b/src/devtools/CMakeLists.txt @@ -17,6 +17,8 @@ ecm_add_qml_module(Devtools GENERATE_PLUGIN_SOURCE models/statefiltermodel.cpp models/statekeysmodel.cpp models/statemodel.cpp + DEPENDENCIES + QtCore ) target_include_directories(Devtools PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/models) diff --git a/src/devtools/StateKeys.qml b/src/devtools/StateKeys.qml index 7afcbc3a9..52ea03208 100644 --- a/src/devtools/StateKeys.qml +++ b/src/devtools/StateKeys.qml @@ -1,8 +1,9 @@ // SPDX-FileCopyrightText: 2024 Tobias Fella // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL +pragma ComponentBehavior: Bound + import QtQuick -import QtQuick.Layouts import QtQuick.Window import org.kde.kirigami as Kirigami @@ -30,14 +31,15 @@ FormCard.FormCardPage { } delegate: FormCard.FormButtonDelegate { - text: model.stateKey - onClicked: openEventSource(model.stateKey) + required property string stateKey + text: stateKey + onClicked: root.openEventSource(stateKey) } } } function openEventSource(stateKey: string): void { - root.Window.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'MessageSourceSheet'), { + (Kirigami.PageStack.pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'MessageSourceSheet'), { model: stateKeysModel, allowEdit: true, room: root.room,