diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-10-02 14:48:22 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-10-05 14:59:26 +0200 |
commit | 7200da29a888567313fa67ea20bbdb82714ae218 (patch) | |
tree | 5f13e35dad127b0b8100a6fd28fb984f3f4560f1 /tools/qmllint/checkidentifiers.cpp | |
parent | 6bb5a51a9d70347f50c89919613a958c1a524ab5 (diff) |
QmlCompiler: Move ScopeType and JavaScriptIdentifier into QQmlJSScope
They don't begin with 'Q' and they are not very useful outside of
QQmlJSScope.
Change-Id: I3363ac4d29be7a9cb5c9f7f3af1727c99e886825
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools/qmllint/checkidentifiers.cpp')
-rw-r--r-- | tools/qmllint/checkidentifiers.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/qmllint/checkidentifiers.cpp b/tools/qmllint/checkidentifiers.cpp index acbadf2300..06103f073b 100644 --- a/tools/qmllint/checkidentifiers.cpp +++ b/tools/qmllint/checkidentifiers.cpp @@ -259,7 +259,7 @@ bool CheckIdentifiers::checkMemberAccess(const QVector<FieldMember> &members, if (typeFound) continue; - if (access.m_name.front().isUpper() && scope->scopeType() == ScopeType::QMLScope) { + if (access.m_name.front().isUpper() && scope->scopeType() == QQmlJSScope::QMLScope) { // may be an attached type const auto it = m_types.find(access.m_name); if (it != m_types.end() && !(*it)->attachedTypeName().isEmpty()) { @@ -307,7 +307,7 @@ bool CheckIdentifiers::operator()( const auto memberAccessBase = memberAccessChain.takeFirst(); const auto jsId = currentScope->findJSIdentifier(memberAccessBase.m_name); - if (jsId.has_value() && jsId->kind != JavaScriptIdentifier::Injected) + if (jsId.has_value() && jsId->kind != QQmlJSScope::JavaScriptIdentifier::Injected) continue; auto it = qmlIDs.find(memberAccessBase.m_name); @@ -400,8 +400,9 @@ bool CheckIdentifiers::operator()( m_colorOut->write(rootId + QLatin1Char('.'), Hint); m_colorOut->write(issueLocationWithContext.issueText().toString(), Normal); m_colorOut->write(issueLocationWithContext.afterText() + QLatin1Char('\n'), Normal); - } else if (jsId.has_value() && jsId->kind == JavaScriptIdentifier::Injected) { - const JavaScriptIdentifier id = jsId.value(); + } else if (jsId.has_value() + && jsId->kind == QQmlJSScope::JavaScriptIdentifier::Injected) { + const QQmlJSScope::JavaScriptIdentifier id = jsId.value(); m_colorOut->write(QLatin1String("Note: "), Info); m_colorOut->write( memberAccessBase.m_name + QString::fromLatin1( |