aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlimport.cpp
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2018-06-04 11:33:45 +0200
committerLorn Potter <lorn.potter@gmail.com>2018-09-05 00:00:00 +0000
commiteb6201b2af725d64e5e92f19a512b1ff23ceba51 (patch)
tree5ad1717b096f70b90a6ef031de8e5253d64361d8 /src/qml/qml/qqmlimport.cpp
parentf5ad1a13e5ce9ce1389ea7731829ea455259a4db (diff)
WebAssembly for QtDeclarative
This is the squashed diff from wip/webassembly to 5.12. Done-with: Lorn Potter <lorn.potter@gmail.com> Change-Id: Ieef34accefef38018a66d3c39bfacb825af4bea6 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'src/qml/qml/qqmlimport.cpp')
-rw-r--r--src/qml/qml/qqmlimport.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
index 1c37894751..035deea980 100644
--- a/src/qml/qml/qqmlimport.cpp
+++ b/src/qml/qml/qqmlimport.cpp
@@ -1770,8 +1770,14 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
{
filePluginPath << QLatin1String(".");
// Search order is applicationDirPath(), qrc:/qt-project.org/imports, $QML2_IMPORT_PATH, QLibraryInfo::Qml2ImportsPath
+#ifndef Q_OS_WASM
+ QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
+#else
+ // Hardcode the qml imports to "qml/" relative to the app exe.
+ // This should perhaps be set via Qml2Imports in qt.conf.
+ QString installImportsPath = QStringLiteral("qml/");
+#endif
- QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
addImportPath(installImportsPath);
// env import paths