diff --git a/electrum/gui/qml/components/ExceptionDialog.qml b/electrum/gui/qml/components/ExceptionDialog.qml index 3a60ae22a..eb162a01c 100644 --- a/electrum/gui/qml/components/ExceptionDialog.qml +++ b/electrum/gui/qml/components/ExceptionDialog.qml @@ -77,7 +77,17 @@ ElDialog Layout.fillWidth: true Layout.preferredWidth: 3 text: qsTr('Send Bug Report') - onClicked: AppController.sendReport(user_text.text) + onClicked: { + var dialog = app.messageDialog.createObject(app, { + text: qsTr('Confirm to send bugreport?'), + yesno: true, + z: 1001 // assure topmost of all other dialogs + }) + dialog.accepted.connect(function() { + AppController.sendReport(user_text.text) + }) + dialog.open() + } } Button { Layout.fillWidth: true diff --git a/electrum/gui/qt/exception_window.py b/electrum/gui/qt/exception_window.py index f166d8078..9e5a2e8d2 100644 --- a/electrum/gui/qt/exception_window.py +++ b/electrum/gui/qt/exception_window.py @@ -83,7 +83,7 @@ class Exception_Window(BaseCrashReporter, QWidget, MessageBoxMixin, Logger): buttons = QHBoxLayout() report_button = QPushButton(_('Send Bug Report')) - report_button.clicked.connect(lambda _checked: self.send_report()) + report_button.clicked.connect(lambda _checked: self._ask_for_confirm_to_send_report()) report_button.setIcon(read_QIcon("tab_send.png")) buttons.addWidget(report_button) @@ -103,6 +103,10 @@ class Exception_Window(BaseCrashReporter, QWidget, MessageBoxMixin, Logger): self.setLayout(main_box) self.show() + def _ask_for_confirm_to_send_report(self): + if self.question("Confirm to send bugreport?"): + self.send_report() + def send_report(self): def on_success(response: CrashReportResponse): text = response.text