diff options
author | Michael Brasser <mbrasser@ford.com> | 2017-11-21 12:18:56 -0600 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@qt.io> | 2017-11-28 14:26:22 +0000 |
commit | cc46992fbb94f1775ac22aa23b42d76f810a5913 (patch) | |
tree | 1cd305e40235b6d114e3e65b74211ce0890e35ca /tests/auto/qml/qqmllanguage/data/singleton/circular/MySingleton.qml | |
parent | 19f54245d35ee5eb66b991274908f780b103e3b4 (diff) |
Fix issue with circular singleton instantiationsv5.10.0-rc2
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 <erik.verbruggen@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/data/singleton/circular/MySingleton.qml')
-rw-r--r-- | tests/auto/qml/qqmllanguage/data/singleton/circular/MySingleton.qml | 12 |
1 files changed, 12 insertions, 0 deletions
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 +} |