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.

36 lines
963 B

2 years ago
#include "AppLogReaderApp.h"
2 years ago
#include "MainViewModel.h"
#include <QtCore/QCommandLineParser>
2 years ago
AppLogReaderApp::AppLogReaderApp(QObject *parent) :
2 years ago
CoreApp(parent)
{
QCoreApplication::setApplicationName(QStringLiteral("appLogReader"));
QCoreApplication::setApplicationVersion(QStringLiteral("1.0.0"));
QCoreApplication::setOrganizationName(QStringLiteral("Example Organization"));
}
2 years ago
void AppLogReaderApp::performRegistrations()
2 years ago
{
//if you are using a qt resource (e.g. "applogreadercore.qrc"), initialize it here
Q_INIT_RESOURCE(applogreadercore);
}
2 years ago
int AppLogReaderApp::startApp(const QStringList &arguments)
2 years ago
{
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;
}