diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2017-11-18 19:07:25 +0300 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-11-20 21:03:07 +0000 |
commit | 7494bf59c28570dcc6ed6019f979e5625956c8af (patch) | |
tree | 3fb1e7fab1d064ebda1e78ffb21b06bd83e5107f /src/lib/corelib/tools/settingsmodel.cpp | |
parent | 95c1e81382246f5235322eeb6876f77f65b22c19 (diff) | |
download | qbs-7494bf59c28570dcc6ed6019f979e5625956c8af.tar.gz |
Use nullptr to initialize the pointers
Change-Id: I59d743f585410cb5c00d36a7b6f9a3e9d696d19e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/tools/settingsmodel.cpp')
-rw-r--r-- | src/lib/corelib/tools/settingsmodel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/corelib/tools/settingsmodel.cpp b/src/lib/corelib/tools/settingsmodel.cpp index 4562de906..b175211a1 100644 --- a/src/lib/corelib/tools/settingsmodel.cpp +++ b/src/lib/corelib/tools/settingsmodel.cpp @@ -60,7 +60,7 @@ namespace Internal { struct Node { - Node() : parent(0), isFromSettings(true) {} + Node() : parent(nullptr), isFromSettings(true) {} ~Node() { qDeleteAll(children); } QString uniqueChildName() const; @@ -279,7 +279,7 @@ bool SettingsModel::setData(const QModelIndex &index, const QVariant &value, int if (!node) return false; const QString valueString = value.toString(); - QString *toChange = 0; + QString *toChange = nullptr; if (index.column() == keyColumn() && !valueString.isEmpty() && !node->parent->hasDirectChildWithName(valueString) && !(node->parent->parent == &d->rootNode @@ -358,7 +358,7 @@ void SettingsModel::SettingsModelPrivate::addNodeFromSettings(Node *parentNode, void SettingsModel::SettingsModelPrivate::addNode(qbs::Internal::Node *parentNode, const QString ¤tNamePart, const QStringList &restOfName, const QVariant &value) { - Node *currentNode = 0; + Node *currentNode = nullptr; for (Node * const n : qAsConst(parentNode->children)) { if (n->name == currentNamePart) { currentNode = n; |