diff --git a/src/gui/Base/HMenuItemPopupSpawner.qml b/src/gui/Base/HMenuItemPopupSpawner.qml index 263c2148..bc052540 100644 --- a/src/gui/Base/HMenuItemPopupSpawner.qml +++ b/src/gui/Base/HMenuItemPopupSpawner.qml @@ -9,7 +9,6 @@ HMenuItem { utils.makePopup( popup, - popupParent, utils.objectUpdate( { focusOnClosed: menu.previouslyFocused }, properties, ), @@ -20,7 +19,6 @@ HMenuItem { property var popup // url or HPopup Component - property QtObject popupParent: window property bool autoDestruct: true property var properties: ({}) } diff --git a/src/gui/Pages/AccountSettings/DeviceDelegate.qml b/src/gui/Pages/AccountSettings/DeviceDelegate.qml index 9131b235..22984129 100644 --- a/src/gui/Pages/AccountSettings/DeviceDelegate.qml +++ b/src/gui/Pages/AccountSettings/DeviceDelegate.qml @@ -149,7 +149,6 @@ HTile { utils.makePopup( "Popups/KeyVerificationPopup.qml", - view, { focusOnClosed: nameField, userId: deviceTile.userId, diff --git a/src/gui/Pages/AccountSettings/Sessions.qml b/src/gui/Pages/AccountSettings/Sessions.qml index 6821947c..27e8065d 100644 --- a/src/gui/Pages/AccountSettings/Sessions.qml +++ b/src/gui/Pages/AccountSettings/Sessions.qml @@ -60,7 +60,6 @@ HColumnPage { utils.makePopup( "Popups/AuthentificationPopup.qml", - page, { userId: page.userId, deviceIds, diff --git a/src/gui/Pages/Chat/Banners/LeftBanner.qml b/src/gui/Pages/Chat/Banners/LeftBanner.qml index 1427e3bb..cc7e035d 100644 --- a/src/gui/Pages/Chat/Banners/LeftBanner.qml +++ b/src/gui/Pages/Chat/Banners/LeftBanner.qml @@ -25,7 +25,6 @@ Banner { forget: button => { utils.makePopup( "Popups/ForgetRoomPopup.qml", - mainUI, // Must not be destroyed with chat { userId: chat.userId, roomId: chat.roomId, diff --git a/src/gui/Pages/Chat/Chat.qml b/src/gui/Pages/Chat/Chat.qml index 11b09efb..d25e9a57 100644 --- a/src/gui/Pages/Chat/Chat.qml +++ b/src/gui/Pages/Chat/Chat.qml @@ -37,7 +37,6 @@ Item { sequences: window.settings.keys.leaveRoom onActivated: utils.makePopup( "Popups/LeaveRoomPopup.qml", - chat, {userId, roomId, roomName: roomInfo.display_name}, ) } @@ -46,7 +45,6 @@ Item { sequences: window.settings.keys.forgetRoom onActivated: utils.makePopup( "Popups/ForgetRoomPopup.qml", - chat, {userId, roomId, roomName: roomInfo.display_name}, ) } diff --git a/src/gui/Pages/Chat/RoomPane/MemberDelegate.qml b/src/gui/Pages/Chat/RoomPane/MemberDelegate.qml index f9a78bd1..6c593bf3 100644 --- a/src/gui/Pages/Chat/RoomPane/MemberDelegate.qml +++ b/src/gui/Pages/Chat/RoomPane/MemberDelegate.qml @@ -61,7 +61,6 @@ HTile { enabled: false popup: "Popups/RemoveMemberPopup.qml" - popupParent: chat properties: ({ userId: chat.userId, roomId: chat.roomId, @@ -85,7 +84,6 @@ HTile { enabled: false popup: "Popups/RemoveMemberPopup.qml" - popupParent: chat properties: ({ userId: chat.userId, roomId: chat.roomId, diff --git a/src/gui/Pages/Chat/RoomPane/MemberView.qml b/src/gui/Pages/Chat/RoomPane/MemberView.qml index 14e85411..0cba188b 100644 --- a/src/gui/Pages/Chat/RoomPane/MemberView.qml +++ b/src/gui/Pages/Chat/RoomPane/MemberView.qml @@ -83,7 +83,6 @@ HColumnLayout { onClicked: utils.makePopup( "Popups/InviteToRoomPopup.qml", - chat, { userId: chat.userId, roomId: chat.roomId, diff --git a/src/gui/Pages/Chat/Timeline/EventDelegate.qml b/src/gui/Pages/Chat/Timeline/EventDelegate.qml index 267f0f8d..20ba1ead 100644 --- a/src/gui/Pages/Chat/Timeline/EventDelegate.qml +++ b/src/gui/Pages/Chat/Timeline/EventDelegate.qml @@ -245,7 +245,6 @@ HColumnLayout { enabled: properties.eventSenderAndIds.length popup: "Popups/RedactPopup.qml" - popupParent: chat properties: ({ preferUserId: chat.userId, roomId: chat.roomId, @@ -279,7 +278,6 @@ HColumnLayout { text: qsTr("Clear messages") popup: "Popups/ClearMessagesPopup.qml" - popupParent: chat properties: ({ userId: chat.userId, roomId: chat.roomId, diff --git a/src/gui/Pages/Chat/Timeline/EventList.qml b/src/gui/Pages/Chat/Timeline/EventList.qml index 5cbfebde..a082a772 100644 --- a/src/gui/Pages/Chat/Timeline/EventList.qml +++ b/src/gui/Pages/Chat/Timeline/EventList.qml @@ -56,7 +56,6 @@ Rectangle { sequences: window.settings.keys.removeFocusedOrSelectedMessages onActivated: utils.makePopup( "Popups/RedactPopup.qml", - chat, { preferUserId: chat.userId, roomId: chat.roomId, @@ -166,7 +165,6 @@ Rectangle { sequences: window.settings.keys.clearRoomMessages onActivated: utils.makePopup( "Popups/ClearMessagesPopup.qml", - mainUI, { userId: window.uiState.pageProperties.userId, roomId: window.uiState.pageProperties.roomId, diff --git a/src/gui/Utils.qml b/src/gui/Utils.qml index 17dd07be..2388a977 100644 --- a/src/gui/Utils.qml +++ b/src/gui/Utils.qml @@ -48,9 +48,9 @@ QtObject { } - function makePopup(urlComponent, parent=null, properties={}, callback=null, + function makePopup(urlComponent, properties={}, callback=null, autoDestruct=true) { - makeObject(urlComponent, parent, properties, (popup) => { + makeObject(urlComponent, window, properties, (popup) => { popup.open() if (autoDestruct) popup.closed.connect(() => { popup.destroy() }) if (callback) callback(popup) @@ -68,7 +68,6 @@ QtObject { utils.makePopup( "Popups/UnexpectedErrorPopup.qml", - window, { errorType: type, message, traceback }, ) }