Allow to use QML imports shipped in the qrc file

This adds qrc://imports to the paths that the Qml engine considers for
findings import plugins. This change makes loading the mobilecomponents
plugin work (it won't be found otherwise).

Signed-off-by: Sebastian Kügler <sebas@kde.org>
This commit is contained in:
Sebastian Kügler 2015-11-29 17:41:47 +01:00
parent c302f222ce
commit 5e536cd812

View file

@ -31,6 +31,7 @@ void run_ui()
qmlRegisterType<QMLManager>("org.subsurfacedivelog.mobile", 1, 0, "QMLManager");
qmlRegisterType<QMLProfile>("org.subsurfacedivelog.mobile", 1, 0, "QMLProfile");
QQmlApplicationEngine engine;
engine.addImportPath("qrc://imports");
DiveListModel diveListModel;
QSortFilterProxyModel *sortModel = new QSortFilterProxyModel(0);
sortModel->setSourceModel(&diveListModel);