fix: revert to not destroy popups on close by default
- causing too many regressions along the way - most of our popups are already destroyed properly inside Popups.qml - in general, a Popup (Dialog, Menu, etc.) can be manually destroyed iff it had been created using `Component.createObject()`, otherwise it's gone for good until restart - manually enabled the destroy-on-close in verified cases Fixes #10948 (maybe some other dupes)
This commit is contained in:
parent
0bf5c64b06
commit
0b94c2b541
|
@ -13,9 +13,9 @@ Dialog {
|
|||
property string subtitle
|
||||
/*!
|
||||
\qmlproperty destroyOnClose
|
||||
This property decides whether the popup component should be destroyed when closed. Default value is true.
|
||||
This property decides whether the popup component should be destroyed when closed. Default value is false.
|
||||
*/
|
||||
property bool destroyOnClose: true
|
||||
property bool destroyOnClose: false
|
||||
/*!
|
||||
\qmlproperty color backgroundColor
|
||||
This property decides the modal background color
|
||||
|
@ -88,7 +88,7 @@ Dialog {
|
|||
if (root.standardButtons & Dialog.SaveAll) return qsTr("Save all")
|
||||
if (root.standardButtons & Dialog.Retry) return qsTr("Retry")
|
||||
if (root.standardButtons & Dialog.Ignore) return qsTr("Ignore")
|
||||
return qsTr("Ok")
|
||||
return qsTr("OK")
|
||||
}
|
||||
|
||||
onClicked: root.accept()
|
||||
|
|
|
@ -182,12 +182,6 @@ StatusDialog {
|
|||
*/
|
||||
property bool hasFloatingButtons: false
|
||||
|
||||
/*!
|
||||
\qmlproperty destroyOnClose
|
||||
This property decides whether the popup component should be destroyed when closed. Default value is true.
|
||||
*/
|
||||
property bool destroyOnClose: true
|
||||
|
||||
signal editButtonClicked()
|
||||
signal headerImageClicked()
|
||||
|
||||
|
|
|
@ -286,8 +286,5 @@ Item {
|
|||
onCountChanged: currentIndex = 0
|
||||
}
|
||||
}
|
||||
onClosed: {
|
||||
suggestionsDialog.destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ StatusModal {
|
|||
Component {
|
||||
id: transferOwnershiproot
|
||||
TransferOwnershipPopup {
|
||||
anchors.centerIn: parent
|
||||
destroyOnClose: true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,12 +12,11 @@ import StatusQ.Popups 0.1
|
|||
import utils 1.0
|
||||
|
||||
StatusModal {
|
||||
id: popup
|
||||
id: root
|
||||
|
||||
property var messagingStore
|
||||
property var advancedStore
|
||||
|
||||
anchors.centerIn: parent
|
||||
height: 560
|
||||
padding: 8
|
||||
headerSettings.title: qsTr("Waku nodes")
|
||||
|
@ -64,7 +63,7 @@ StatusModal {
|
|||
enabled: addrInput.valid
|
||||
onClicked: {
|
||||
root.messagingStore.saveNewWakuNode(addrInput.text)
|
||||
popup.close()
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -249,6 +249,7 @@ Item {
|
|||
|
||||
ENSPopup {
|
||||
ensUsernamesStore: root.ensUsernamesStore
|
||||
destroyOnClose: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ ImageLoader 1.0 ImageLoader.qml
|
|||
LabelValueRow 1.0 LabelValueRow.qml
|
||||
ModuleWarning 1.0 ModuleWarning.qml
|
||||
NoImageUploadedPanel 1.0 NoImageUploadedPanel.qml
|
||||
NotificationWindow 1.0 NotificationWindow.qml
|
||||
ProfileBioSocialsPanel 1.0 ProfileBioSocialsPanel.qml
|
||||
RoundedIcon 1.0 RoundedIcon.qml
|
||||
RoundedImage 1.0 RoundedImage.qml
|
||||
|
|
|
@ -9,7 +9,6 @@ import StatusQ.Popups 0.1
|
|||
|
||||
StatusModal {
|
||||
id: confirmationDialog
|
||||
anchors.centerIn: parent
|
||||
|
||||
property var parentPopup
|
||||
property var value
|
||||
|
|
|
@ -52,10 +52,7 @@ Item {
|
|||
|
||||
headerSettings.title: root.title
|
||||
|
||||
anchors.centerIn: Overlay.overlay
|
||||
|
||||
width: root.roundedImage ? 480 : 580
|
||||
destroyOnClose: false
|
||||
StatusImageCropPanel {
|
||||
id: imageCropper
|
||||
objectName: "profileImageCropper"
|
||||
|
|
|
@ -14,7 +14,7 @@ Popup {
|
|||
default property alias content: popupContent.children
|
||||
property alias contentWrapper: popupContent
|
||||
property alias header: headerContent.children
|
||||
property bool destroyOnClose: true
|
||||
property bool destroyOnClose: false
|
||||
|
||||
id: popup
|
||||
modal: true
|
||||
|
|
|
@ -14,7 +14,6 @@ StatusModal {
|
|||
|
||||
closePolicy: d.disableActionPopupButtons || d.disableCloseButton? Popup.NoAutoClose : Popup.CloseOnEscape | Popup.CloseOnPressOutside
|
||||
hasCloseButton: !d.disableActionPopupButtons && !d.disableCloseButton
|
||||
destroyOnClose: false
|
||||
|
||||
headerSettings.title: {
|
||||
switch (root.sharedKeycardModule.currentState.flowType) {
|
||||
|
|
|
@ -85,8 +85,4 @@ Popup {
|
|||
root.close()
|
||||
}
|
||||
}
|
||||
|
||||
onClosed: {
|
||||
root.destroy();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -347,10 +347,6 @@ StatusWindow {
|
|||
anchors.fill: parent
|
||||
}
|
||||
|
||||
NotificationWindow {
|
||||
id: notificationWindow
|
||||
}
|
||||
|
||||
MacTrafficLights { // FIXME should be a direct part of StatusAppNavBar
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
|
|
Loading…
Reference in New Issue