now attaches to parent console on windows
This commit is contained in:
+12
-1
@@ -7,6 +7,7 @@
|
||||
#include "common/QLogging.hpp"
|
||||
#include "singletons/Paths.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "util/AttachToConsole.hpp"
|
||||
#include "util/CombinePath.hpp"
|
||||
#include "widgets/Window.hpp"
|
||||
|
||||
@@ -26,10 +27,17 @@ Args::Args(const QApplication &app)
|
||||
QCommandLineOption parentWindowOption("parent-window");
|
||||
parentWindowOption.setFlags(QCommandLineOption::HiddenFromHelp);
|
||||
|
||||
// Verbose
|
||||
QCommandLineOption verboseOption({{"v", "verbose"},
|
||||
"Attaches to the Console on windows, "
|
||||
"allowing you to see debug output."});
|
||||
crashRecoveryOption.setFlags(QCommandLineOption::HiddenFromHelp);
|
||||
|
||||
parser.addOptions({
|
||||
{{"V", "version"}, "Displays version information."},
|
||||
crashRecoveryOption,
|
||||
parentWindowOption,
|
||||
verboseOption,
|
||||
});
|
||||
parser.addOption(QCommandLineOption(
|
||||
{"c", "channels"},
|
||||
@@ -46,6 +54,7 @@ Args::Args(const QApplication &app)
|
||||
|
||||
if (parser.isSet("help"))
|
||||
{
|
||||
attachToConsole();
|
||||
qInfo().noquote() << parser.helpText();
|
||||
::exit(EXIT_SUCCESS);
|
||||
}
|
||||
@@ -60,7 +69,9 @@ Args::Args(const QApplication &app)
|
||||
this->applyCustomChannelLayout(parser.value("c"));
|
||||
}
|
||||
|
||||
this->printVersion = parser.isSet("v");
|
||||
this->verbose = parser.isSet(verboseOption);
|
||||
|
||||
this->printVersion = parser.isSet("V");
|
||||
this->crashRecovery = parser.isSet("crash-recovery");
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ public:
|
||||
bool shouldRunBrowserExtensionHost{};
|
||||
bool dontSaveSettings{};
|
||||
boost::optional<WindowLayout> customChannelLayout;
|
||||
bool verbose{};
|
||||
|
||||
private:
|
||||
void applyCustomChannelLayout(const QString &argValue);
|
||||
|
||||
Reference in New Issue
Block a user