diff options
| author | Ben Woosley <[email protected]> | 2018-07-31 14:02:34 -0400 |
|---|---|---|
| committer | Ben Woosley <[email protected]> | 2019-01-13 03:25:14 -0800 |
| commit | 3a0e76fc12b91b2846d756981e15f09b767a9c37 (patch) | |
| tree | 73d30057afc14c8cf0f3e882d9f885336a970d86 /src/qt/peertablemodel.cpp | |
| parent | Don't use zero as null pointer constant (-Wzero-as-null-pointer-constant) (diff) | |
| download | discoin-3a0e76fc12b91b2846d756981e15f09b767a9c37.tar.xz discoin-3a0e76fc12b91b2846d756981e15f09b767a9c37.zip | |
Replace remaining 0 with nullptr in Qt code
Also used type-appropriate enum values such as Qt::NoItemFlags in
some cases.
All cases identified via -Wzero-as-null-pointer-constant
Diffstat (limited to 'src/qt/peertablemodel.cpp')
| -rw-r--r-- | src/qt/peertablemodel.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp index e2e78fe81..496aeebf7 100644 --- a/src/qt/peertablemodel.cpp +++ b/src/qt/peertablemodel.cpp @@ -96,7 +96,7 @@ public: if (idx >= 0 && idx < cachedNodeStats.size()) return &cachedNodeStats[idx]; - return 0; + return nullptr; } }; @@ -104,7 +104,7 @@ PeerTableModel::PeerTableModel(interfaces::Node& node, ClientModel *parent) : QAbstractTableModel(parent), m_node(node), clientModel(parent), - timer(0) + timer(nullptr) { columns << tr("NodeId") << tr("Node/Service") << tr("Ping") << tr("Sent") << tr("Received") << tr("User Agent"); priv.reset(new PeerTablePriv()); @@ -197,8 +197,7 @@ QVariant PeerTableModel::headerData(int section, Qt::Orientation orientation, in Qt::ItemFlags PeerTableModel::flags(const QModelIndex &index) const { - if(!index.isValid()) - return 0; + if (!index.isValid()) return Qt::NoItemFlags; Qt::ItemFlags retval = Qt::ItemIsSelectable | Qt::ItemIsEnabled; return retval; |