fix: properly handle CLI arguments (#2368)
Fix CLI arguments not being respected. This happened due to the addition of category-based logging (--help, --version) and changes to the window loading ( --channels), respectively. When handling --channels, I took the liberty to refactor the previous version of window description (which relied on generating JSON) to directly building the WindowLayout.
This commit is contained in:
+6
-2
@@ -1,7 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <QApplication>
|
||||
#include <QJsonArray>
|
||||
#include <boost/optional.hpp>
|
||||
#include "common/WindowDescriptors.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
@@ -15,7 +16,10 @@ public:
|
||||
bool crashRecovery{};
|
||||
bool shouldRunBrowserExtensionHost{};
|
||||
bool dontSaveSettings{};
|
||||
QJsonArray channelsToJoin{};
|
||||
boost::optional<WindowLayout> customChannelLayout;
|
||||
|
||||
private:
|
||||
void applyCustomChannelLayout(const QString &argValue);
|
||||
};
|
||||
|
||||
void initArgs(const QApplication &app);
|
||||
|
||||
Reference in New Issue
Block a user