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