From 6275d7afaa97e2e602fefc29513b849eebb73942 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 8 Jun 2024 11:31:13 -0400 Subject: [PATCH] Switch from QQC2.ApplicationWindow.overlay to QQC2.Overlay.overlay Closes #648 --- src/chatbar/AttachDialog.qml | 2 +- src/chatbar/ChatBar.qml | 2 +- src/qml/FileDelegateContextMenu.qml | 2 +- src/qml/NeochatMaximizeComponent.qml | 2 +- src/qml/SpaceDrawer.qml | 2 +- src/qml/SpaceHierarchyDelegate.qml | 2 +- src/qml/UserInfo.qml | 4 ++-- src/settings/AccountEditorPage.qml | 2 +- src/settings/EmoticonEditorPage.qml | 2 +- src/settings/RoomGeneralPage.qml | 2 +- src/timeline/FileComponent.qml | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/chatbar/AttachDialog.qml b/src/chatbar/AttachDialog.qml index 8b5cd8ae7..e1022b140 100644 --- a/src/chatbar/AttachDialog.qml +++ b/src/chatbar/AttachDialog.qml @@ -30,7 +30,7 @@ QQC2.Popup { onClicked: { root.close(); - var fileDialog = openFileDialog.createObject(QQC2.ApplicationWindow.overlay); + var fileDialog = openFileDialog.createObject(QQC2.Overlay.overlay); fileDialog.chosen.connect(path => root.chosen(path)); fileDialog.open(); } diff --git a/src/chatbar/ChatBar.qml b/src/chatbar/ChatBar.qml index f18b594a1..d801db820 100644 --- a/src/chatbar/ChatBar.qml +++ b/src/chatbar/ChatBar.qml @@ -115,7 +115,7 @@ QQC2.Control { displayHint: QQC2.AbstractButton.IconOnly onTriggered: { - locationChooser.createObject(QQC2.ApplicationWindow.overlay, { + locationChooser.createObject(QQC2.Overlay.overlay, { room: root.currentRoom }).open(); } diff --git a/src/qml/FileDelegateContextMenu.qml b/src/qml/FileDelegateContextMenu.qml index 071beebd8..b863a66cb 100644 --- a/src/qml/FileDelegateContextMenu.qml +++ b/src/qml/FileDelegateContextMenu.qml @@ -49,7 +49,7 @@ DelegateContextMenu { text: i18n("Save As") icon.name: "document-save" onTriggered: { - var dialog = saveAsDialog.createObject(QQC2.ApplicationWindow.overlay); + var dialog = saveAsDialog.createObject(QQC2.Overlay.overlay); dialog.open(); dialog.currentFile = dialog.folder + "/" + currentRoom.fileNameToDownload(eventId); } diff --git a/src/qml/NeochatMaximizeComponent.qml b/src/qml/NeochatMaximizeComponent.qml index aaff5ca29..becaa7f92 100644 --- a/src/qml/NeochatMaximizeComponent.qml +++ b/src/qml/NeochatMaximizeComponent.qml @@ -101,7 +101,7 @@ Components.AlbumMaximizeComponent { onItemRightClicked: RoomManager.viewEventMenu(root.currentEventId, root.currentRoom) onSaveItem: { - var dialog = saveAsDialog.createObject(QQC2.ApplicationWindow.overlay); + var dialog = saveAsDialog.createObject(QQC2.Overlay.overlay); dialog.open(); dialog.currentFile = dialog.folder + "/" + currentRoom.fileNameToDownload(root.currentEventId); } diff --git a/src/qml/SpaceDrawer.qml b/src/qml/SpaceDrawer.qml index 9cebaa034..6fa05052d 100644 --- a/src/qml/SpaceDrawer.qml +++ b/src/qml/SpaceDrawer.qml @@ -242,7 +242,7 @@ QQC2.Control { text: i18nc("Join ", "Join %1", SpaceHierarchyCache.recommendedSpaceDisplayName) source: SpaceHierarchyCache.recommendedSpaceAvatar.length > 0 ? root.connection.makeMediaUrl(SpaceHierarchyCache.recommendedSpaceAvatar) : "" onSelected: { - recommendedSpaceDialogComponent.createObject(QQC2.ApplicationWindow.overlay, { + recommendedSpaceDialogComponent.createObject(QQC2.Overlay.overlay, { connection: root.connection }).open(); } diff --git a/src/qml/SpaceHierarchyDelegate.qml b/src/qml/SpaceHierarchyDelegate.qml index 4d09755f0..b970e5c1d 100644 --- a/src/qml/SpaceHierarchyDelegate.qml +++ b/src/qml/SpaceHierarchyDelegate.qml @@ -123,7 +123,7 @@ Item { icon.name: "list-remove" display: QQC2.AbstractButton.IconOnly onClicked: { - removeChildDialog.createObject(QQC2.ApplicationWindow.overlay, { + removeChildDialog.createObject(QQC2.Overlay.overlay, { parentRoom: root.parentRoom, roomId: root.roomId, displayName: root.displayName, diff --git a/src/qml/UserInfo.qml b/src/qml/UserInfo.qml index 789ee571d..1d72dfc3b 100644 --- a/src/qml/UserInfo.qml +++ b/src/qml/UserInfo.qml @@ -94,7 +94,7 @@ RowLayout { id: switchUserButton text: i18n("Switch User") icon.name: "system-switch-user" - onTriggered: accountSwitchDialog.createObject(QQC2.ApplicationWindow.overlay, { + onTriggered: accountSwitchDialog.createObject(QQC2.Overlay.overlay, { connection: root.connection }).open(); }, @@ -123,7 +123,7 @@ RowLayout { // id: switchUserButton // text: i18n("Switch User") // icon.name: "system-switch-user" - // onTriggered: accountSwitchDialog.createObject(QQC2.ApplicationWindow.overlay, { + // onTriggered: accountSwitchDialog.createObject(QQC2.Overlay.overlay, { // connection: root.connection // }).open(); // } diff --git a/src/settings/AccountEditorPage.qml b/src/settings/AccountEditorPage.qml index 873e42fd1..729baaa7c 100644 --- a/src/settings/AccountEditorPage.qml +++ b/src/settings/AccountEditorPage.qml @@ -116,7 +116,7 @@ FormCard.FormCardPage { FormCard.FormButtonDelegate { text: i18nc("@action:button", "QR code for account") onClicked: { - let qrMax = Qt.createComponent('org.kde.neochat', 'QrCodeMaximizeComponent').createObject(QQC2.ApplicationWindow.overlay, { + let qrMax = Qt.createComponent('org.kde.neochat', 'QrCodeMaximizeComponent').createObject(QQC2.Overlay.overlay, { text: "https://matrix.to/#/" + root.connection.localUser.id, title: root.connection.localUser.displayName, subtitle: root.connection.localUser.id, diff --git a/src/settings/EmoticonEditorPage.qml b/src/settings/EmoticonEditorPage.qml index 0f9cd793a..41c05af4d 100644 --- a/src/settings/EmoticonEditorPage.qml +++ b/src/settings/EmoticonEditorPage.qml @@ -73,7 +73,7 @@ FormCard.FormCardPage { if (fileDialog != null) { return; } - fileDialog = openFileDialog.createObject(QQC2.ApplicationWindow.Overlay); + fileDialog = openFileDialog.createObject(QQC2.Overlay.overlay); fileDialog.chosen.connect(function (receivedSource) { mouseArea.fileDialog = null; if (!receivedSource) { diff --git a/src/settings/RoomGeneralPage.qml b/src/settings/RoomGeneralPage.qml index 0bba78841..76bfc2ad8 100644 --- a/src/settings/RoomGeneralPage.qml +++ b/src/settings/RoomGeneralPage.qml @@ -48,7 +48,7 @@ FormCard.FormCardPage { display: QQC2.AbstractButton.IconOnly onClicked: { - const fileDialog = openFileDialog.createObject(QQC2.ApplicationWindow.overlay); + const fileDialog = openFileDialog.createObject(QQC2.Overlay.overlay); fileDialog.chosen.connect(function (path) { if (!path) return; diff --git a/src/timeline/FileComponent.qml b/src/timeline/FileComponent.qml index 2fcbdd60b..214d288c8 100644 --- a/src/timeline/FileComponent.qml +++ b/src/timeline/FileComponent.qml @@ -74,7 +74,7 @@ ColumnLayout { property real maxContentWidth: -1 function saveFileAs() { - const dialog = fileDialog.createObject(QQC2.ApplicationWindow.overlay); + const dialog = fileDialog.createObject(QQC2.Overlay.overlay); dialog.open(); dialog.currentFile = dialog.folder + "/" + root.room.fileNameToDownload(root.eventId); }