qmllint/FindWarningVisitor: Remove dead code

Change-Id: I1034760fc97e5997d1ba7d70ce2261818da79b37
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Fabian Kosmale 2021-12-03 15:53:40 +01:00
parent 3e95a57dc1
commit 6e757fc08d
2 changed files with 0 additions and 36 deletions

View File

@ -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<QQmlJS::SourceLocation> comments)

View File

@ -64,12 +64,6 @@ public:
private:
void parseComments(const QList<QQmlJS::SourceLocation> &comments);
// work around compiler error in clang11
using QQmlJSImportVisitor::endVisit;
using QQmlJSImportVisitor::visit;
void endVisit(QQmlJS::AST::UiObjectDefinition *uiod) override;
};
QT_END_NAMESPACE