X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=WindowManager%2Fsrc%2Fmain.cpp;h=5526c92689cae4ed08fc1a98c8f93dac6f23793e;hb=09f2f0036f122e49aa49e6c446d723850192a725;hp=5af8be1d5abe8065db9657e7c604d7bfdfae8e5c;hpb=88c577e3981f71f5d0aa88bcf095734855f66d06;p=staging%2FHomeScreen.git diff --git a/WindowManager/src/main.cpp b/WindowManager/src/main.cpp index 5af8be1..5526c92 100644 --- a/WindowManager/src/main.cpp +++ b/WindowManager/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. @@ -18,6 +18,11 @@ #include #include "windowmanager.hpp" + +void noOutput(QtMsgType, const QMessageLogContext &, const QString &) +{ +} + int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); @@ -31,12 +36,20 @@ int main(int argc, char *argv[]) parser.setApplicationDescription("AGL WindowManager - see wwww... for more details"); parser.addHelpOption(); parser.addVersionOption(); + QCommandLineOption quietOption(QStringList() << "q" << "quiet", + QCoreApplication::translate("main", "Be quiet. No outputs.")); + parser.addOption(quietOption); QCommandLineOption displayOption(QStringList() << "d" << "display-id", QCoreApplication::translate("main", "The display with this to manage. Default=0"), QCoreApplication::translate("main", "id")); parser.addOption(displayOption); parser.process(a); + if (parser.isSet(quietOption)) + { + qInstallMessageHandler(noOutput); + } + int displayId = 0; if (parser.isSet(displayOption)) {