diff --git a/src/app/qml/ReasonDialog.qml b/src/app/qml/ReasonDialog.qml index e2d88ecd4..df29dacf1 100644 --- a/src/app/qml/ReasonDialog.qml +++ b/src/app/qml/ReasonDialog.qml @@ -31,7 +31,7 @@ Kirigami.Page { Keys.onReturnPressed: event => { if (event.modifiers & Qt.ControlModifier) { root.accepted(reason.text); - root.closeDialog(); + root.Kirigami.PageStack.closeDialog(); } } @@ -52,14 +52,14 @@ Kirigami.Page { QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole onClicked: { root.accepted(reason.text); - root.closeDialog(); + root.Kirigami.PageStack.closeDialog(); } } QQC2.Button { icon.name: "dialog-cancel-symbolic" text: i18nc("@action", "Cancel") QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.RejectRole - onClicked: root.closeDialog() + onClicked: root.Kirigami.PageStack.closeDialog() } } } diff --git a/src/app/qml/RoomPage.qml b/src/app/qml/RoomPage.qml index 2f585ee44..11f30ff59 100644 --- a/src/app/qml/RoomPage.qml +++ b/src/app/qml/RoomPage.qml @@ -113,7 +113,7 @@ Kirigami.Page { } }, Kirigami.Action { - visible: Kirigami.Settings.isMobile || !(root.Kirigami.PageStack.pageStack as Kirigami.PageRow).wideMode + visible: Kirigami.Settings.isMobile || !(root.Kirigami.PageStack.pageStack as Kirigami.PageRow)?.wideMode icon.name: "view-right-new" onTriggered: (root.QQC2.ApplicationWindow.window as Main).openRoomDrawer() } @@ -288,7 +288,7 @@ Kirigami.Page { footer: Loader { id: chatBarLoader - height: active ? (item as ChatBar).implicitHeight : 0 + height: active ? (item as ChatBar)?.implicitHeight : 0 active: timelineViewLoader.active && !root.currentRoom.readOnly sourceComponent: ChatBar { id: chatBar diff --git a/src/chatbar/EmojiDialog.qml b/src/chatbar/EmojiDialog.qml index 3c0941e20..6b8401a0c 100644 --- a/src/chatbar/EmojiDialog.qml +++ b/src/chatbar/EmojiDialog.qml @@ -65,7 +65,7 @@ QQC2.Popup { padding: 2 implicitHeight: Kirigami.Units.gridUnit * 20 + 2 * padding - width: Math.min(contentItem.categoryIconSize * 11 + 2 * padding, QQC2.ApplicationWindow.window.width) + width: Math.min(contentItem.categoryIconSize * 11 + 2 * padding, QQC2.ApplicationWindow.window?.width) contentItem: EmojiPicker { id: emojiPicker height: 400 diff --git a/src/rooms/ExploreComponent.qml b/src/rooms/ExploreComponent.qml index f790d016b..80132d656 100644 --- a/src/rooms/ExploreComponent.qml +++ b/src/rooms/ExploreComponent.qml @@ -55,7 +55,7 @@ RowLayout { QQC2.ToolButton { id: menuButton - property QQC2.Menu menuItem: undefined + property QQC2.Menu menuItem: null function openMenu(): void { if (!menuItem || !menuItem.visible) { @@ -69,7 +69,7 @@ RowLayout { Accessible.role: Accessible.ButtonMenu display: QQC2.AbstractButton.IconOnly - down: pressed || menuItem.visible + down: pressed || menuItem?.visible text: i18nc("@action:button", "Show Menu") icon.name: "application-menu-symbolic" @@ -78,7 +78,7 @@ RowLayout { Keys.onEnterPressed: openMenu() Accessible.onPressAction: openMenu() - QQC2.ToolTip.visible: hovered && !menuItem.visible + QQC2.ToolTip.visible: hovered && !menuItem?.visible QQC2.ToolTip.text: text QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay }