feat: add command line argument to select/add tab with a channel (#5111)

This commit is contained in:
nerix
2024-01-20 13:20:40 +01:00
committed by GitHub
parent acee654bd2
commit 7951af6104
6 changed files with 174 additions and 2 deletions
+8
View File
@@ -1,5 +1,6 @@
#pragma once
#include "common/ProviderId.hpp"
#include "common/WindowDescriptors.hpp"
#include <QApplication>
@@ -26,12 +27,18 @@ class Paths;
/// -v, --verbose
/// -V, --version
/// -c, --channels=t:channel1;t:channel2;...
/// -a, --activate=t:channel
/// --safe-mode
///
/// See documentation on `QGuiApplication` for documentation on Qt arguments like -platform.
class Args
{
public:
struct Channel {
ProviderId provider;
QString name;
};
Args() = default;
Args(const QApplication &app, const Paths &paths);
@@ -52,6 +59,7 @@ public:
bool dontSaveSettings{};
bool dontLoadMainWindow{};
std::optional<WindowLayout> customChannelLayout;
std::optional<Channel> activateChannel;
bool verbose{};
bool safeMode{};