QmlJS: Improve property and Type completion in Qml object members.

Done-with: Erik Verbruggen
This commit is contained in:
Christian Kamm
2010-04-29 11:41:28 +02:00
parent 722ba33770
commit f48df24737
5 changed files with 150 additions and 24 deletions

View File

@@ -1446,6 +1446,21 @@ const ObjectValue *Context::lookupType(const QmlJS::Document *doc, UiQualifiedId
return objectValue;
}
const ObjectValue *Context::lookupType(const QmlJS::Document *doc, const QStringList &qmlTypeName)
{
const ObjectValue *objectValue = typeEnvironment(doc);
foreach (const QString &name, qmlTypeName) {
const Value *value = objectValue->property(name, this);
if (!value)
return 0;
objectValue = value->asObjectValue();
}
return objectValue;
}
const Value *Context::property(const ObjectValue *object, const QString &name) const
{
const Properties properties = _properties.value(object);