Prefer nullptr over Q_NULLPTR

wilder
Kevin Funk 9 years ago
parent 1c02848a4d
commit 21e1b1e49e
  1. 2
      autotests/kmodelindexproxymappertest.cpp
  2. 8
      src/klinkitemselectionmodel.cpp
  3. 2
      src/klinkitemselectionmodel.h

@ -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);

@ -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))
{
}

@ -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();

Loading…
Cancel
Save