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:
Paweł
2020-09-26 16:03:51 +02:00
committed by GitHub
parent 2f3accf3cb
commit d314566ab6
10 changed files with 95 additions and 28 deletions
+5 -1
View File
@@ -1,6 +1,7 @@
#include "widgets/dialogs/SettingsDialog.hpp"
#include "Application.hpp"
#include "common/Args.hpp"
#include "singletons/Resources.hpp"
#include "util/LayoutCreator.hpp"
#include "util/Shortcut.hpp"
@@ -315,7 +316,10 @@ void SettingsDialog::showEvent(QShowEvent *)
///// Widget creation helpers
void SettingsDialog::onOkClicked()
{
pajlada::Settings::SettingManager::gSave();
if (!getArgs().dontSaveSettings)
{
pajlada::Settings::SettingManager::gSave();
}
this->close();
}