Argument parsing rework (#1940)
* Experimental argument handling * Restored browser extension launch functionality Also moved check from BrowerExtension.cpp to Args.cpp as it is more relevant there and doesn't require passing arguments to a function in another file * Fixed formatting * Simplified Args.cpp code, added changelog entry * Hid crash-recovery from help * Dont save settings if launched with --channels * Changed parsing method to t:channel * Code cleanup * Changed plaform delimeter to :, platform defaults to Twitch Co-authored-by: fourtf <tf.four@gmail.com>
This commit is contained in:
+7
-3
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QStringList>
|
||||
#include <QApplication>
|
||||
#include <QJsonArray>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
@@ -8,13 +9,16 @@ namespace chatterino {
|
||||
class Args
|
||||
{
|
||||
public:
|
||||
Args(const QStringList &args);
|
||||
Args(const QApplication &app);
|
||||
|
||||
bool printVersion{};
|
||||
bool crashRecovery{};
|
||||
bool shouldRunBrowserExtensionHost{};
|
||||
bool dontSaveSettings{};
|
||||
QJsonArray channelsToJoin{};
|
||||
};
|
||||
|
||||
void initArgs(const QStringList &args);
|
||||
void initArgs(const QApplication &app);
|
||||
const Args &getArgs();
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user