1 #include <QCoreApplication>
2 #include <QCommandLineParser>
3 #include "timedateprovider.hpp"
5 void noOutput(QtMsgType, const QMessageLogContext &, const QString &)
9 int main(int argc, char *argv[])
11 QCoreApplication a(argc, argv);
13 QCoreApplication::setOrganizationDomain("LinuxFoundation");
14 QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
15 QCoreApplication::setApplicationName("SampleAppTimeDate");
16 QCoreApplication::setApplicationVersion("0.7.0");
18 QCommandLineParser parser;
19 parser.setApplicationDescription("AGL Sample app for StatusBar interface - see wwww... for more details");
20 parser.addHelpOption();
21 parser.addVersionOption();
22 QCommandLineOption quietOption(QStringList() << "q" << "quiet",
23 QCoreApplication::translate("main", "Be quiet. No outputs."));
24 parser.addOption(quietOption);
27 if (parser.isSet(quietOption))
29 qInstallMessageHandler(noOutput);
32 TimeDateProvider *tdp = new TimeDateProvider();