QmlJS: Remove the strict separation of types and attached types.

The problem was that several lookup calls suddenly failed because
the actual QML types were no longer in the default scope chain. However,
the QML documentation says the type names are in the scope.

Also, 'MyComponent.' in a JS-expression context only showed the attached
properties of MyComponent and missed the enums.

With this change completion now may offers too many options, but that's
better than missing some.

This reverts parts of 490f2797f6

Reviewed-by: Leandro Melo
This commit is contained in:
Christian Kamm
2011-02-21 14:56:16 +01:00
parent 9232b3d5e8
commit 1d4cd9b7f2
6 changed files with 8 additions and 84 deletions

View File

@@ -826,7 +826,7 @@ const Value *Check::checkScopeObjectMember(const UiQualifiedId *id)
bool isAttachedProperty = false;
if (! propertyName.isEmpty() && propertyName[0].isUpper()) {
isAttachedProperty = true;
if (const ObjectValue *qmlTypes = _context.scopeChain().qmlAttachedTypes)
if (const ObjectValue *qmlTypes = _context.scopeChain().qmlTypes)
scopeObjects += qmlTypes;
}