UI: Add Help -> Crash Reports submenu

Adds the ability to upload crash reports, making it easier for users to
give us crash data.  This should be considered a temporarily solution,
as automated crash reporting should be the ideal solution as soon as
time permits.
This commit is contained in:
jp9000
2018-03-16 16:27:49 -07:00
parent 341bd9bcec
commit 3b64610717
6 changed files with 58 additions and 1 deletions

View File

@@ -1655,7 +1655,13 @@ void OBSBasic::OBSInit()
this, SLOT(OpenMultiviewWindow()));
#if !defined(_WIN32) && !defined(__APPLE__)
delete ui->actionShowCrashLogs;
delete ui->actionUploadLastCrashLog;
delete ui->menuCrashLogs;
delete ui->actionCheckForUpdates;
ui->actionShowCrashLogs = nullptr;
ui->actionUploadLastCrashLog = nullptr;
ui->menuCrashLogs = nullptr;
ui->actionCheckForUpdates = nullptr;
#endif
}
@@ -4317,6 +4323,21 @@ void OBSBasic::on_actionViewCurrentLog_triggered()
QDesktopServices::openUrl(url);
}
void OBSBasic::on_actionShowCrashLogs_triggered()
{
char logDir[512];
if (GetConfigPath(logDir, sizeof(logDir), "obs-studio/crashes") <= 0)
return;
QUrl url = QUrl::fromLocalFile(QT_UTF8(logDir));
QDesktopServices::openUrl(url);
}
void OBSBasic::on_actionUploadLastCrashLog_triggered()
{
UploadLog("obs-studio/crashes", App()->GetLastCrashLog());
}
void OBSBasic::on_actionCheckForUpdates_triggered()
{
CheckForUpdates(true);