aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljsimporter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmlcompiler/qqmljsimporter.cpp')
-rw-r--r--src/qmlcompiler/qqmljsimporter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qmlcompiler/qqmljsimporter.cpp b/src/qmlcompiler/qqmljsimporter.cpp
index 73bc63e0fa..5b693f5c72 100644
--- a/src/qmlcompiler/qqmljsimporter.cpp
+++ b/src/qmlcompiler/qqmljsimporter.cpp
@@ -209,6 +209,9 @@ void QQmlJSImporter::processImport(
QQmlJSImporter::AvailableTypes *types,
const QString &prefix)
{
+ if (!prefix.isEmpty())
+ types->qmlNames.insert(prefix, {}); // Empty type means "this is the prefix"
+
for (auto it = import.scripts.begin(); it != import.scripts.end(); ++it)
types->qmlNames.insert(prefixedName(prefix, it.key()), it.value());