Commit eeaf2550 authored by Jan Möbius's avatar Jan Möbius
Browse files

Merge branch 'fixBatchCommandLine' into 'master'

also parse command line options in batch mode.

See merge request !27
parents 5bec885c be7fb07a
...@@ -596,6 +596,23 @@ int main(int argc, char **argv) ...@@ -596,6 +596,23 @@ int main(int argc, char **argv)
QCoreApplication::setApplicationName(TOSTRING(PRODUCT_STRING)); QCoreApplication::setApplicationName(TOSTRING(PRODUCT_STRING));
QCoreApplication::setApplicationVersion(OpenFlipper::Options::coreVersion()); QCoreApplication::setApplicationVersion(OpenFlipper::Options::coreVersion());
switch (parseCommandLine(parser, &errorMessage)) {
case CommandLineOk:
case CommandLineError:
fputs(qPrintable(errorMessage), stderr);
fputs("\n\n", stderr);
fputs(qPrintable(parser.helpText()), stderr);
return 1;
case CommandLineVersionRequested:
printf("%s %s\n", qPrintable(QCoreApplication::applicationName()),
return 0;
case CommandLineHelpRequested:
// create widget ( this also reads the ini files ) // create widget ( this also reads the ini files )
Core * w = new Core( ); Core * w = new Core( );
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment