forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user