From f5da44655e8b7945c2a80ab2dec1f89af53aedc2 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Mon, 15 Sep 2025 16:03:38 +0200 Subject: [PATCH] Fix qml warnings in SpaceDrawer --- src/rooms/SpaceDrawer.qml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/rooms/SpaceDrawer.qml b/src/rooms/SpaceDrawer.qml index 5138f2594..70bce77f3 100644 --- a/src/rooms/SpaceDrawer.qml +++ b/src/rooms/SpaceDrawer.qml @@ -2,6 +2,8 @@ // SPDX-FileCopyrightText: 2021-2022 Bart De Vries // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL +pragma ComponentBehavior: Bound + import QtQuick import QtQuick.Controls as QQC2 import QtQuick.Layouts @@ -62,7 +64,7 @@ QQC2.Control { activeFocusOnTab: true - onSelected: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'NotificationsView'), { + onSelected: (root.Kirigami.PageStack.pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'NotificationsView'), { connection: root.connection }, { title: i18nc("@title", "Notifications"), @@ -99,7 +101,7 @@ QQC2.Control { height: Kirigami.Units.iconSizes.smallMedium text: root.connection.homeNotifications > 0 ? root.connection.homeNotifications : "" - visible: root.connection.homeNotifications > 0 && (RoomManager.currentSpace.length > 0 || root.showDirectChats === true) + visible: root.connection.homeNotifications > 0 && (RoomManager.currentSpace.length > 0 || RoomManager.currentSpace !== "DM") color: Kirigami.Theme.textColor horizontalAlignment: Text.AlignHCenter background: Rectangle { @@ -307,13 +309,13 @@ QQC2.Control { let context = spaceListContextMenu.createObject(root, { room: room, connection: root.connection - }); + }) as SpaceListContextMenu; context.popup(); } Component { id: spaceListContextMenu SpaceListContextMenu { - window: root.QQC2.ApplicationWindow.window + window: root.QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow } } }