From 172111ae0703d223575862f60e0ceba1973fe681 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 30 Sep 2013 05:11:47 +0200 Subject: [PATCH] Fix JS script imports with namespaces Make sure to add the resolved namespaces to the import cache, before later adding scripts into it. Change-Id: I41537230c49248c2e6c60623bc5a1fe3d50d76cd Reviewed-by: Lars Knoll --- src/qml/qml/qqmltypeloader.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index 52b42e8..849f0f4 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -2278,6 +2278,10 @@ void QQmlTypeData::compile() if (m_useNewCompiler) { m_compiledData->importCache = new QQmlTypeNameCache; + + foreach (const QString &ns, m_namespaces) + m_compiledData->importCache->add(ns); + m_imports.populateCache(m_compiledData->importCache); m_compiledData->importCache->addref(); -- 2.7.4