Code Review
/
staging
/
HomeScreen.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add parameter "quiet" to suppress outputs
[staging/HomeScreen.git]
/
HomeScreen
/
src
/
main.cpp
diff --git
a/HomeScreen/src/main.cpp
b/HomeScreen/src/main.cpp
index
0eaae7e
..
ef7a015
100644
(file)
--- a/
HomeScreen/src/main.cpp
+++ b/
HomeScreen/src/main.cpp
@@
-27,6
+27,10
@@
#include "../src2/statusbarmodel.h"
#include "../src2/applicationmodel.h"
#include "../src2/statusbarmodel.h"
#include "../src2/applicationmodel.h"
+void noOutput(QtMsgType, const QMessageLogContext &, const QString &)
+{
+}
+
int main(int argc, char *argv[])
{
QGuiApplication a(argc, argv);
int main(int argc, char *argv[])
{
QGuiApplication a(argc, argv);
@@
-40,8
+44,16
@@
int main(int argc, char *argv[])
parser.setApplicationDescription("AGL HomeScreen - see wwww... for more details");
parser.addHelpOption();
parser.addVersionOption();
parser.setApplicationDescription("AGL HomeScreen - 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);
parser.process(a);
+ if (parser.isSet(quietOption))
+ {
+ qInstallMessageHandler(noOutput);
+ }
+
qDBusRegisterMetaType<AppInfo>();
qDBusRegisterMetaType<QList<AppInfo> >();
qDBusRegisterMetaType<AppInfo>();
qDBusRegisterMetaType<QList<AppInfo> >();