diff --git a/qrenderdoc/Code/CaptureContext.cpp b/qrenderdoc/Code/CaptureContext.cpp
index 342276056..eadf6e050 100644
--- a/qrenderdoc/Code/CaptureContext.cpp
+++ b/qrenderdoc/Code/CaptureContext.cpp
@@ -158,43 +158,47 @@ CaptureContext::CaptureContext(PersistantConfig &cfg) : m_Config(cfg)
bool add_report = false;
- if(CrashDialog::HasCaptureReady(m_Config))
+ if(m_MainWindow->ErrorReportsAllowed())
{
- text += tr(
- "If you think this may be a RenderDoc bug please click the button below to report it, "
- "but note that this will require you to upload the capture for reproduction as "
- "otherwise it is impossible to tell what the problem may be.");
-
- add_report = true;
- }
- else if(CrashDialog::CaptureTooLarge(m_Config))
- {
- text = tr("%1
"
- "Your capture is too lage to upload as a crash report so this can't be "
- "automatically reported. "
- "Please email me at "
- "baldurk@baldurk.org with information and I can help investigate.")
- .arg(text);
- }
- else
- {
- text += tr("The capture must be saved locally if you want to report this as a bug. ");
-
- if(Replay().CurrentRemote().IsConnected())
+ if(CrashDialog::HasCaptureReady(m_Config))
{
text +=
- tr("Before closing the capture you can save it to disk and manually report a bug. "
- "Please include the capture, or else it will be impossible to tell what the "
- "problem may be.");
+ tr("If you think this may be a RenderDoc bug please click the button below to report "
+ "it, "
+ "but note that this will require you to upload the capture for reproduction as "
+ "otherwise it is impossible to tell what the problem may be.");
+
+ add_report = true;
+ }
+ else if(CrashDialog::CaptureTooLarge(m_Config))
+ {
+ text = tr("%1
"
+ "Your capture is too lage to upload as a crash report so this can't be "
+ "automatically reported. "
+ "Please email me at "
+ "baldurk@baldurk.org with information and I can help investigate.")
+ .arg(text);
}
else
{
- text += tr("You will need to reconnect to the remote server to save the capture.");
+ text += tr("The capture must be saved locally if you want to report this as a bug. ");
+
+ if(Replay().CurrentRemote().IsConnected())
+ {
+ text +=
+ tr("Before closing the capture you can save it to disk and manually report a bug. "
+ "Please include the capture, or else it will be impossible to tell what the "
+ "problem may be.");
+ }
+ else
+ {
+ text += tr("You will need to reconnect to the remote server to save the capture.");
+ }
}
}
- QMessageBox mb(QMessageBox::Critical, title, text, QMessageBox::Ok, m_MainWindow);
+ QMessageBox mb(QMessageBox::Critical, title, text.trimmed(), QMessageBox::Ok, m_MainWindow);
mb.setDefaultButton(QMessageBox::NoButton);
QPushButton *report = NULL;
if(add_report)
diff --git a/qrenderdoc/Windows/MainWindow.cpp b/qrenderdoc/Windows/MainWindow.cpp
index e2c6b651c..904f697dc 100644
--- a/qrenderdoc/Windows/MainWindow.cpp
+++ b/qrenderdoc/Windows/MainWindow.cpp
@@ -1681,6 +1681,11 @@ void MainWindow::LoadInitialLayout()
}
}
+bool MainWindow::ErrorReportsAllowed()
+{
+ return ui->action_Send_Error_Report->isEnabled();
+}
+
void MainWindow::RemoveRecentCapture(const QString &filename)
{
RemoveRecentFile(m_Ctx.Config().RecentCaptureFiles, filename);
@@ -2848,6 +2853,9 @@ void MainWindow::on_action_Send_Error_Report_triggered()
void MainWindow::sendErrorReport(bool forceCaptureInclusion)
{
+ if(!ErrorReportsAllowed())
+ return;
+
rdcstr report;
RENDERDOC_CreateBugReport(RENDERDOC_GetLogFile(), "", report);
diff --git a/qrenderdoc/Windows/MainWindow.h b/qrenderdoc/Windows/MainWindow.h
index 784116ea6..7eba0b715 100644
--- a/qrenderdoc/Windows/MainWindow.h
+++ b/qrenderdoc/Windows/MainWindow.h
@@ -96,6 +96,7 @@ public:
void LoadInitialLayout();
+ bool ErrorReportsAllowed();
void sendErrorReport(bool forceCaptureInclusion);
void setProgress(float val);