Commit 7c69717d authored by Dennis Nienhüser's avatar Dennis Nienhüser
Browse files

Don't crash when no arguments are given, show help instead and exit.

parent 4e0a93da
...@@ -103,6 +103,10 @@ int main(int argc, char *argv[]) ...@@ -103,6 +103,10 @@ int main(int argc, char *argv[])
parser.process(app); parser.process(app);
const QStringList args = parser.positionalArguments(); const QStringList args = parser.positionalArguments();
if (args.isEmpty()) {
parser.showHelp();
return 0;
}
// input is args.at(0), output is args.at(1) // input is args.at(0), output is args.at(1)
QString inputFileName = args.at(0); QString inputFileName = args.at(0);
......
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