forked from qt-creator/qt-creator
QmlJS: Fix false positives for Connections
Connections and ListElement are in the QtQml scope, when using type information from Qt kit. Change-Id: I6236a317117e15f4b68c0642186bfdb91d0c92db Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Christian Kamm <mail@ckamm.de>
This commit is contained in:
@@ -176,10 +176,10 @@ void ScopeBuilder::setQmlScopeObject(Node *node)
|
|||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
const ObjectValue *prototype = iter.next();
|
const ObjectValue *prototype = iter.next();
|
||||||
if (const CppComponentValue *qmlMetaObject = value_cast<CppComponentValue>(prototype)) {
|
if (const CppComponentValue *qmlMetaObject = value_cast<CppComponentValue>(prototype)) {
|
||||||
if ((qmlMetaObject->className() == QLatin1String("ListElement")
|
if ((qmlMetaObject->className() == "ListElement"
|
||||||
|| qmlMetaObject->className() == QLatin1String("Connections")
|
|| qmlMetaObject->className() == "Connections")
|
||||||
) && (qmlMetaObject->moduleName() == QLatin1String("Qt")
|
&& (qmlMetaObject->moduleName() == "Qt" || qmlMetaObject->moduleName() == "QtQml"
|
||||||
|| qmlMetaObject->moduleName() == QLatin1String("QtQuick"))) {
|
|| qmlMetaObject->moduleName() == "QtQuick")) {
|
||||||
qmlScopeObjects.clear();
|
qmlScopeObjects.clear();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user