From ac32dbc1431cd11ff2582a1bb02fc62bbe9fe789 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 3 Oct 2015 14:10:58 +0300 Subject: [PATCH] Use correct an exit code. --HG-- branch : develop --- src/app/tape/main.cpp | 2 +- src/app/tape/mapplication.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/tape/main.cpp b/src/app/tape/main.cpp index 718ed5766..9bdbc408b 100644 --- a/src/app/tape/main.cpp +++ b/src/app/tape/main.cpp @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) MApplication app(argc, argv); if (not app.IsTheOnly()) { - return 0; + return V_EX_OK; } app.InitOptions(); app.ParseCommandLine(app.arguments()); diff --git a/src/app/tape/mapplication.cpp b/src/app/tape/mapplication.cpp index f4b5f9201..d2fe0884e 100644 --- a/src/app/tape/mapplication.cpp +++ b/src/app/tape/mapplication.cpp @@ -581,7 +581,7 @@ void MApplication::ParseCommandLine(const QStringList &arguments) 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, " "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", "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."))); - 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", "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", "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)