diff --git a/electrum/gui/qml/components/ExceptionDialog.qml b/electrum/gui/qml/components/ExceptionDialog.qml index 8f0b62517..9ca9f8026 100644 --- a/electrum/gui/qml/components/ExceptionDialog.qml +++ b/electrum/gui/qml/components/ExceptionDialog.qml @@ -17,6 +17,7 @@ ElDialog width: parent.width height: parent.height + z: 1000 // assure topmost of all other dialogs header: null @@ -61,12 +62,12 @@ ElDialog text: qsTr('Please briefly describe what led to the error (optional):') } TextArea { + id: user_text Layout.fillWidth: true Layout.fillHeight: true background: Rectangle { color: Qt.darker(Material.background, 1.25) } - onTextChanged: AppController.setCrashUserText(text) } Label { text: qsTr('Do you want to send this report?') @@ -76,7 +77,7 @@ ElDialog Layout.fillWidth: true Layout.preferredWidth: 3 text: qsTr('Send Bug Report') - onClicked: AppController.sendReport() + onClicked: AppController.sendReport(user_text.text) } Button { Layout.fillWidth: true @@ -106,10 +107,9 @@ ElDialog ElDialog { property string reportText - z: 3000 - width: parent.width height: parent.height + z: 1001 // above root header: null @@ -125,6 +125,7 @@ ElDialog width: parent.width } } + onClosed: destroy() } } diff --git a/electrum/gui/qml/components/main.qml b/electrum/gui/qml/components/main.qml index 317a869e1..10cee8886 100644 --- a/electrum/gui/qml/components/main.qml +++ b/electrum/gui/qml/components/main.qml @@ -423,6 +423,13 @@ ApplicationWindow } } + Component { + id: crashDialog + ExceptionDialog { + onClosed: destroy() + } + } + property alias channelOpenProgressDialog: _channelOpenProgressDialog ChannelOpenProgressDialog { id: _channelOpenProgressDialog @@ -486,13 +493,6 @@ ApplicationWindow width: parent.width } - Component { - id: crashDialog - ExceptionDialog { - z: 1000 - } - } - Component.onCompleted: { coverTimer.start() diff --git a/electrum/gui/qml/qeapp.py b/electrum/gui/qml/qeapp.py index 22f70745b..c064fb489 100644 --- a/electrum/gui/qml/qeapp.py +++ b/electrum/gui/qml/qeapp.py @@ -303,12 +303,14 @@ class QEAppController(BaseCrashReporter, QObject): self.exc_args = (e, text, tb) # for BaseCrashReporter self.showException.emit(self.crashData()) - @pyqtSlot() - def sendReport(self): + @pyqtSlot(str) + def sendReport(self, user_text: str): + self._crash_user_text = user_text network = Network.get_instance() proxy = network.proxy def report_task(): + self.logger.debug('starting report_task') try: response = BaseCrashReporter.send_report(self, network.asyncio_loop, proxy) except Exception as e: @@ -330,10 +332,6 @@ class QEAppController(BaseCrashReporter, QObject): def showNever(self): self.config.SHOW_CRASH_REPORTER = False - @pyqtSlot(str) - def setCrashUserText(self, text): - self._crash_user_text = text - def _get_traceback_str_to_display(self) -> str: # The msg_box that shows the report uses rich_text=True, so # if traceback contains special HTML characters, e.g. '<',