You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
963 B
35 lines
963 B
#include "appLogReaderApp.h"
|
|
#include "MainViewModel.h"
|
|
|
|
#include <QtCore/QCommandLineParser>
|
|
|
|
appLogReaderApp::appLogReaderApp(QObject *parent) :
|
|
CoreApp(parent)
|
|
{
|
|
QCoreApplication::setApplicationName(QStringLiteral("appLogReader"));
|
|
QCoreApplication::setApplicationVersion(QStringLiteral("1.0.0"));
|
|
QCoreApplication::setOrganizationName(QStringLiteral("Example Organization"));
|
|
}
|
|
|
|
void appLogReaderApp::performRegistrations()
|
|
{
|
|
//if you are using a qt resource (e.g. "applogreadercore.qrc"), initialize it here
|
|
Q_INIT_RESOURCE(applogreadercore);
|
|
}
|
|
|
|
int appLogReaderApp::startApp(const QStringList &arguments)
|
|
{
|
|
QCommandLineParser parser;
|
|
parser.addVersionOption();
|
|
parser.addHelpOption();
|
|
|
|
//add more options
|
|
|
|
//shows help or version automatically
|
|
if(!autoParse(parser, arguments))
|
|
return EXIT_SUCCESS;
|
|
|
|
//show a viewmodel to complete the startup
|
|
show<MainViewModel>();
|
|
return EXIT_SUCCESS;
|
|
}
|
|
|