Use correct an exit code.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-10-03 14:10:58 +03:00
parent ed156d3d57
commit ac32dbc143
2 changed files with 5 additions and 5 deletions

View File

@ -51,7 +51,7 @@ int main(int argc, char *argv[])
MApplication app(argc, argv); MApplication app(argc, argv);
if (not app.IsTheOnly()) if (not app.IsTheOnly())
{ {
return 0; return V_EX_OK;
} }
app.InitOptions(); app.InitOptions();
app.ParseCommandLine(app.arguments()); app.ParseCommandLine(app.arguments());

View File

@ -581,7 +581,7 @@ void MApplication::ParseCommandLine(const QStringList &arguments)
fprintf(stderr, "%s\n", qPrintable(QCoreApplication::translate("main", fprintf(stderr, "%s\n", qPrintable(QCoreApplication::translate("main",
"Error: Invalid base height argument. Must be 92, 98, 104, 110, 116, 122, 128, 134, 140, 146, 152, 158, " "Error: Invalid base height argument. Must be 92, 98, 104, 110, 116, 122, 128, 134, 140, 146, 152, 158, "
"164, 170, 176, 182 or 188 cm."))); "164, 170, 176, 182 or 188 cm.")));
parser.showHelp(1); parser.showHelp(V_EX_USAGE);
} }
} }
} }
@ -601,7 +601,7 @@ void MApplication::ParseCommandLine(const QStringList &arguments)
fprintf(stderr, "%s\n", qPrintable(QCoreApplication::translate("main", fprintf(stderr, "%s\n", qPrintable(QCoreApplication::translate("main",
"Error: Invalid base size argument. Must be 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, " "Error: Invalid base size argument. Must be 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, "
"52, 54 or 56 cm."))); "52, 54 or 56 cm.")));
parser.showHelp(1); parser.showHelp(V_EX_USAGE);
} }
} }
} }
@ -623,7 +623,7 @@ void MApplication::ParseCommandLine(const QStringList &arguments)
{ {
fprintf(stderr, "%s\n", qPrintable(QCoreApplication::translate("main", fprintf(stderr, "%s\n", qPrintable(QCoreApplication::translate("main",
"Error: Invalid base size argument. Must be cm, mm or inch."))); "Error: Invalid base size argument. Must be cm, mm or inch.")));
parser.showHelp(1); parser.showHelp(V_EX_USAGE);
} }
} }
} }
@ -642,7 +642,7 @@ void MApplication::ParseCommandLine(const QStringList &arguments)
{ {
fprintf(stderr, "%s\n", qPrintable(QCoreApplication::translate("main", fprintf(stderr, "%s\n", qPrintable(QCoreApplication::translate("main",
"Error: Test mode doesn't support openning several files."))); "Error: Test mode doesn't support openning several files.")));
parser.showHelp(1); parser.showHelp(V_EX_USAGE);
} }
for (int i = 0; i < args.size(); ++i) for (int i = 0; i < args.size(); ++i)