aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmljs/qmljsscopebuilder.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2019-07-31 17:21:41 +0200
committerhjk <[email protected]>2019-08-01 13:20:26 +0000
commit2e14df7561ee10c7a408bd3ebb4944016ecdd1f4 (patch)
tree4a220241720e8a307fb96e98941656cf7b9f940d /src/libs/qmljs/qmljsscopebuilder.cpp
parent630385751a806b64d41295ee50957e2a9138a193 (diff)
Some clang-tidy -use-modernize-nullptr
Change-Id: I1bed5e85a5b7948d08502a72a10f80baa075c204 Reviewed-by: Thomas Hartmann <[email protected]>
Diffstat (limited to 'src/libs/qmljs/qmljsscopebuilder.cpp')
-rw-r--r--src/libs/qmljs/qmljsscopebuilder.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libs/qmljs/qmljsscopebuilder.cpp b/src/libs/qmljs/qmljsscopebuilder.cpp
index 7b071662b9e..ca59e74dcaf 100644
--- a/src/libs/qmljs/qmljsscopebuilder.cpp
+++ b/src/libs/qmljs/qmljsscopebuilder.cpp
@@ -67,8 +67,8 @@ void ScopeBuilder::push(AST::Node *node)
if (!_scopeChain->qmlScopeObjects().isEmpty()
&& name.startsWith(QLatin1String("on"))
&& !script->qualifiedId->next) {
- const ObjectValue *owner = 0;
- const Value *value = 0;
+ const ObjectValue *owner = nullptr;
+ const Value *value = nullptr;
// try to find the name on the scope objects
foreach (const ObjectValue *scope, _scopeChain->qmlScopeObjects()) {
value = scope->lookupMember(name, _scopeChain->context(), &owner);
@@ -217,19 +217,19 @@ void ScopeBuilder::setQmlScopeObject(Node *node)
const Value *ScopeBuilder::scopeObjectLookup(AST::UiQualifiedId *id)
{
// do a name lookup on the scope objects
- const Value *result = 0;
+ const Value *result = nullptr;
foreach (const ObjectValue *scopeObject, _scopeChain->qmlScopeObjects()) {
const ObjectValue *object = scopeObject;
for (UiQualifiedId *it = id; it; it = it->next) {
if (it->name.isEmpty())
- return 0;
+ return nullptr;
result = object->lookupMember(it->name.toString(), _scopeChain->context());
if (!result)
break;
if (it->next) {
object = result->asObjectValue();
if (!object) {
- result = 0;
+ result = nullptr;
break;
}
}
@@ -255,5 +255,5 @@ const ObjectValue *ScopeBuilder::isPropertyChangesObject(const ContextPtr &conte
return prototype;
}
}
- return 0;
+ return nullptr;
}