diff options
author | 2016-12-16 18:12:33 +0100 | |
---|---|---|
committer | 2016-12-16 18:12:33 +0100 | |
commit | 0e3504774e4a889a3836c2eb2e02f4d38d3dc9b1 (patch) | |
tree | 3472ae62d578553a6c85fe69c2dbb95ae5898e82 /InputEventManager/src | |
parent | 1edc5d1bebfd4156b0b58d693f0431d17f20a508 (diff) |
Add parameter "quiet" to suppress outputs
This will disable all debug outputs. All!
Signed-off-by: Bocklage, Jens <Jens_Bocklage@mentor.com>
Diffstat (limited to 'InputEventManager/src')
-rw-r--r-- | InputEventManager/src/main.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/InputEventManager/src/main.cpp b/InputEventManager/src/main.cpp index afd36d7..a85a2d3 100644 --- a/InputEventManager/src/main.cpp +++ b/InputEventManager/src/main.cpp @@ -18,6 +18,10 @@ #include <QCommandLineParser> #include "inputeventmanager.h" +void noOutput(QtMsgType, const QMessageLogContext &, const QString &) +{ +} + int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); @@ -31,8 +35,16 @@ int main(int argc, char *argv[]) parser.setApplicationDescription("AGL InputEventManager - see wwww... for more details"); parser.addHelpOption(); parser.addVersionOption(); + QCommandLineOption quietOption(QStringList() << "q" << "quiet", + QCoreApplication::translate("main", "Be quiet. No outputs.")); + parser.addOption(quietOption); parser.process(a); + if (parser.isSet(quietOption)) + { + qInstallMessageHandler(noOutput); + } + InputEventManager *inputEventManager = new InputEventManager(); return a.exec(); |