Commit 5103d4e5 authored by Tobias Hunger's avatar Tobias Hunger Committed by Tim Jenssen

qmake: Use nullptr in Qmake*FileNodes

Change-Id: I64605a59056cdee660cb1d8b2d447a79d0db94b4
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
parent bc390a8e
...@@ -380,7 +380,7 @@ struct InternalNode ...@@ -380,7 +380,7 @@ struct InternalNode
FolderNode *createFolderNode(InternalNode *node) FolderNode *createFolderNode(InternalNode *node)
{ {
FolderNode *newNode = 0; FolderNode *newNode = nullptr;
if (node->typeName.isEmpty()) if (node->typeName.isEmpty())
newNode = new FolderNode(FileName::fromString(node->fullPath)); newNode = new FolderNode(FileName::fromString(node->fullPath));
else else
...@@ -1071,7 +1071,7 @@ bool QmakePriFileNode::ensureWriteableProFile(const QString &file) ...@@ -1071,7 +1071,7 @@ bool QmakePriFileNode::ensureWriteableProFile(const QString &file)
QPair<ProFile *, QStringList> QmakePriFileNode::readProFile(const QString &file) QPair<ProFile *, QStringList> QmakePriFileNode::readProFile(const QString &file)
{ {
QStringList lines; QStringList lines;
ProFile *includeFile = 0; ProFile *includeFile = nullptr;
{ {
QString contents; QString contents;
{ {
...@@ -1087,7 +1087,7 @@ QPair<ProFile *, QStringList> QmakePriFileNode::readProFile(const QString &file) ...@@ -1087,7 +1087,7 @@ QPair<ProFile *, QStringList> QmakePriFileNode::readProFile(const QString &file)
QMakeVfs vfs; QMakeVfs vfs;
QtSupport::ProMessageHandler handler; QtSupport::ProMessageHandler handler;
QMakeParser parser(0, &vfs, &handler); QMakeParser parser(nullptr, &vfs, &handler);
includeFile = parser.parsedProBlock(QStringRef(&contents), file, 1); includeFile = parser.parsedProBlock(QStringRef(&contents), file, 1);
} }
return qMakePair(includeFile, lines); return qMakePair(includeFile, lines);
...@@ -1122,7 +1122,7 @@ bool QmakePriFileNode::renameFile(const QString &oldName, ...@@ -1122,7 +1122,7 @@ bool QmakePriFileNode::renameFile(const QString &oldName,
return false; return false;
// We need to re-parse here: The file has changed. // 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')); QString contents = lines.join(QLatin1Char('\n'));
includeFile = parser.parsedProBlock(QStringRef(&contents), includeFile = parser.parsedProBlock(QStringRef(&contents),
m_projectFilePath.toString(), 1, QMakeParser::FullGrammar); m_projectFilePath.toString(), 1, QMakeParser::FullGrammar);
...@@ -1422,7 +1422,7 @@ QmakeProFileNode *QmakeProFileNode::findProFileFor(const FileName &fileName) con ...@@ -1422,7 +1422,7 @@ QmakeProFileNode *QmakeProFileNode::findProFileFor(const FileName &fileName) con
if (QmakeProFileNode *qmakeProFileNode = dynamic_cast<QmakeProFileNode *>(pn)) if (QmakeProFileNode *qmakeProFileNode = dynamic_cast<QmakeProFileNode *>(pn))
if (QmakeProFileNode *result = qmakeProFileNode->findProFileFor(fileName)) if (QmakeProFileNode *result = qmakeProFileNode->findProFileFor(fileName))
return result; return result;
return 0; return nullptr;
} }
QString QmakeProFileNode::makefile() const QString QmakeProFileNode::makefile() const
......
...@@ -80,8 +80,8 @@ public: ...@@ -80,8 +80,8 @@ public:
bool addSubProjects(const QStringList &proFilePaths) override; bool addSubProjects(const QStringList &proFilePaths) override;
bool removeSubProjects(const QStringList &proFilePaths) override; bool removeSubProjects(const QStringList &proFilePaths) override;
bool addFiles(const QStringList &filePaths, QStringList *notAdded = 0) override; bool addFiles(const QStringList &filePaths, QStringList *notAdded = nullptr) override;
bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = 0) override; bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = nullptr) override;
bool deleteFiles(const QStringList &filePaths) override; bool deleteFiles(const QStringList &filePaths) override;
bool canRenameFile(const QString &filePath, const QString &newFilePath) override; bool canRenameFile(const QString &filePath, const QString &newFilePath) override;
bool renameFile(const QString &filePath, const QString &newFilePath) override; bool renameFile(const QString &filePath, const QString &newFilePath) override;
...@@ -236,7 +236,7 @@ public: ...@@ -236,7 +236,7 @@ public:
} }
QString sourceDir() const; QString sourceDir() const;
QString buildDir(QmakeBuildConfiguration *bc = 0) const; QString buildDir(QmakeBuildConfiguration *bc = nullptr) const;
QStringList generatedFiles(const QString &buildDirectory, QStringList generatedFiles(const QString &buildDirectory,
const ProjectExplorer::FileNode *sourceFile) const; const ProjectExplorer::FileNode *sourceFile) const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment