diff options
author | Liang Qi <liang.qi@qt.io> | 2017-11-21 10:58:50 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-11-21 10:58:51 +0100 |
commit | 848245c7d3e99f14f50417e45fcfdff2a7022502 (patch) | |
tree | a583ed65d09e27078f3178a7bbe890335c51a8a0 /src | |
parent | ef10b82a28114718591bcdabec031ce05caacf37 (diff) | |
parent | 08778586413adad7b3af35c7cb97416757d599c0 (diff) |
Merge remote-tracking branch 'origin/5.9.3' into 5.10.0
Change-Id: Id2b11dccb04fc99d10608f690f5827bfa9b2114c
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/qml/qqmltypeloader.cpp | 10 | ||||
-rw-r--r-- | src/qml/types/qqmldelegatemodel.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/adaptations/software/qsgsoftwareinternalimagenode.cpp | 9 |
3 files changed, 16 insertions, 5 deletions
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index 8e9f57f661..128e37d51b 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -2409,7 +2409,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(); } diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp index 4d2a9746c3..4ee1ab1b76 100644 --- a/src/qml/types/qqmldelegatemodel.cpp +++ b/src/qml/types/qqmldelegatemodel.cpp @@ -1957,6 +1957,8 @@ void QQmlDelegateModelItem::destroyObject() Q_ASSERT(data); if (data->ownContext) { data->ownContext->clearContext(); + if (data->ownContext->contextObject == object) + data->ownContext->contextObject = nullptr; data->ownContext = 0; data->context = 0; } diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalimagenode.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalimagenode.cpp index 10291b9cb5..8843b6450a 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalimagenode.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalimagenode.cpp @@ -490,12 +490,13 @@ QRectF QSGSoftwareInternalImageNode::rect() const const QPixmap &QSGSoftwareInternalImageNode::pixmap() const { - if (QSGSoftwarePixmapTexture *pt = qobject_cast<QSGSoftwarePixmapTexture*>(m_texture)) { + if (QSGSoftwarePixmapTexture *pt = qobject_cast<QSGSoftwarePixmapTexture*>(m_texture)) return pt->pixmap(); - } else { - QSGSoftwareLayer *layer = qobject_cast<QSGSoftwareLayer*>(m_texture); + if (QSGSoftwareLayer *layer = qobject_cast<QSGSoftwareLayer*>(m_texture)) return layer->pixmap(); - } + Q_ASSERT(m_texture == 0); + static const QPixmap nullPixmap; + return nullPixmap; } QT_END_NAMESPACE |