aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-11-25 12:41:25 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2017-11-25 12:41:25 +0000
commit22858d41a5351e1bc3ffd9778af77643d90e395f (patch)
tree69222d2b5288dbfb9784994dece21e58bd75f041 /src
parentefe1926598c69a09c9365673bba6961a83936d49 (diff)
parent23e97360bdc1327ab1b3b3c7e7db69a7c56ef1e0 (diff)
Merge "Merge remote-tracking branch 'origin/5.9.3' into 5.9" into refs/staging/5.9
Diffstat (limited to 'src')
-rw-r--r--src/qml/qml/qqmltypeloader.cpp10
-rw-r--r--src/qml/types/qqmldelegatemodel.cpp2
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwareinternalimagenode.cpp9
3 files changed, 16 insertions, 5 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();
}
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp
index 26e6a81418..e3906f2a7e 100644
--- a/src/qml/types/qqmldelegatemodel.cpp
+++ b/src/qml/types/qqmldelegatemodel.cpp
@@ -1979,6 +1979,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