From 5103d4e53b4fbd64d08de9eff7c80201a68d81df Mon Sep 17 00:00:00 2001 From: Tobias Hunger <tobias.hunger@qt.io> Date: Fri, 10 Feb 2017 16:02:40 +0100 Subject: [PATCH] qmake: Use nullptr in Qmake*FileNodes Change-Id: I64605a59056cdee660cb1d8b2d447a79d0db94b4 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> --- src/plugins/qmakeprojectmanager/qmakenodes.cpp | 10 +++++----- src/plugins/qmakeprojectmanager/qmakenodes.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.cpp b/src/plugins/qmakeprojectmanager/qmakenodes.cpp index 112e19fa3cb..958c026e82c 100644 --- a/src/plugins/qmakeprojectmanager/qmakenodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakenodes.cpp @@ -380,7 +380,7 @@ struct InternalNode FolderNode *createFolderNode(InternalNode *node) { - FolderNode *newNode = 0; + FolderNode *newNode = nullptr; if (node->typeName.isEmpty()) newNode = new FolderNode(FileName::fromString(node->fullPath)); else @@ -1071,7 +1071,7 @@ bool QmakePriFileNode::ensureWriteableProFile(const QString &file) QPair<ProFile *, QStringList> QmakePriFileNode::readProFile(const QString &file) { QStringList lines; - ProFile *includeFile = 0; + ProFile *includeFile = nullptr; { QString contents; { @@ -1087,7 +1087,7 @@ QPair<ProFile *, QStringList> QmakePriFileNode::readProFile(const QString &file) QMakeVfs vfs; QtSupport::ProMessageHandler handler; - QMakeParser parser(0, &vfs, &handler); + QMakeParser parser(nullptr, &vfs, &handler); includeFile = parser.parsedProBlock(QStringRef(&contents), file, 1); } return qMakePair(includeFile, lines); @@ -1122,7 +1122,7 @@ bool QmakePriFileNode::renameFile(const QString &oldName, return false; // We need to re-parse here: The file has changed. - QMakeParser parser(0, 0, 0); + QMakeParser parser(nullptr, nullptr, nullptr); QString contents = lines.join(QLatin1Char('\n')); includeFile = parser.parsedProBlock(QStringRef(&contents), m_projectFilePath.toString(), 1, QMakeParser::FullGrammar); @@ -1422,7 +1422,7 @@ QmakeProFileNode *QmakeProFileNode::findProFileFor(const FileName &fileName) con if (QmakeProFileNode *qmakeProFileNode = dynamic_cast<QmakeProFileNode *>(pn)) if (QmakeProFileNode *result = qmakeProFileNode->findProFileFor(fileName)) return result; - return 0; + return nullptr; } QString QmakeProFileNode::makefile() const diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.h b/src/plugins/qmakeprojectmanager/qmakenodes.h index 4fe3013f2cd..0c5219924f0 100644 --- a/src/plugins/qmakeprojectmanager/qmakenodes.h +++ b/src/plugins/qmakeprojectmanager/qmakenodes.h @@ -80,8 +80,8 @@ public: bool addSubProjects(const QStringList &proFilePaths) override; bool removeSubProjects(const QStringList &proFilePaths) override; - bool addFiles(const QStringList &filePaths, QStringList *notAdded = 0) override; - bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = 0) override; + bool addFiles(const QStringList &filePaths, QStringList *notAdded = nullptr) override; + bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = nullptr) override; bool deleteFiles(const QStringList &filePaths) override; bool canRenameFile(const QString &filePath, const QString &newFilePath) override; bool renameFile(const QString &filePath, const QString &newFilePath) override; @@ -236,7 +236,7 @@ public: } QString sourceDir() const; - QString buildDir(QmakeBuildConfiguration *bc = 0) const; + QString buildDir(QmakeBuildConfiguration *bc = nullptr) const; QStringList generatedFiles(const QString &buildDirectory, const ProjectExplorer::FileNode *sourceFile) const; -- GitLab