From ea76d0e8d2aa8948cc1e29090c0a8bf171617c8e Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Thu, 14 Nov 2019 20:37:03 -0500 Subject: [PATCH] Added output option for debug statements to the command line --- main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.cpp b/main.cpp index 4d8c7f9..ae78844 100644 --- a/main.cpp +++ b/main.cpp @@ -116,6 +116,9 @@ int main(int argc, char *argv[]) auto help_option = parser.addHelpOption (); auto version_option = parser.addVersionOption (); + QCommandLineOption output_option(QStringList() << "o" << "output", "Write debug statements into .", "file"); + parser.addOption (output_option); + // support for multiple instances running from a single installation QCommandLineOption rig_option (QStringList {} << "r" << "rig-name" , a.translate ("main", "Where is for multi-instance support.") @@ -151,6 +154,10 @@ int main(int argc, char *argv[]) } } + if(parser.isSet(output_option)){ + new TraceFile(parser.value(output_option)); + } + QStandardPaths::setTestModeEnabled (parser.isSet (test_option)); // support for multiple instances running from a single installation