qml: don't stack exception dialogs when multiple exceptions happen
This commit is contained in:
@@ -32,6 +32,7 @@ ApplicationWindow
|
|||||||
property variant activeDialogs: []
|
property variant activeDialogs: []
|
||||||
|
|
||||||
property bool _wantClose: false
|
property bool _wantClose: false
|
||||||
|
property var _exceptionDialog
|
||||||
|
|
||||||
header: ToolBar {
|
header: ToolBar {
|
||||||
id: toolbar
|
id: toolbar
|
||||||
@@ -364,11 +365,16 @@ ApplicationWindow
|
|||||||
function onUserNotify(wallet_name, message) {
|
function onUserNotify(wallet_name, message) {
|
||||||
notificationPopup.show(wallet_name, message)
|
notificationPopup.show(wallet_name, message)
|
||||||
}
|
}
|
||||||
function onShowException() {
|
function onShowException(crash_data) {
|
||||||
var dialog = crashDialog.createObject(app, {
|
if (app._exceptionDialog)
|
||||||
crashData: AppController.crashData()
|
return
|
||||||
|
app._exceptionDialog = crashDialog.createObject(app, {
|
||||||
|
crashData: crash_data
|
||||||
})
|
})
|
||||||
dialog.open()
|
app._exceptionDialog.onClosed.connect(function() {
|
||||||
|
app._exceptionDialog = null
|
||||||
|
})
|
||||||
|
app._exceptionDialog.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class QEAppController(BaseCrashReporter, QObject):
|
|||||||
_dummy = pyqtSignal()
|
_dummy = pyqtSignal()
|
||||||
userNotify = pyqtSignal(str, str)
|
userNotify = pyqtSignal(str, str)
|
||||||
uriReceived = pyqtSignal(str)
|
uriReceived = pyqtSignal(str)
|
||||||
showException = pyqtSignal()
|
showException = pyqtSignal('QVariantMap')
|
||||||
sendingBugreport = pyqtSignal()
|
sendingBugreport = pyqtSignal()
|
||||||
sendingBugreportSuccess = pyqtSignal(str)
|
sendingBugreportSuccess = pyqtSignal(str)
|
||||||
sendingBugreportFailure = pyqtSignal(str)
|
sendingBugreportFailure = pyqtSignal(str)
|
||||||
@@ -223,7 +223,7 @@ class QEAppController(BaseCrashReporter, QObject):
|
|||||||
@pyqtSlot(object,object,object,object)
|
@pyqtSlot(object,object,object,object)
|
||||||
def crash(self, config, e, text, tb):
|
def crash(self, config, e, text, tb):
|
||||||
self.exc_args = (e, text, tb) # for BaseCrashReporter
|
self.exc_args = (e, text, tb) # for BaseCrashReporter
|
||||||
self.showException.emit()
|
self.showException.emit(self.crashData())
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def sendReport(self):
|
def sendReport(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user