mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
startup mobile: test for --testqml when loading qml engine.
the command line option --testqml selects if running using resources or files on disk. Signed-off-by: Jan Iversen <jan@casacondor.com>
This commit is contained in:
parent
624bd9e7ec
commit
271d058af3
1 changed files with 10 additions and 0 deletions
|
@ -111,7 +111,17 @@ void run_ui()
|
|||
ctxt->setContextProperty("connectionListModel", &connectionListModel);
|
||||
ctxt->setContextProperty("logModel", MessageHandlerModel::self());
|
||||
|
||||
#ifdef SUBSURFACE_MOBILE_DESKTOP
|
||||
if (testqml) {
|
||||
QString fileLoad(testqml);
|
||||
fileLoad += "/main.qml";
|
||||
engine.load(QUrl(fileLoad));
|
||||
} else {
|
||||
engine.load(QUrl(QStringLiteral("qrc:///qml/main.qml")));
|
||||
}
|
||||
#else
|
||||
engine.load(QUrl(QStringLiteral("qrc:///qml/main.qml")));
|
||||
#endif
|
||||
qDebug() << "loaded main.qml";
|
||||
LOG_STP("run_ui qml loaded");
|
||||
qqWindowObject = engine.rootObjects().value(0);
|
||||
|
|
Loading…
Reference in a new issue