diff options
Diffstat (limited to 'src/qml/qml/qqmltypeloader.cpp')
-rw-r--r-- | src/qml/qml/qqmltypeloader.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index 42d82afef4..132c0f64c0 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -2428,15 +2428,10 @@ void QQmlTypeData::dataReceived(const SourceCodeData &data) void QQmlTypeData::initializeFromCachedUnit(const QQmlPrivate::CachedQmlUnit *unit) { m_document.reset(new QmlIR::Document(isDebugging())); - if (unit->loadIR) { - // old code path for older generated code - unit->loadIR(m_document.data(), unit); - } else { - // new code path - QmlIR::IRLoader loader(unit->qmlData, m_document.data()); - loader.load(); - m_document->javaScriptCompilationUnit.adopt(unit->createCompilationUnit()); - } + QmlIR::IRLoader loader(unit->qmlData, m_document.data()); + loader.load(); + m_document->jsModule.fileName = finalUrlString(); + m_document->javaScriptCompilationUnit.adopt(unit->createCompilationUnit()); continueLoadFromIR(); } |