forked from qt-creator/qt-creator
Some clang-tidy -use-modernize-nullptr
Change-Id: I1bed5e85a5b7948d08502a72a10f80baa075c204 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -219,11 +219,11 @@ QStringList QmlBundle::maybeReadTrie(Trie &trie, Utils::JsonObjectValue *config,
|
||||
return res;
|
||||
}
|
||||
Utils::JsonValue *imp0 = config->member(propertyName);
|
||||
Utils::JsonArrayValue *imp = ((imp0 != 0) ? imp0->toArray() : 0);
|
||||
if (imp != 0) {
|
||||
Utils::JsonArrayValue *imp = ((imp0 != nullptr) ? imp0->toArray() : nullptr);
|
||||
if (imp != nullptr) {
|
||||
foreach (Utils::JsonValue *v, imp->elements()) {
|
||||
Utils::JsonStringValue *impStr = ((v != 0) ? v->toString() : 0);
|
||||
if (impStr != 0) {
|
||||
Utils::JsonStringValue *impStr = ((v != nullptr) ? v->toString() : nullptr);
|
||||
if (impStr != nullptr) {
|
||||
trie.insert(impStr->value());
|
||||
} else {
|
||||
res.append(QString::fromLatin1("Expected all elements of array in property \"%1\" "
|
||||
@@ -251,7 +251,7 @@ bool QmlBundle::readFrom(QString path, QStringList *errors)
|
||||
return false;
|
||||
}
|
||||
JsonObjectValue *config = JsonValue::create(QString::fromUtf8(f.readAll()), &pool)->toObject();
|
||||
if (config == 0) {
|
||||
if (config == nullptr) {
|
||||
if (errors)
|
||||
(*errors) << QString::fromLatin1("Could not parse json object in file at %1 .").arg(path);
|
||||
return false;
|
||||
@@ -259,8 +259,8 @@ bool QmlBundle::readFrom(QString path, QStringList *errors)
|
||||
QStringList errs;
|
||||
if (config->hasMember(QLatin1String("name"))) {
|
||||
JsonValue *n0 = config->member(QLatin1String("name"));
|
||||
JsonStringValue *n = ((n0 != 0) ? n0->toString() : 0);
|
||||
if (n != 0)
|
||||
JsonStringValue *n = ((n0 != nullptr) ? n0->toString() : nullptr);
|
||||
if (n != nullptr)
|
||||
m_name = n->value();
|
||||
else
|
||||
errs.append(QString::fromLatin1("Property \"name\" in QmlBundle at %1 is expected "
|
||||
|
||||
Reference in New Issue
Block a user