diff options
author | Liang Qi <liang.qi@qt.io> | 2016-09-16 23:21:10 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-09-16 23:21:16 +0200 |
commit | 345226aa3ecee8642c3bf46e40c981d4a49d958e (patch) | |
tree | eb49f01c70d239286cb3f08bbe677c47c640cd12 /src/qml | |
parent | 5149aa68eca6ede8836ec4f07a14d22d9da9b161 (diff) | |
parent | a273a0ad9c1df7aed612ee6353753f668d545076 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: Ib45654e3e79087da4754377f0d78b70c44ed4695
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc | 3 | ||||
-rw-r--r-- | src/qml/qml.pro | 6 | ||||
-rw-r--r-- | src/qml/qml/qqmltypeloader.cpp | 6 | ||||
-rw-r--r-- | src/qml/types/qqmldelegatemodel.cpp | 20 |
4 files changed, 28 insertions, 7 deletions
diff --git a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc index de0515e5d0..3692605c18 100644 --- a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc +++ b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc @@ -855,7 +855,8 @@ are otherwise unavailable to the object. In particular, they allow objects to access properties or signals that are specifically relevant to the individual object. -A QML type implementation may choose to create an \e {attaching type} with +A QML type implementation may choose to \l {Providing Attached Objects for +Data Annotations}{create an \e {attaching type} in C++} with particular properties and signals. Instances of this type can then be created and \e attached to specific objects at run time, allowing those objects to access the properties and signals of the attaching type. These are accessed by diff --git a/src/qml/qml.pro b/src/qml/qml.pro index f4862a17a6..7c9eef6df1 100644 --- a/src/qml/qml.pro +++ b/src/qml/qml.pro @@ -18,9 +18,13 @@ exists("qqml_enable_gcov") { greaterThan(QT_GCC_MAJOR_VERSION, 5) { # Our code is bad. Temporary workaround. - QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks + QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks -fno-lifetime-dse } +# QTBUG-55238, disable new optimizer for MSVC 2015/Update 3. +release:win32-msvc*:equals(QT_CL_MAJOR_VERSION, 19):equals(QT_CL_MINOR_VERSION, 00): \ + greaterThan(QT_CL_PATCH_VERSION, 24212):QMAKE_CXXFLAGS += -d2SSAOptimizer- + QMAKE_DOCS = $$PWD/doc/qtqml.qdocconf # 2415: variable "xx" of static storage duration was declared but never referenced diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index 739a833a30..f2f5cffbf8 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -1950,8 +1950,10 @@ void QQmlTypeLoader::trimCache() QList<TypeCache::Iterator> unneededTypes; for (TypeCache::Iterator iter = m_typeCache.begin(), end = m_typeCache.end(); iter != end; ++iter) { QQmlTypeData *typeData = iter.value(); - if (typeData->m_compiledData && typeData->count() == 1 - && typeData->m_compiledData->count() == 1) { + + const bool hasError = !typeData->m_compiledData && !typeData->m_errors.isEmpty(); + const bool isNotReferenced = typeData->m_compiledData && typeData->m_compiledData->count() == 1; + if (typeData->count() == 1 && (hasError || isNotReferenced)) { // There are no live objects of this type unneededTypes.append(iter); } diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp index 0e7b0c1b14..405242767f 100644 --- a/src/qml/types/qqmldelegatemodel.cpp +++ b/src/qml/types/qqmldelegatemodel.cpp @@ -1316,9 +1316,23 @@ void QQmlDelegateModelPrivate::itemsRemoved( } } else { if (QQDMIncubationTask *incubationTask = cacheItem->incubationTask) { - for (int i = 1; i < m_groupCount; ++i) { - if (remove.inGroup(i)) - incubationTask->index[i] = remove.index[i]; + if (!cacheItem->isObjectReferenced()) { + releaseIncubator(cacheItem->incubationTask); + cacheItem->incubationTask = 0; + if (cacheItem->object) { + QObject *object = cacheItem->object; + cacheItem->destroyObject(); + if (QQuickPackage *package = qmlobject_cast<QQuickPackage *>(object)) + emitDestroyingPackage(package); + else + emitDestroyingItem(object); + } + cacheItem->scriptRef -= 1; + } else { + for (int i = 1; i < m_groupCount; ++i) { + if (remove.inGroup(i)) + incubationTask->index[i] = remove.index[i]; + } } } if (QQmlDelegateModelAttached *attached = cacheItem->attached) { |