qmake: Use nullptr in Qmake*FileNodes

Change-Id: I64605a59056cdee660cb1d8b2d447a79d0db94b4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tobias Hunger
2017-02-10 16:02:40 +01:00
committed by Tim Jenssen
parent bc390a8e99
commit 5103d4e53b
2 changed files with 8 additions and 8 deletions

View File

@@ -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

View File

@@ -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;