feat: add --safe-mode command line option (#4985)
This ensures the settings button isn't hidden, and disables plugins from being loaded to make sure the user can always recover from messing things up
This commit is contained in:
@@ -38,6 +38,9 @@ Args::Args(const QApplication &app)
|
||||
"Attaches to the Console on windows, "
|
||||
"allowing you to see debug output."});
|
||||
crashRecoveryOption.setFlags(QCommandLineOption::HiddenFromHelp);
|
||||
QCommandLineOption safeModeOption(
|
||||
"safe-mode", "Starts Chatterino without loading Plugins and always "
|
||||
"show the settings button.");
|
||||
|
||||
parser.addOptions({
|
||||
{{"V", "version"}, "Displays version information."},
|
||||
@@ -45,6 +48,7 @@ Args::Args(const QApplication &app)
|
||||
parentWindowOption,
|
||||
parentWindowIdOption,
|
||||
verboseOption,
|
||||
safeModeOption,
|
||||
});
|
||||
parser.addOption(QCommandLineOption(
|
||||
{"c", "channels"},
|
||||
@@ -89,6 +93,10 @@ Args::Args(const QApplication &app)
|
||||
|
||||
this->parentWindowId = parser.value(parentWindowIdOption).toULongLong();
|
||||
}
|
||||
if (parser.isSet(safeModeOption))
|
||||
{
|
||||
this->safeMode = true;
|
||||
}
|
||||
}
|
||||
|
||||
void Args::applyCustomChannelLayout(const QString &argValue)
|
||||
|
||||
@@ -26,6 +26,7 @@ public:
|
||||
bool dontLoadMainWindow{};
|
||||
std::optional<WindowLayout> customChannelLayout;
|
||||
bool verbose{};
|
||||
bool safeMode{};
|
||||
|
||||
private:
|
||||
void applyCustomChannelLayout(const QString &argValue);
|
||||
|
||||
Reference in New Issue
Block a user