diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2018-11-04 09:50:14 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2018-11-04 18:24:31 +0000 |
commit | adf5305af620e2a70aa66780c5440344667c3c45 (patch) | |
tree | 08bc18c99fce1cdd192494d4d3a8cae7a12d3847 /src/plugins/autotoolsprojectmanager/makefileparser.cpp | |
parent | 24bcce4aa68754d2664bfd95458d85c29b7c9761 (diff) | |
download | qt-creator-adf5305af620e2a70aa66780c5440344667c3c45.tar.gz |
AutotoolsProjectManager: Modernize
modernize-use-nullptr
modernize-use-override
modernize-use-auto
Change-Id: I7abab567a6dab1bde93c520aa8746380ae24fda8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/autotoolsprojectmanager/makefileparser.cpp')
-rw-r--r-- | src/plugins/autotoolsprojectmanager/makefileparser.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/autotoolsprojectmanager/makefileparser.cpp b/src/plugins/autotoolsprojectmanager/makefileparser.cpp index 9c3e32216b..4587f7bacf 100644 --- a/src/plugins/autotoolsprojectmanager/makefileparser.cpp +++ b/src/plugins/autotoolsprojectmanager/makefileparser.cpp @@ -56,7 +56,7 @@ bool MakefileParser::parse() m_sources.clear(); m_makefiles.clear(); - QFile *file = new QFile(m_makefile); + auto file = new QFile(m_makefile); if (!file->open(QIODevice::ReadOnly | QIODevice::Text)) { qWarning("%s: %s", qPrintable(m_makefile), qPrintable(file->errorString())); delete file; @@ -343,7 +343,7 @@ QStringList MakefileParser::directorySources(const QString &directory, QStringList MakefileParser::targetValues(bool *hasVariables) { QStringList values; - if (hasVariables != 0) + if (hasVariables) *hasVariables = false; const int index = m_line.indexOf(QLatin1Char('=')); @@ -366,7 +366,7 @@ QStringList MakefileParser::targetValues(bool *hasVariables) while (it != lineValues.end()) { if ((*it).startsWith(QLatin1String("$("))) { it = lineValues.erase(it); - if (hasVariables != 0) + if (hasVariables) *hasVariables = true; } else { ++it; @@ -400,9 +400,9 @@ QStringList MakefileParser::targetValues(bool *hasVariables) void MakefileParser::appendHeader(QStringList &list, const QDir &dir, const QString &fileName) { - const char *const headerExtensions[] = {".h", ".hh", ".hg", ".hxx", ".hpp", 0}; + const char *const headerExtensions[] = {".h", ".hh", ".hg", ".hxx", ".hpp", nullptr}; int i = 0; - while (headerExtensions[i] != 0) { + while (headerExtensions[i]) { const QString headerFile = fileName + QLatin1String(headerExtensions[i]); QFileInfo fileInfo(dir, headerFile); if (fileInfo.exists()) |