Hello community,

here is the log from the commit of package libqt5-qtdeclarative for 
openSUSE:Factory checked in at 2017-07-25 11:35:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libqt5-qtdeclarative (Old)
 and      /work/SRC/openSUSE:Factory/.libqt5-qtdeclarative.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libqt5-qtdeclarative"

Tue Jul 25 11:35:41 2017 rev:40 rq:511037 version:5.9.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/libqt5-qtdeclarative/libqt5-qtdeclarative.changes    
    2017-07-08 12:23:51.847617677 +0200
+++ 
/work/SRC/openSUSE:Factory/.libqt5-qtdeclarative.new/libqt5-qtdeclarative.changes
   2017-07-25 11:35:42.460068566 +0200
@@ -1,0 +2,7 @@
+Mon Jul 17 19:07:46 UTC 2017 - [email protected]
+
+- Add patch to fix crash related to shared QQmlEngine instances
+  (QTBUG-61681, kde#381525):
+  * rebuild-qqmldata-propertycache-if-deleted.patch
+
+-------------------------------------------------------------------

New:
----
  rebuild-qqmldata-propertycache-if-deleted.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libqt5-qtdeclarative.spec ++++++
--- /var/tmp/diff_new_pack.99MfoL/_old  2017-07-25 11:35:43.403935272 +0200
+++ /var/tmp/diff_new_pack.99MfoL/_new  2017-07-25 11:35:43.407934708 +0200
@@ -35,6 +35,8 @@
 Source1:        baselibs.conf
 # PATCH-FIX-UPSTREAM
 Patch1:         support-non-integer-pixel-ratios-qquickwidget.patch
+# PATCH-FIX-UPSTREAM
+Patch2:         rebuild-qqmldata-propertycache-if-deleted.patch
 # PATCH-FIX-OPENSUSE sse2_nojit.patch -- enable JIT and sse2 only on sse2 case
 Patch100:       sse2_nojit.patch
 BuildRequires:  fdupes
@@ -73,10 +75,11 @@
 
 %prep
 %setup -q -n qtdeclarative-opensource-src-%{real_version}
+%patch1 -p1
+%patch2 -p1
 %ifarch %ix86
 %patch100 -p1
 %endif
-%patch1 -p1
 
 %package -n %libname
 Summary:        Qt 5 Declarative Library

++++++ rebuild-qqmldata-propertycache-if-deleted.patch ++++++
>From ab5d4c78224c9ec79165e8890e5f8b8e838e0709 Mon Sep 17 00:00:00 2001
From: David Edmundson <[email protected]>
Date: Mon, 10 Jul 2017 17:26:59 +0100
Subject: [PATCH] Rebuild QQmlData::propertyCache if deleted by another engine

QQmlData is shared between engines, but the relevant QObjectWrapper is
not. Since 749a7212e903d8e8c6f256edb1836b9449cc7fe1 when a
QObjectWrapper is deleted it resets the shared QQmlData propertyCache.

In most cases the propertyCache except when a property updated in an
existing binding in the first engine, where it currently asserts.

Task-number: QTBUG-61681
Change-Id: I6efdc506e5c7e30b95cda1be282afa9feb781cd2
Reviewed-by: Simon Hausmann <[email protected]>
---
 src/qml/qml/qqmlbinding.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp
index 62288a5..325f752 100644
--- a/src/qml/qml/qqmlbinding.cpp
+++ b/src/qml/qml/qqmlbinding.cpp
@@ -515,7 +515,12 @@ void QQmlBinding::getPropertyData(QQmlPropertyData 
**propertyData, QQmlPropertyD
     Q_ASSERT(propertyData);
 
     QQmlData *data = QQmlData::get(*m_target, false);
-    Q_ASSERT(data && data->propertyCache);
+    Q_ASSERT(data);
+
+    if (Q_UNLIKELY(!data->propertyCache)) {
+        data->propertyCache = 
QQmlEnginePrivate::get(context()->engine)->cache(m_target->metaObject());
+        data->propertyCache->addref();
+    }
 
     *propertyData = data->propertyCache->property(m_targetIndex.coreIndex());
     Q_ASSERT(*propertyData);
-- 
2.7.4


Reply via email to