diff --git a/plugins/qmljs/duchain/cache.cpp b/plugins/qmljs/duchain/cache.cpp --- a/plugins/qmljs/duchain/cache.cpp +++ b/plugins/qmljs/duchain/cache.cpp @@ -61,7 +61,7 @@ QString cacheKey = uri + version; QString path = m_modulePaths.value(cacheKey, QString()); - if (!path.isNull()) { + if (!path.isEmpty()) { return path; } @@ -158,7 +158,7 @@ dumpFile ); - if (!dumpPath.isNull()) { + if (!dumpPath.isEmpty()) { QMutexLocker lock(&m_mutex); result.append(dumpPath); diff --git a/plugins/qmljs/duchain/declarationbuilder.cpp b/plugins/qmljs/duchain/declarationbuilder.cpp --- a/plugins/qmljs/duchain/declarationbuilder.cpp +++ b/plugins/qmljs/duchain/declarationbuilder.cpp @@ -712,7 +712,7 @@ decl->setClassType(ClassDeclarationData::Interface); decl->clearBaseClasses(); - if (!baseClass.isNull()) { + if (!baseClass.isEmpty()) { addBaseClass(decl, baseClass); } @@ -731,7 +731,7 @@ QString type_name = QmlJS::getQMLAttributeValue(node->members, QStringLiteral("type")).value; QmlJS::FunctionType::Ptr type(new QmlJS::FunctionType); - if (type_name.isNull()) { + if (type_name.isEmpty()) { type->setReturnType(typeFromName(QStringLiteral("void"))); } else { type->setReturnType(typeFromName(type_name)); @@ -1082,7 +1082,7 @@ { if (node->importUri) { importModule(node); - } else if (!node->fileName.isNull() && node->fileName != QLatin1String(".")) { + } else if (!node->fileName.isEmpty() && node->fileName != QLatin1String(".")) { QUrl currentFileUrl = currentContext()->topContext()->url().toUrl(); QUrl importUrl = QUrl(node->fileName.toString()); diff --git a/plugins/qmljs/duchain/frameworks/nodejs.cpp b/plugins/qmljs/duchain/frameworks/nodejs.cpp --- a/plugins/qmljs/duchain/frameworks/nodejs.cpp +++ b/plugins/qmljs/duchain/frameworks/nodejs.cpp @@ -190,7 +190,7 @@ for (auto path : moduleDirectories(url)) { fileName = fileOrDirectoryPath(path.cd(moduleName).toLocalFile()); - if (!fileName.isNull()) { + if (!fileName.isEmpty()) { break; } } diff --git a/plugins/qmljs/duchain/helper.cpp b/plugins/qmljs/duchain/helper.cpp --- a/plugins/qmljs/duchain/helper.cpp +++ b/plugins/qmljs/duchain/helper.cpp @@ -147,7 +147,7 @@ // The expression must be an identifier or a string literal res.value = getNodeValue(statement->expression); - if (res.value.isNull()) { + if (res.value.isEmpty()) { return res; }