Clarify requirement of a capture for device lost errors

This commit is contained in:
baldurk
2021-09-27 13:01:09 +01:00
parent 62d6ffaec2
commit d386df55b9
6 changed files with 29 additions and 4 deletions
+9
View File
@@ -160,6 +160,15 @@ CaptureContext::CaptureContext(PersistantConfig &cfg) : m_Config(cfg)
add_report = true;
}
else if(CrashDialog::CaptureTooLarge(m_Config))
{
text +=
tr("<html>Your capture is too lage to upload as a crash report so this can't be "
"automatically reported. "
"Please email me at <a "
"href=\"mailto:baldurk@baldurk.org?subject=RenderDoc%20Unrecoverable%20error\">"
"baldurk@baldurk.org</a> with information and I can help investigate.</html>");
}
else
{
text += tr("The capture must be saved locally if you want to report this as a bug. ");
@@ -256,6 +256,13 @@ bool CrashDialog::HasCaptureReady(PersistantConfig &cfg)
return capInfo.exists() && capInfo.size() <= MaxUploadSize;
}
bool CrashDialog::CaptureTooLarge(PersistantConfig &cfg)
{
QFileInfo capInfo(cfg.CrashReport_LastOpenedCapture);
return capInfo.exists() && capInfo.size() > MaxUploadSize;
}
void CrashDialog::showEvent(QShowEvent *)
{
adjustSize();
@@ -319,6 +326,15 @@ void CrashDialog::on_send_clicked()
// uncheck and return back so they can confirm
if(ui->captureUpload->isEnabled())
ui->captureUpload->setChecked(false);
else
RDDialog::information(
this, tr("Capture required"),
tr("<html>For unrecoverable errors like the one you encountered, without a "
"capture to reproduce the problem it's impossible to tell what "
"went wrong so a crash report is unfortunately required.\n\n"
"If you don't wish to share your capture that is OK. You can also email me at <a "
"href=\"mailto:baldurk@baldurk.org?subject=RenderDoc%20Unrecoverable%20error\">"
"baldurk@baldurk.org</a> with information and I can help investigate.</html>"));
return;
}
}
+1
View File
@@ -47,6 +47,7 @@ public:
~CrashDialog();
static bool HasCaptureReady(PersistantConfig &cfg);
static bool CaptureTooLarge(PersistantConfig &cfg);
private slots:
// automatic slots