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
|
property string subtitle
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty destroyOnClose
|
\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
|
\qmlproperty color backgroundColor
|
||||||
This property decides the modal background color
|
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.SaveAll) return qsTr("Save all")
|
||||||
if (root.standardButtons & Dialog.Retry) return qsTr("Retry")
|
if (root.standardButtons & Dialog.Retry) return qsTr("Retry")
|
||||||
if (root.standardButtons & Dialog.Ignore) return qsTr("Ignore")
|
if (root.standardButtons & Dialog.Ignore) return qsTr("Ignore")
|
||||||
return qsTr("Ok")
|
return qsTr("OK")
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: root.accept()
|
onClicked: root.accept()
|
||||||
|
|
|
@ -182,12 +182,6 @@ StatusDialog {
|
||||||
*/
|
*/
|
||||||
property bool hasFloatingButtons: false
|
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 editButtonClicked()
|
||||||
signal headerImageClicked()
|
signal headerImageClicked()
|
||||||
|
|
||||||
|
|
|
@ -286,8 +286,5 @@ Item {
|
||||||
onCountChanged: currentIndex = 0
|
onCountChanged: currentIndex = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClosed: {
|
|
||||||
suggestionsDialog.destroy();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ StatusModal {
|
||||||
Component {
|
Component {
|
||||||
id: transferOwnershiproot
|
id: transferOwnershiproot
|
||||||
TransferOwnershipPopup {
|
TransferOwnershipPopup {
|
||||||
anchors.centerIn: parent
|
destroyOnClose: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,12 +12,11 @@ import StatusQ.Popups 0.1
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
|
|
||||||
StatusModal {
|
StatusModal {
|
||||||
id: popup
|
id: root
|
||||||
|
|
||||||
property var messagingStore
|
property var messagingStore
|
||||||
property var advancedStore
|
property var advancedStore
|
||||||
|
|
||||||
anchors.centerIn: parent
|
|
||||||
height: 560
|
height: 560
|
||||||
padding: 8
|
padding: 8
|
||||||
headerSettings.title: qsTr("Waku nodes")
|
headerSettings.title: qsTr("Waku nodes")
|
||||||
|
@ -64,7 +63,7 @@ StatusModal {
|
||||||
enabled: addrInput.valid
|
enabled: addrInput.valid
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.messagingStore.saveNewWakuNode(addrInput.text)
|
root.messagingStore.saveNewWakuNode(addrInput.text)
|
||||||
popup.close()
|
root.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -249,6 +249,7 @@ Item {
|
||||||
|
|
||||||
ENSPopup {
|
ENSPopup {
|
||||||
ensUsernamesStore: root.ensUsernamesStore
|
ensUsernamesStore: root.ensUsernamesStore
|
||||||
|
destroyOnClose: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@ ImageLoader 1.0 ImageLoader.qml
|
||||||
LabelValueRow 1.0 LabelValueRow.qml
|
LabelValueRow 1.0 LabelValueRow.qml
|
||||||
ModuleWarning 1.0 ModuleWarning.qml
|
ModuleWarning 1.0 ModuleWarning.qml
|
||||||
NoImageUploadedPanel 1.0 NoImageUploadedPanel.qml
|
NoImageUploadedPanel 1.0 NoImageUploadedPanel.qml
|
||||||
NotificationWindow 1.0 NotificationWindow.qml
|
|
||||||
ProfileBioSocialsPanel 1.0 ProfileBioSocialsPanel.qml
|
ProfileBioSocialsPanel 1.0 ProfileBioSocialsPanel.qml
|
||||||
RoundedIcon 1.0 RoundedIcon.qml
|
RoundedIcon 1.0 RoundedIcon.qml
|
||||||
RoundedImage 1.0 RoundedImage.qml
|
RoundedImage 1.0 RoundedImage.qml
|
||||||
|
|
|
@ -9,7 +9,6 @@ import StatusQ.Popups 0.1
|
||||||
|
|
||||||
StatusModal {
|
StatusModal {
|
||||||
id: confirmationDialog
|
id: confirmationDialog
|
||||||
anchors.centerIn: parent
|
|
||||||
|
|
||||||
property var parentPopup
|
property var parentPopup
|
||||||
property var value
|
property var value
|
||||||
|
|
|
@ -52,10 +52,7 @@ Item {
|
||||||
|
|
||||||
headerSettings.title: root.title
|
headerSettings.title: root.title
|
||||||
|
|
||||||
anchors.centerIn: Overlay.overlay
|
|
||||||
|
|
||||||
width: root.roundedImage ? 480 : 580
|
width: root.roundedImage ? 480 : 580
|
||||||
destroyOnClose: false
|
|
||||||
StatusImageCropPanel {
|
StatusImageCropPanel {
|
||||||
id: imageCropper
|
id: imageCropper
|
||||||
objectName: "profileImageCropper"
|
objectName: "profileImageCropper"
|
||||||
|
|
|
@ -14,7 +14,7 @@ Popup {
|
||||||
default property alias content: popupContent.children
|
default property alias content: popupContent.children
|
||||||
property alias contentWrapper: popupContent
|
property alias contentWrapper: popupContent
|
||||||
property alias header: headerContent.children
|
property alias header: headerContent.children
|
||||||
property bool destroyOnClose: true
|
property bool destroyOnClose: false
|
||||||
|
|
||||||
id: popup
|
id: popup
|
||||||
modal: true
|
modal: true
|
||||||
|
|
|
@ -14,7 +14,6 @@ StatusModal {
|
||||||
|
|
||||||
closePolicy: d.disableActionPopupButtons || d.disableCloseButton? Popup.NoAutoClose : Popup.CloseOnEscape | Popup.CloseOnPressOutside
|
closePolicy: d.disableActionPopupButtons || d.disableCloseButton? Popup.NoAutoClose : Popup.CloseOnEscape | Popup.CloseOnPressOutside
|
||||||
hasCloseButton: !d.disableActionPopupButtons && !d.disableCloseButton
|
hasCloseButton: !d.disableActionPopupButtons && !d.disableCloseButton
|
||||||
destroyOnClose: false
|
|
||||||
|
|
||||||
headerSettings.title: {
|
headerSettings.title: {
|
||||||
switch (root.sharedKeycardModule.currentState.flowType) {
|
switch (root.sharedKeycardModule.currentState.flowType) {
|
||||||
|
|
|
@ -85,8 +85,4 @@ Popup {
|
||||||
root.close()
|
root.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onClosed: {
|
|
||||||
root.destroy();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -347,10 +347,6 @@ StatusWindow {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
|
|
||||||
NotificationWindow {
|
|
||||||
id: notificationWindow
|
|
||||||
}
|
|
||||||
|
|
||||||
MacTrafficLights { // FIXME should be a direct part of StatusAppNavBar
|
MacTrafficLights { // FIXME should be a direct part of StatusAppNavBar
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
|
Loading…
Reference in New Issue