diff options
-rw-r--r-- | tools/qmllint/checkidentifiers.cpp | 4 | ||||
-rw-r--r-- | tools/qmllint/findwarnings.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/qmllint/checkidentifiers.cpp b/tools/qmllint/checkidentifiers.cpp index 619fe8e4b9..0bd5c8127e 100644 --- a/tools/qmllint/checkidentifiers.cpp +++ b/tools/qmllint/checkidentifiers.cpp @@ -171,8 +171,8 @@ bool CheckIdentifiers::checkMemberAccess(const QVector<ScopeTree::FieldMember> & if (scopeMethodIt != methods.end()) return true; // Access to property of JS function - const auto enums= scope->enums(); - for (const auto enumerator : enums) { + const auto enums = scope->enums(); + for (const auto &enumerator : enums) { for (const QString &key : enumerator.keys()) { if (access.m_name == key) { detectedRestrictiveKind = QLatin1String("enum"); diff --git a/tools/qmllint/findwarnings.cpp b/tools/qmllint/findwarnings.cpp index b177c5f5c4..797b312d92 100644 --- a/tools/qmllint/findwarnings.cpp +++ b/tools/qmllint/findwarnings.cpp @@ -394,7 +394,7 @@ void FindWarningVisitor::importExportedNames(const QStringRef &prefix, QString n if (scope) { if (scopes.contains(scope)) { QString inheritenceCycle = name; - for (const auto seen: qAsConst(scopes)) { + for (const auto &seen: qAsConst(scopes)) { inheritenceCycle.append(QLatin1String(" -> ")); inheritenceCycle.append(seen->superclassName()); } |