QmlJS: Avoid an infinite loop if a qmltypes file has a cycle.

The qmltypes files shipped with libraries shouldn't, but could define
components that form a prototype cycle. Use of the new
QmlObjectValue::prototypes() function avoids the code model getting
stuck in an infinite loop for these cases.

For plain ObjectValues this is already solved by using
PrototypeIterator.

Change-Id: I0f562672ab99b454bc3a0121c7a1b9eca43476bb
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
Christian Kamm
2011-10-25 10:23:01 +02:00
parent a9553c494e
commit 4521be25cd
2 changed files with 25 additions and 8 deletions

View File

@@ -428,6 +428,7 @@ public:
using ObjectValue::prototype;
const QmlObjectValue *prototype() const;
QList<const QmlObjectValue *> prototypes() const;
const QmlObjectValue *attachedType() const;
void setAttachedType(QmlObjectValue *value);