diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp index 39ab69fd04f36a75964e9767d9b798e6cc2583af..b79a6495caa90df30922754b7544afdff4a33dd4 100644 --- a/src/libs/qmljs/qmljscheck.cpp +++ b/src/libs/qmljs/qmljscheck.cpp @@ -190,8 +190,11 @@ void Check::checkScopeObjectMember(const UiQualifiedId *id) return; // attached properties - if (! propertyName.isEmpty() && propertyName[0].isUpper()) + bool isAttachedProperty = false; + if (! propertyName.isEmpty() && propertyName[0].isUpper()) { + isAttachedProperty = true; scopeObject = _context.typeEnvironment(_doc.data()); + } if (! scopeObject) return; @@ -206,6 +209,10 @@ void Check::checkScopeObjectMember(const UiQualifiedId *id) return; } + // can't look up members for attached properties + if (isAttachedProperty) + return; + // member lookup const UiQualifiedId *idPart = id; while (idPart->next) {