workflows: check if QML loads successfully

This commit is contained in:
selsta
2019-11-20 00:31:25 +01:00
parent 2f5c47e95f
commit 4a526810ce
2 changed files with 12 additions and 1 deletions

View File

@@ -174,7 +174,10 @@ int main(int argc, char *argv[])
QCoreApplication::translate("main", "Log to specified file"),
QCoreApplication::translate("main", "file"));
QCommandLineOption testQmlOption("test-qml");
testQmlOption.setFlags(QCommandLineOption::HiddenFromHelp);
parser.addOption(logPathOption);
parser.addOption(testQmlOption);
parser.addHelpOption();
parser.process(app);
@@ -405,6 +408,10 @@ int main(int argc, char *argv[])
return 1;
}
// QML loaded successfully.
if (parser.isSet(testQmlOption))
return 0;
#ifdef WITH_SCANNER
QObject *qmlCamera = rootObject->findChild<QObject*>("qrCameraQML");
if (qmlCamera)