diff options
author | Liang Qi <liang.qi@qt.io> | 2017-04-21 11:08:23 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-04-21 11:08:24 +0200 |
commit | 0aaca005c0bb6267ddd14a84634c33c813e2d2c4 (patch) | |
tree | 2c09a2498618830b32e92f13450fab2210aae446 /src/qml | |
parent | 186cbe30939947e3a2d33b250fc861cbee361dfe (diff) | |
parent | 749a7212e903d8e8c6f256edb1836b9449cc7fe1 (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Change-Id: Ibed6ee74d36b4ce37391c82db00a0abd30d09e7a
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlerror.cpp | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index 2ac2b0b64d..1dd90995d3 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -992,6 +992,10 @@ void QObjectWrapper::destroyObject(bool lastCall) // If the object is C++-owned, we still have to release the weak reference we have // to it. ddata->jsWrapper.clear(); + if (lastCall && ddata->propertyCache) { + ddata->propertyCache->release(); + ddata->propertyCache = nullptr; + } } } } diff --git a/src/qml/qml/qqmlerror.cpp b/src/qml/qml/qqmlerror.cpp index 7a1e02eec6..64f008cd32 100644 --- a/src/qml/qml/qqmlerror.cpp +++ b/src/qml/qml/qqmlerror.cpp @@ -44,6 +44,7 @@ #include <QtCore/qfile.h> #include <QtCore/qstringlist.h> #include <QtCore/qvector.h> +#include <QtCore/qpointer.h> #include <private/qv4errorobject_p.h> @@ -86,7 +87,7 @@ public: quint16 line; quint16 column; QtMsgType messageType; - QObject *object; + QPointer<QObject> object; }; QQmlErrorPrivate::QQmlErrorPrivate() |