Commit 4f9fcba5 authored by Denis Steckelmacher's avatar Denis Steckelmacher

Support "font { pixelSize: 20; b: true; }"

typeFromClassName also returns the type of a declaration if the declaration is
an instance. Therefore, typeFromClassName("font") returns the type of the "font"
property, thus Font, and pixelSize and b are properties of Font.
parent be9f974a
......@@ -1049,7 +1049,7 @@ AbstractType::Ptr DeclarationBuilder::typeFromClassName(const QString& name)
{
DeclarationPointer decl = QmlJS::getDeclaration(QualifiedIdentifier(name), currentContext());
if (decl && decl->kind() == Declaration::Type) {
if (decl) {
return decl->abstractType();
} else {
return AbstractType::Ptr(new StructureType);
......
......@@ -8,7 +8,7 @@ Module {
/**
* "toString" : "int childCount",
* "useCount" : 1
* "useCount" : 2
*/
Property { name: "childCount"; type: "int" }
}
......@@ -94,6 +94,10 @@ Module {
id: foo
onDataChanged: console.log(topLeft);
rootItem {
childCount: 8
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment