[SCM] qtdeclarative packaging branch, master, updated. debian/5.6.1-3-3-g1e4462c
Lisandro Damián Nicanor Pérez
lisandro at moszumanska.debian.org
Thu Jun 16 14:14:17 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qtdeclarative.git;a=commitdiff;h=33b3f7d
The following commit has been merged in the master branch:
commit 33b3f7d5728bde68efafa7bfca311bcd223b624c
Author: Lisandro Damián Nicanor Pérez Meyer <perezmeyer at gmail.com>
Date: Thu Jun 16 10:42:46 2016 -0300
Backport qml_only_release_types_if_they_arent_referenced_anymore.patch
---
debian/changelog | 4 ++
...se_types_if_they_arent_referenced_anymore.patch | 63 ++++++++++++++++++++++
debian/patches/series | 3 ++
3 files changed, 70 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 1a07f05..84ffd74 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,9 @@
qtdeclarative-opensource-src (5.6.1-4) UNRELEASED; urgency=medium
+ [ Lisandro Damián Nicanor Pérez Meyer ]
+ * Backport qml_only_release_types_if_they_arent_referenced_anymore.patch,
+ it solves a nasty crash.
+
-- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Thu, 16 Jun 2016 10:37:45 -0300
qtdeclarative-opensource-src (5.6.1-3) unstable; urgency=medium
diff --git a/debian/patches/qml_only_release_types_if_they_arent_referenced_anymore.patch b/debian/patches/qml_only_release_types_if_they_arent_referenced_anymore.patch
new file mode 100644
index 0000000..fa5bd96
--- /dev/null
+++ b/debian/patches/qml_only_release_types_if_they_arent_referenced_anymore.patch
@@ -0,0 +1,63 @@
+From 9b1231ca3d21ade574a8a7cf3f0805a8b520bcd5 Mon Sep 17 00:00:00 2001
+From: Ulf Hermann <ulf.hermann at qt.io>
+Date: Wed, 8 Jun 2016 17:32:32 +0200
+Subject: [PATCH] QML: Only release types if they aren't referenced anymore
+
+Just checking for references on m_compiledData is not enough. The
+actual component can also be referenced. Thus it won't be deleted
+on release(), but cannot be found in the type cache anymore.
+
+Task-number: QTBUG-53761
+Change-Id: I8567af8e75a078598e4fed31e4717134e1332278
+Reviewed-by: Mitch Curtis <mitch.curtis at qt.io>
+Reviewed-by: Simon Hausmann <simon.hausmann at qt.io>
+(cherry picked from commit 2ac19881f92c94f4e9427bd9ff513210675f259e)
+---
+ src/qml/qml/qqmltypeloader.cpp | 3 ++-
+ tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp | 15 ++++++++++++---
+ 2 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
+index c684c86..01200fd 100644
+--- a/src/qml/qml/qqmltypeloader.cpp
++++ b/src/qml/qml/qqmltypeloader.cpp
+@@ -1961,7 +1961,8 @@ 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->m_compiledData->count() == 1) {
++ if (typeData->m_compiledData && typeData->count() == 1
++ && typeData->m_compiledData->count() == 1) {
+ // There are no live objects of this type
+ unneededTypes.append(iter);
+ }
+diff --git a/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp b/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
+index 7045c7c..a1eaa05 100644
+--- a/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
++++ b/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
+@@ -86,10 +86,19 @@ void tst_QQMLTypeLoader::trimCache()
+ url.setQuery(QString::number(i));
+
+ QQmlTypeData *data = loader.getType(url);
+- if (i % 5 == 0) // keep references to some of them so that they aren't trimmed
+- data->compiledData()->addref();
++ // Run an event loop to receive the callback that release()es.
++ QTRY_COMPARE(data->count(), 2);
+
+- data->release();
++ // keep references to some of them so that they aren't trimmed. References to either the
++ // QQmlTypeData or its compiledData() should prevent the trimming.
++ if (i % 10 == 0) {
++ // keep ref on data, don't add ref on data->compiledData()
++ } else if (i % 5 == 0) {
++ data->compiledData()->addref();
++ data->release();
++ } else {
++ data->release();
++ }
+ }
+
+ for (int i = 0; i < 256; ++i) {
+--
+2.1.4
+
diff --git a/debian/patches/series b/debian/patches/series
index 9741485..5e68a6d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,5 @@
+# Backported patches
+qml_only_release_types_if_they_arent_referenced_anymore.patch
+
# Debian patches
check_system_double-conversion.patch
--
qtdeclarative packaging
More information about the pkg-kde-commits
mailing list