diff options
Diffstat (limited to 'src/qcam/main.cpp')
-rw-r--r-- | src/qcam/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qcam/main.cpp b/src/qcam/main.cpp index 5505a5d8..5eff90a3 100644 --- a/src/qcam/main.cpp +++ b/src/qcam/main.cpp @@ -16,6 +16,7 @@ #include "../cam/options.h" #include "../cam/stream_options.h" #include "main_window.h" +#include "message_handler.h" void signalHandler([[maybe_unused]] int signal) { @@ -38,6 +39,8 @@ OptionsParser::Options parseOptions(int argc, char *argv[]) "renderer", ArgumentRequired, "renderer"); parser.addOption(OptStream, &streamKeyValue, "Set configuration of a camera stream", "stream", true); + parser.addOption(OptVerbose, OptionNone, + "Print verbose log messages", "verbose"); OptionsParser::Options options = parser.parse(argc, argv); if (options.isSet(OptHelp)) @@ -57,6 +60,8 @@ int main(int argc, char **argv) if (options.isSet(OptHelp)) return 0; + MessageHandler msgHandler(options.isSet(OptVerbose)); + struct sigaction sa = {}; sa.sa_handler = &signalHandler; sigaction(SIGINT, &sa, nullptr); |