failure when showing help (#658)

This commit is contained in:
louib 2017-06-21 19:09:44 -04:00 committed by GitHub
parent 48ea024d7e
commit 95baf25648
5 changed files with 5 additions and 10 deletions

View File

@ -55,8 +55,7 @@ int Clip::execute(int argc, char** argv)
const QStringList args = parser.positionalArguments();
if (args.size() != 2) {
QCoreApplication app(argc, argv);
parser.showHelp();
return EXIT_FAILURE;
parser.showHelp(EXIT_FAILURE);
}
Database* db = nullptr;

View File

@ -44,8 +44,7 @@ int Extract::execute(int argc, char** argv)
const QStringList args = parser.positionalArguments();
if (args.size() != 1) {
parser.showHelp();
return EXIT_FAILURE;
parser.showHelp(EXIT_FAILURE);
}
out << "Insert the database password\n> ";

View File

@ -62,8 +62,7 @@ int List::execute(int argc, char** argv)
const QStringList args = parser.positionalArguments();
if (args.size() != 1 && args.size() != 2) {
QCoreApplication app(argc, argv);
parser.showHelp();
return EXIT_FAILURE;
parser.showHelp(EXIT_FAILURE);
}
Database* db = nullptr;

View File

@ -61,8 +61,7 @@ int Merge::execute(int argc, char** argv)
const QStringList args = parser.positionalArguments();
if (args.size() != 2) {
QCoreApplication app(argc, argv);
parser.showHelp();
return EXIT_FAILURE;
parser.showHelp(EXIT_FAILURE);
}
Database* db1;

View File

@ -44,8 +44,7 @@ int Show::execute(int argc, char** argv)
const QStringList args = parser.positionalArguments();
if (args.size() != 2) {
parser.showHelp();
return EXIT_FAILURE;
parser.showHelp(EXIT_FAILURE);
}
out << "Insert the database password\n> ";