From cc46992fbb94f1775ac22aa23b42d76f810a5913 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 21 Nov 2017 12:18:56 -0600 Subject: Fix issue with circular singleton instantiations While a recursion check exists and works, it can lead to instanting the same singleton multiple times (leaking all but one copy). Change-Id: Icf342aad71c5cb225488262341517d95786e1f84 Reviewed-by: Erik Verbruggen Reviewed-by: Simon Hausmann --- .../qml/qqmllanguage/data/singleton/circular/MySingleton.qml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/auto/qml/qqmllanguage/data/singleton/circular/MySingleton.qml (limited to 'tests/auto/qml/qqmllanguage/data/singleton/circular/MySingleton.qml') diff --git a/tests/auto/qml/qqmllanguage/data/singleton/circular/MySingleton.qml b/tests/auto/qml/qqmllanguage/data/singleton/circular/MySingleton.qml new file mode 100644 index 0000000000..1253018789 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/singleton/circular/MySingleton.qml @@ -0,0 +1,12 @@ +pragma Singleton +import QtQuick 2.10 + +QtObject { + enum MyEnum { + Value0, + Value1, + Value2 + } + + property int value: MySingleton.Value2 +} -- cgit v1.2.3