From 21e1b1e49e5d395b636579dce306018021cf0902 Mon Sep 17 00:00:00 2001 From: Kevin Funk Date: Mon, 16 Jan 2017 18:17:34 +0100 Subject: [PATCH] Prefer nullptr over Q_NULLPTR --- autotests/kmodelindexproxymappertest.cpp | 2 +- src/klinkitemselectionmodel.cpp | 8 ++++---- src/klinkitemselectionmodel.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/autotests/kmodelindexproxymappertest.cpp b/autotests/kmodelindexproxymappertest.cpp index 2a307dd..f918f08 100644 --- a/autotests/kmodelindexproxymappertest.cpp +++ b/autotests/kmodelindexproxymappertest.cpp @@ -141,7 +141,7 @@ void ModelIndexProxyMapperTest::connectedChangedComplex() QVERIFY(mapper.isConnected()); - proxy_right2.setSourceModel(Q_NULLPTR); + proxy_right2.setSourceModel(nullptr); QVERIFY(!mapper.isConnected()); QCOMPARE(spy.count(), 1); diff --git a/src/klinkitemselectionmodel.cpp b/src/klinkitemselectionmodel.cpp index ad8a108..82f016e 100644 --- a/src/klinkitemselectionmodel.cpp +++ b/src/klinkitemselectionmodel.cpp @@ -33,9 +33,9 @@ class KLinkItemSelectionModelPrivate public: KLinkItemSelectionModelPrivate(KLinkItemSelectionModel *proxySelectionModel) : q_ptr(proxySelectionModel), - m_linkedItemSelectionModel(Q_NULLPTR), + m_linkedItemSelectionModel(nullptr), m_ignoreCurrentChanged(false), - m_indexMapper(Q_NULLPTR) + m_indexMapper(nullptr) { QObject::connect(q_ptr, &QItemSelectionModel::currentChanged, q_ptr, [this](const QModelIndex& idx) { slotCurrentChanged(idx); } ); @@ -62,7 +62,7 @@ public: void reinitializeIndexMapper() { delete m_indexMapper; - m_indexMapper = Q_NULLPTR; + m_indexMapper = nullptr; if (!q_ptr->model() || !m_linkedItemSelectionModel || !m_linkedItemSelectionModel->model()) { @@ -93,7 +93,7 @@ KLinkItemSelectionModel::KLinkItemSelectionModel(QAbstractItemModel *model, QIte } KLinkItemSelectionModel::KLinkItemSelectionModel(QObject *parent) - : QItemSelectionModel(Q_NULLPTR, parent), + : QItemSelectionModel(nullptr, parent), d_ptr(new KLinkItemSelectionModelPrivate(this)) { } diff --git a/src/klinkitemselectionmodel.h b/src/klinkitemselectionmodel.h index ce4878b..aecb217 100644 --- a/src/klinkitemselectionmodel.h +++ b/src/klinkitemselectionmodel.h @@ -105,7 +105,7 @@ public: */ KLinkItemSelectionModel(QAbstractItemModel *targetModel, QItemSelectionModel *linkedItemSelectionModel, QObject *parent = nullptr); - explicit KLinkItemSelectionModel(QObject *parent = Q_NULLPTR); + explicit KLinkItemSelectionModel(QObject *parent = nullptr); ~KLinkItemSelectionModel();