Avoid to stop the application when the CLI parser cannot parse its arguments (like arguments that doesn't exist)

This commit is contained in:
Julien Wadel 2021-10-12 16:22:04 +02:00
parent b4b0e05c97
commit 2d7aec88e2

View file

@ -271,7 +271,8 @@ void App::processArguments(QHash<QString,QString> args){
for(auto i = keys.begin() ; i != keys.end() ; ++i){
parameters << "--"+(*i)+"="+args.value(*i);
}
mParser->process(parameters);
if(!mParser->parse(parameters))
qWarning() << "Parsing error : " << mParser->errorText();
}
static QQuickWindow *createSubWindow (QQmlApplicationEngine *engine, const char *path) {