From b17b34c5fdd8245d94e8b7f1fca7310b7ec62eeb Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Tue, 13 Oct 2020 23:54:02 +1100 Subject: [PATCH] crashhandler: ask confirmation if no summary is written --- app/dialog/crashhandler/crashhandler.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/dialog/crashhandler/crashhandler.cpp b/app/dialog/crashhandler/crashhandler.cpp index 586684c03..2b21293f9 100644 --- a/app/dialog/crashhandler/crashhandler.cpp +++ b/app/dialog/crashhandler/crashhandler.cpp @@ -53,7 +53,7 @@ CrashHandlerDialog::CrashHandlerDialog(const char *report_dir, const char* crash summary_edit_ = new QTextEdit(); summary_edit_->setPlaceholderText(tr("Describe what you were doing in as much detail as " - "possible. If you can, provide steps to reproduce this crash.")); + "possible. If you can, provide steps to reproduce this crash.")); layout->addWidget(summary_edit_); @@ -166,6 +166,15 @@ void CrashHandlerDialog::ReadProcessFinished() void CrashHandlerDialog::SendErrorReport() { + if (summary_edit_->document()->isEmpty()) { + if (QMessageBox::question(this, + tr("No Crash Summary"), + tr("Are you sure you want to send an error report with no crash summary?"), + QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) { + return; + } + } + SetGUIObjectsEnabled(false); QNetworkAccessManager* manager = new QNetworkAccessManager();