diff options
Diffstat (limited to 'tools/qmllint')
-rw-r--r-- | tools/qmllint/checkidentifiers.cpp | 6 | ||||
-rw-r--r-- | tools/qmllint/findwarnings.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tools/qmllint/checkidentifiers.cpp b/tools/qmllint/checkidentifiers.cpp index 6fa26b86ba..b7d331521c 100644 --- a/tools/qmllint/checkidentifiers.cpp +++ b/tools/qmllint/checkidentifiers.cpp @@ -82,7 +82,7 @@ void CheckIdentifiers::printContext( static bool walkViaParentAndAttachedScopes(QQmlJSScope::ConstPtr rootType, std::function<bool(QQmlJSScope::ConstPtr)> visit) { - if (rootType == nullptr) + if (rootType.isNull()) return false; std::stack<QQmlJSScope::ConstPtr> stack; stack.push(rootType); @@ -186,7 +186,7 @@ bool CheckIdentifiers::checkMemberAccess(const QVector<FieldMember> &members, if (it == m_types.end()) { detectedRestrictiveKind = typeName; detectedRestrictiveName = access.m_name; - scope = nullptr; + scope = QQmlJSScope::ConstPtr(); } else { scope = *it; } @@ -304,7 +304,7 @@ bool CheckIdentifiers::operator()( auto it = qmlIDs.find(memberAccessBase.m_name); if (it != qmlIDs.end()) { - if (*it != nullptr) { + if (!it->isNull()) { if (!checkMemberAccess(memberAccessChain, *it)) noUnqualifiedIdentifier = false; continue; diff --git a/tools/qmllint/findwarnings.cpp b/tools/qmllint/findwarnings.cpp index 62dce68bb7..962ccaa1c6 100644 --- a/tools/qmllint/findwarnings.cpp +++ b/tools/qmllint/findwarnings.cpp @@ -473,7 +473,7 @@ bool FindWarningVisitor::check() // now that all ids are known, revisit any Connections whose target were perviously unknown for (auto const &outstandingConnection: m_outstandingConnections) { auto targetScope = m_qmlid2scope[outstandingConnection.targetName]; - if (outstandingConnection.scope && targetScope != nullptr) + if (outstandingConnection.scope && !targetScope.isNull()) outstandingConnection.scope->addMethods(targetScope->methods()); QScopedValueRollback<QQmlJSScope::Ptr> rollback(m_currentScope, outstandingConnection.scope); outstandingConnection.uiod->initializer->accept(this); @@ -632,7 +632,7 @@ bool FindWarningVisitor::visit(QQmlJS::AST::UiObjectBinding *uiob) void FindWarningVisitor::endVisit(QQmlJS::AST::UiObjectBinding *uiob) { - const auto childScope = m_currentScope; + const QQmlJSScope::ConstPtr childScope = m_currentScope; leaveEnvironment(); QQmlJSMetaProperty property(uiob->qualifiedId->name.toString(), uiob->qualifiedTypeNameId->name.toString(), @@ -736,7 +736,7 @@ void FindWarningVisitor::endVisit(QQmlJS::AST::UiObjectDefinition *) const auto it = properties.find(QStringLiteral("parent")); if (it != properties.end()) { auto property = *it; - property.setType(m_currentScope); + property.setType(QQmlJSScope::ConstPtr(m_currentScope)); childScope->addProperty(property); } } |