diff options
author | Chris Adams <christopher.adams@nokia.com> | 2012-03-14 12:00:40 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-30 04:37:59 +0200 |
commit | 47eb68ab0b8d9ffd357cbad2f74b63ee2cf00dad (patch) | |
tree | 5159737869c7b8981003ed519b8cd8541799728e /tests/auto/qml/qqmlecmascript/testtypes.h | |
parent | 7f8c243dec987018db47547c6ddea9cd8272e02a (diff) |
Ensure that variant property references keep QObjects alive
Previously, only var property references could keep QObjects alive.
This meant that the garbage collector would collect QObject data
prematurely.
This commit ensures that variant properties keep QObjects alive as
required.
Task-number: QTBUG-24767
Change-Id: Ic98a06863251a3e7d6384ba9256810a78fb23406
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/testtypes.h')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/testtypes.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/testtypes.h b/tests/auto/qml/qqmlecmascript/testtypes.h index 8e2b68f51c..3c12264852 100644 --- a/tests/auto/qml/qqmlecmascript/testtypes.h +++ b/tests/auto/qml/qqmlecmascript/testtypes.h @@ -1052,6 +1052,8 @@ public: return ddata->indestructible?false:true; } + Q_INVOKABLE void deleteQObject(QObject *obj) { delete obj; } + signals: void qobjectTestPropertyChanged(int testProperty); void qobjectTestWritablePropertyChanged(int testWritableProperty); |