diff --git a/src/qmllint/findwarnings.cpp b/src/qmllint/findwarnings.cpp index 60f465a97b..b3312352b9 100644 --- a/src/qmllint/findwarnings.cpp +++ b/src/qmllint/findwarnings.cpp @@ -43,36 +43,6 @@ QT_BEGIN_NAMESPACE -void FindWarningVisitor::endVisit(QQmlJS::AST::UiObjectDefinition *uiod) -{ - auto childScope = m_currentScope; - QQmlJSImportVisitor::endVisit(uiod); - - if (m_currentScope == m_globalScope - || m_currentScope->baseTypeName() == QStringLiteral("Component")) { - return; - } - - QString parentPropertyName = childScope->parentPropertyName(); - if (parentPropertyName.isEmpty()) - return; - - auto property = childScope->property(parentPropertyName); - property.setType(QQmlJSScope::ConstPtr(m_currentScope)); - - if (childScope->hasOwnProperty(parentPropertyName)) { - Q_ASSERT(childScope->ownProperty(parentPropertyName).index() >= 0); - } else { - // it's a new property, so must adjust the index. the index is - // "outdated" as it's a relative index of scope, not childScope (or - // it might even be -1 in theory but this is likely an error) - property.setIndex(childScope->ownProperties().size()); - } - - // TODO: This is bad. We shouldn't add a new property but rather amend the existing one. - childScope->addOwnProperty(property); -} - FindWarningVisitor::FindWarningVisitor(QQmlJSImporter *importer, QQmlJSLogger *logger, QStringList qmltypesFiles, QList comments) diff --git a/src/qmllint/findwarnings_p.h b/src/qmllint/findwarnings_p.h index 48addf1804..91e08561c9 100644 --- a/src/qmllint/findwarnings_p.h +++ b/src/qmllint/findwarnings_p.h @@ -64,12 +64,6 @@ public: private: void parseComments(const QList &comments); - - // work around compiler error in clang11 - using QQmlJSImportVisitor::endVisit; - using QQmlJSImportVisitor::visit; - - void endVisit(QQmlJS::AST::UiObjectDefinition *uiod) override; }; QT_END_NAMESPACE