aboutsummaryrefslogtreecommitdiff
path: root/src/kconfig_compiler/kconfig_compiler.cpp
diff options
context:
space:
mode:
authorKevin Funk <kfunk@kde.org>2017-01-16 09:44:17 +0100
committerKevin Funk <kfunk@kde.org>2017-01-16 09:44:17 +0100
commitf83b4b191d627b010192e0715536cb57c25519fb (patch)
tree411f9ae566f1a6ca7cd87e769d782842f29ff72e /src/kconfig_compiler/kconfig_compiler.cpp
parentf7ef172c32a7e17e5e3b24cafa5da1e95502b9e4 (diff)
downloadkconfig-f83b4b191d627b010192e0715536cb57c25519fb.tar.gz
kconfig-f83b4b191d627b010192e0715536cb57c25519fb.tar.bz2
Use nullptr everywhere
Differential Revision: https://phabricator.kde.org/D3987
Diffstat (limited to 'src/kconfig_compiler/kconfig_compiler.cpp')
-rw-r--r--src/kconfig_compiler/kconfig_compiler.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/kconfig_compiler/kconfig_compiler.cpp b/src/kconfig_compiler/kconfig_compiler.cpp
index c836252f..8346de2b 100644
--- a/src/kconfig_compiler/kconfig_compiler.cpp
+++ b/src/kconfig_compiler/kconfig_compiler.cpp
@@ -776,11 +776,11 @@ CfgEntry *parseEntry(const QString &group, const QDomElement &element, const Cfg
paramType = e.attribute(QStringLiteral("type"));
if (param.isEmpty()) {
cerr << "Parameter must have a name: " << dumpNode(e) << endl;
- return 0;
+ return nullptr;
}
if (paramType.isEmpty()) {
cerr << "Parameter must have a type: " << dumpNode(e) << endl;
- return 0;
+ return nullptr;
}
if ((paramType == QLatin1String("Int")) || (paramType == QLatin1String("UInt"))) {
bool ok;
@@ -788,7 +788,7 @@ CfgEntry *parseEntry(const QString &group, const QDomElement &element, const Cfg
if (!ok) {
cerr << "Integer parameter must have a maximum (e.g. max=\"0\"): "
<< dumpNode(e) << endl;
- return 0;
+ return nullptr;
}
} else if (paramType == QLatin1String("Enum")) {
for (QDomElement e2 = e.firstChildElement(); !e2.isNull(); e2 = e2.nextSiblingElement()) {
@@ -804,13 +804,13 @@ CfgEntry *parseEntry(const QString &group, const QDomElement &element, const Cfg
if (paramValues.isEmpty()) {
cerr << "No values specified for parameter '" << param
<< "'." << endl;
- return 0;
+ return nullptr;
}
paramMax = paramValues.count() - 1;
} else {
cerr << "Parameter '" << param << "' has type " << paramType
<< " but must be of type int, uint or Enum." << endl;
- return 0;
+ return nullptr;
}
} else if (tag == QLatin1String("default")) {
if (e.attribute(QStringLiteral("param")).isEmpty()) {
@@ -866,7 +866,7 @@ CfgEntry *parseEntry(const QString &group, const QDomElement &element, const Cfg
bool nameIsEmpty = name.isEmpty();
if (nameIsEmpty && key.isEmpty()) {
cerr << "Entry must have a name or a key: " << dumpNode(element) << endl;
- return 0;
+ return nullptr;
}
if (key.isEmpty()) {
@@ -884,12 +884,12 @@ CfgEntry *parseEntry(const QString &group, const QDomElement &element, const Cfg
if (name.contains(QStringLiteral("$("))) {
if (param.isEmpty()) {
cerr << "Name may not be parameterized: " << name << endl;
- return 0;
+ return nullptr;
}
} else {
if (!param.isEmpty()) {
cerr << "Name must contain '$(" << param << ")': " << name << endl;
- return 0;
+ return nullptr;
}
}
@@ -924,13 +924,13 @@ CfgEntry *parseEntry(const QString &group, const QDomElement &element, const Cfg
i = paramValues.indexOf(index);
if (i == -1) {
cerr << "Index '" << index << "' for default value is unknown." << endl;
- return 0;
+ return nullptr;
}
}
if ((i < 0) || (i > paramMax)) {
cerr << "Index '" << i << "' for default value is out of range [0, " << paramMax << "]." << endl;
- return 0;
+ return nullptr;
}
QString tmpDefaultValue = e.text();
@@ -951,7 +951,7 @@ CfgEntry *parseEntry(const QString &group, const QDomElement &element, const Cfg
else {
cerr << "The name '" << name << "' is not a valid name for an entry." << endl;
}
- return 0;
+ return nullptr;
}
if (allNames.contains(name)) {
@@ -961,7 +961,7 @@ CfgEntry *parseEntry(const QString &group, const QDomElement &element, const Cfg
else {
cerr << "The name '" << name << "' is not unique." << endl;
}
- return 0;
+ return nullptr;
}
allNames.append(name);