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.
28 lines
558 B
28 lines
558 B
7 years ago
|
#include "samplecoreapp.h"
|
||
|
|
||
|
#include <QtCore/QCommandLineParser>
|
||
|
|
||
|
QTMVVM_REGISTER_CORE_APP(SampleCoreApp)
|
||
|
|
||
|
SampleCoreApp::SampleCoreApp(QObject *parent) :
|
||
|
CoreApp(parent)
|
||
|
{}
|
||
|
|
||
|
int SampleCoreApp::startApp(const QStringList &arguments)
|
||
|
{
|
||
|
QCommandLineParser parser;
|
||
|
parser.addVersionOption();
|
||
|
parser.addHelpOption();
|
||
|
|
||
|
parser.addOption({
|
||
|
{QStringLiteral("n"), QStringLiteral("nothing")},
|
||
|
QStringLiteral("Pointless action")
|
||
|
});
|
||
|
|
||
|
if(!autoParse(parser, arguments))
|
||
|
return EXIT_SUCCESS;
|
||
|
|
||
|
//TODO implement app code
|
||
|
return EXIT_FAILURE;
|
||
|
}
|