X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=InputEventManager%2Fsrc%2Fmain.cpp;h=f710cb40de8550f5a1ba72aa004bbd611f2fb6de;hb=09f2f0036f122e49aa49e6c446d723850192a725;hp=4862dbde5d0fdad687d6526ec9dbb074a1d8fc93;hpb=0a468d9b5ae7b3e5ba106facf17698d89b1ce200;p=staging%2FHomeScreen.git diff --git a/InputEventManager/src/main.cpp b/InputEventManager/src/main.cpp index 4862dbd..f710cb4 100644 --- a/InputEventManager/src/main.cpp +++ b/InputEventManager/src/main.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Mentor Graphics Development (Deutschland) GmbH + * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,17 +15,35 @@ */ #include +#include #include "inputeventmanager.h" +void noOutput(QtMsgType, const QMessageLogContext &, const QString &) +{ +} + int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); - // used for application settings (QSettings) QCoreApplication::setOrganizationDomain("LinuxFoundation"); QCoreApplication::setOrganizationName("AutomotiveGradeLinux"); QCoreApplication::setApplicationName("InputEventManager"); - QCoreApplication::setApplicationVersion("0.2.0"); + QCoreApplication::setApplicationVersion("0.7.0"); + + QCommandLineParser parser; + 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();