From a24301f7466714e00557fb04c802c00174c24c09 Mon Sep 17 00:00:00 2001 From: James Turner Date: Thu, 16 Apr 2020 13:42:16 +0100 Subject: [PATCH] UI for enabling crash-reporting in the launcher --- src/GUI/qml/Settings.qml | 13 ++++++++++++- src/Main/options.cxx | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/GUI/qml/Settings.qml b/src/GUI/qml/Settings.qml index c328835b1..9013f9e4c 100644 --- a/src/GUI/qml/Settings.qml +++ b/src/GUI/qml/Settings.qml @@ -116,11 +116,22 @@ Item { hidden: _osName !== "win" keywords: ["console", "terminal", "log", "debug"] setting: "console" + }, + + SettingCheckbox { + id: enableCrashReporting + label: qsTr("Enable crash & error reporting") + description: qsTr("Send crash and error reports to the development team for analysis.") + defaultValue: true + hidden: (_osName !== "win") && (_osName !== "mac") + keywords: ["crash", "report", "telemetry"] + setting: "enable-sentry" } ] onApply: { - if (!showConsoleWin.hidden && showConsoleWin.checked) _config.setArg("console") + if (!showConsoleWin.hidden && showConsoleWin.checked) _config.setArg("console"); + if (!enableCrashReporting.hidden && enableCrashReporting.checked) _config.setArg("enable-sentry"); } } diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 729bad95f..ba02003ac 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -1629,6 +1629,7 @@ struct OptionDesc { {"language", true, OPTION_IGNORE, "", false, "", 0 }, {"console", false, OPTION_FUNC, "", false, "", fgOptConsole }, {"launcher", false, OPTION_IGNORE, "", false, "", 0 }, + {"enable-sentry", false, OPTION_IGNORE, "", false, "", nullptr }, {"allow-nasal-from-sockets", false, OPTION_IGNORE, "", false, "", 0 }, {"disable-rembrandt", false, OPTION_BOOL, "/sim/rendering/rembrandt/enabled", false, "", 0 }, {"enable-rembrandt", false, OPTION_BOOL, "/sim/rendering/rembrandt/enabled", true, "", 0 },