diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-09-25 09:50:09 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-09-25 15:21:41 +0200 |
commit | 5a88c06665d5c0295691e216740210a5172fcc9e (patch) | |
tree | 76d61e5749420afd57f7a01939502fc593afd9f3 /tools/qmllint/findwarnings.cpp | |
parent | 88fd9c3996fd0280be639ad116ebc3a1b30ae0c4 (diff) |
qmllint: Clarify the meaning of the various names a scope can have
... and notice that they are misused everywhere.
Change-Id: I2254993dc5d11e967e7e83c6f0efb37fa17744be
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools/qmllint/findwarnings.cpp')
-rw-r--r-- | tools/qmllint/findwarnings.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/qmllint/findwarnings.cpp b/tools/qmllint/findwarnings.cpp index 9686194c92..3877379a3b 100644 --- a/tools/qmllint/findwarnings.cpp +++ b/tools/qmllint/findwarnings.cpp @@ -156,7 +156,7 @@ void FindWarningVisitor::Importer::processImport( // add objects for (auto it = import.objects.begin(); it != import.objects.end(); ++it) { const auto &val = it.value(); - m_exportedName2Scope.insert(val->className(), val); + m_exportedName2Scope.insert(val->internalName(), val); const auto exports = val->exports(); for (const auto &valExport : exports) @@ -272,8 +272,8 @@ QHash<QString, ScopeTree::ConstPtr> FindWarningVisitor::Importer::importFileOrDi QDirIterator it { name, QStringList() << QLatin1String("*.qml"), QDir::NoFilter }; while (it.hasNext()) { ScopeTree::Ptr scope(localFile2ScopeTree(it.next())); - if (!scope->className().isEmpty()) - m_exportedName2Scope.insert(prefixedName(prefix, scope->className()), scope); + if (!scope->internalName().isEmpty()) + m_exportedName2Scope.insert(prefixedName(prefix, scope->internalName()), scope); } result.swap(m_exportedName2Scope); @@ -291,7 +291,7 @@ void FindWarningVisitor::importExportedNames(QStringView prefix, QString name) QString inheritenceCycle = name; for (const auto &seen: qAsConst(scopes)) { inheritenceCycle.append(QLatin1String(" -> ")); - inheritenceCycle.append(seen->superclassName()); + inheritenceCycle.append(seen->baseTypeName()); } @@ -314,7 +314,7 @@ void FindWarningVisitor::importExportedNames(QStringView prefix, QString name) } m_currentScope->addMethods(scope->methods()); - name = scope->superclassName(); + name = scope->baseTypeName(); if (name.isEmpty() || name == QLatin1String("QObject")) break; } else { |