1
0
mirror of https://github.com/tumic0/pbf2png.git synced 2024-11-23 19:35:54 +01:00

Added missing command line parameters parse error reporting

This commit is contained in:
Martin Tůma 2023-12-10 10:54:28 +01:00
parent 62ed8a7a84
commit 1eb9128b36

View File

@ -67,11 +67,13 @@ int App::run()
parser.addOption(mask); parser.addOption(mask);
parser.addOption(outdir); parser.addOption(outdir);
parser.addPositionalArgument("DIR", "PBF Tiles directory"); parser.addPositionalArgument("DIR", "PBF Tiles directory");
if (!parser.parse(arguments()))
return -1;
QTextStream err(stderr); QTextStream err(stderr);
if (!parser.parse(arguments())) {
err << parser.errorText() << "\n";
return -1;
}
const QStringList args = parser.positionalArguments(); const QStringList args = parser.positionalArguments();
if (!args.size()) { if (!args.size()) {
err << parser.helpText(); err << parser.helpText();