diff options
author | Liang Qi <liang.qi@qt.io> | 2017-11-23 09:48:31 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-11-23 09:48:31 +0100 |
commit | 23e97360bdc1327ab1b3b3c7e7db69a7c56ef1e0 (patch) | |
tree | a58b73afe7893772b700507596eaded6f83544ba /src/qml/qml/qqmltypeloader.cpp | |
parent | a79feeee451bcf28673292555795677a789e8513 (diff) | |
parent | 08778586413adad7b3af35c7cb97416757d599c0 (diff) |
Merge remote-tracking branch 'origin/5.9.3' into 5.9
Change-Id: Ic6457df47bed359fd43653e73726f1896944241c
Diffstat (limited to 'src/qml/qml/qqmltypeloader.cpp')
-rw-r--r-- | src/qml/qml/qqmltypeloader.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index 1a7b8250e7..f3077f673b 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -2427,7 +2427,15 @@ void QQmlTypeData::dataReceived(const SourceCodeData &data) void QQmlTypeData::initializeFromCachedUnit(const QQmlPrivate::CachedQmlUnit *unit) { m_document.reset(new QmlIR::Document(isDebugging())); - unit->loadIR(m_document.data(), unit); + 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()); + } continueLoadFromIR(); } |