summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qabstractitemmodel.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/itemmodels/qabstractitemmodel.h')
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/corelib/itemmodels/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h
index a211d8e8ca..cd294ef8fa 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.h
+++ b/src/corelib/itemmodels/qabstractitemmodel.h
@@ -55,7 +55,7 @@ class Q_CORE_EXPORT QModelIndex
{
friend class QAbstractItemModel;
public:
- Q_DECL_CONSTEXPR inline QModelIndex() Q_DECL_NOTHROW : r(-1), c(-1), i(0), m(Q_NULLPTR) {}
+ Q_DECL_CONSTEXPR inline QModelIndex() Q_DECL_NOTHROW : r(-1), c(-1), i(0), m(nullptr) {}
// compiler-generated copy/move ctors/assignment operators are fine!
Q_DECL_CONSTEXPR inline int row() const Q_DECL_NOTHROW { return r; }
Q_DECL_CONSTEXPR inline int column() const Q_DECL_NOTHROW { return c; }
@@ -69,7 +69,7 @@ public:
inline QVariant data(int role = Qt::DisplayRole) const;
inline Qt::ItemFlags flags() const;
Q_DECL_CONSTEXPR inline const QAbstractItemModel *model() const Q_DECL_NOTHROW { return m; }
- Q_DECL_CONSTEXPR inline bool isValid() const Q_DECL_NOTHROW { return (r >= 0) && (c >= 0) && (m != Q_NULLPTR); }
+ Q_DECL_CONSTEXPR inline bool isValid() const Q_DECL_NOTHROW { return (r >= 0) && (c >= 0) && (m != nullptr); }
Q_DECL_CONSTEXPR inline bool operator==(const QModelIndex &other) const Q_DECL_NOTHROW
{ return (other.r == r) && (other.i == i) && (other.c == c) && (other.m == m); }
Q_DECL_CONSTEXPR inline bool operator!=(const QModelIndex &other) const Q_DECL_NOTHROW
@@ -115,7 +115,7 @@ public:
QPersistentModelIndex &operator=(const QPersistentModelIndex &other);
#ifdef Q_COMPILER_RVALUE_REFS
inline QPersistentModelIndex(QPersistentModelIndex &&other) Q_DECL_NOTHROW
- : d(other.d) { other.d = Q_NULLPTR; }
+ : d(other.d) { other.d = nullptr; }
inline QPersistentModelIndex &operator=(QPersistentModelIndex &&other) Q_DECL_NOTHROW
{ qSwap(d, other.d); return *this; }
#endif
@@ -171,7 +171,7 @@ class Q_CORE_EXPORT QAbstractItemModel : public QObject
friend class QIdentityProxyModel;
public:
- explicit QAbstractItemModel(QObject *parent = Q_NULLPTR);
+ explicit QAbstractItemModel(QObject *parent = nullptr);
virtual ~QAbstractItemModel();
Q_INVOKABLE bool hasIndex(int row, int column, const QModelIndex &parent = QModelIndex()) const;
@@ -286,9 +286,9 @@ protected Q_SLOTS:
void resetInternalData();
protected:
- QAbstractItemModel(QAbstractItemModelPrivate &dd, QObject *parent = Q_NULLPTR);
+ QAbstractItemModel(QAbstractItemModelPrivate &dd, QObject *parent = nullptr);
- inline QModelIndex createIndex(int row, int column, void *data = Q_NULLPTR) const;
+ inline QModelIndex createIndex(int row, int column, void *data = nullptr) const;
inline QModelIndex createIndex(int row, int column, quintptr id) const;
void encodeData(const QModelIndexList &indexes, QDataStream &stream) const;
@@ -367,15 +367,15 @@ class Q_CORE_EXPORT QAbstractTableModel : public QAbstractItemModel
Q_OBJECT
public:
- explicit QAbstractTableModel(QObject *parent = Q_NULLPTR);
+ explicit QAbstractTableModel(QObject *parent = nullptr);
~QAbstractTableModel();
- QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
- QModelIndex sibling(int row, int column, const QModelIndex &idx) const Q_DECL_OVERRIDE;
+ QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
+ QModelIndex sibling(int row, int column, const QModelIndex &idx) const override;
bool dropMimeData(const QMimeData *data, Qt::DropAction action,
- int row, int column, const QModelIndex &parent) Q_DECL_OVERRIDE;
+ int row, int column, const QModelIndex &parent) override;
- Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
+ Qt::ItemFlags flags(const QModelIndex &index) const override;
using QObject::parent;
@@ -384,8 +384,8 @@ protected:
private:
Q_DISABLE_COPY(QAbstractTableModel)
- QModelIndex parent(const QModelIndex &child) const Q_DECL_OVERRIDE;
- bool hasChildren(const QModelIndex &parent) const Q_DECL_OVERRIDE;
+ QModelIndex parent(const QModelIndex &child) const override;
+ bool hasChildren(const QModelIndex &parent) const override;
};
class Q_CORE_EXPORT QAbstractListModel : public QAbstractItemModel
@@ -393,15 +393,15 @@ class Q_CORE_EXPORT QAbstractListModel : public QAbstractItemModel
Q_OBJECT
public:
- explicit QAbstractListModel(QObject *parent = Q_NULLPTR);
+ explicit QAbstractListModel(QObject *parent = nullptr);
~QAbstractListModel();
- QModelIndex index(int row, int column = 0, const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
- QModelIndex sibling(int row, int column, const QModelIndex &idx) const Q_DECL_OVERRIDE;
+ QModelIndex index(int row, int column = 0, const QModelIndex &parent = QModelIndex()) const override;
+ QModelIndex sibling(int row, int column, const QModelIndex &idx) const override;
bool dropMimeData(const QMimeData *data, Qt::DropAction action,
- int row, int column, const QModelIndex &parent) Q_DECL_OVERRIDE;
+ int row, int column, const QModelIndex &parent) override;
- Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
+ Qt::ItemFlags flags(const QModelIndex &index) const override;
using QObject::parent;
@@ -410,9 +410,9 @@ protected:
private:
Q_DISABLE_COPY(QAbstractListModel)
- QModelIndex parent(const QModelIndex &child) const Q_DECL_OVERRIDE;
- int columnCount(const QModelIndex &parent) const Q_DECL_OVERRIDE;
- bool hasChildren(const QModelIndex &parent) const Q_DECL_OVERRIDE;
+ QModelIndex parent(const QModelIndex &child) const override;
+ int columnCount(const QModelIndex &parent) const override;
+ bool hasChildren(const QModelIndex &parent) const override;
};
// inline implementations