diff options
Diffstat (limited to 'src/corelib/itemmodels/qabstractitemmodel.h')
-rw-r--r-- | src/corelib/itemmodels/qabstractitemmodel.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/corelib/itemmodels/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h index f3bf2c1019..95b9d271f3 100644 --- a/src/corelib/itemmodels/qabstractitemmodel.h +++ b/src/corelib/itemmodels/qabstractitemmodel.h @@ -113,6 +113,11 @@ public: inline bool operator!=(const QPersistentModelIndex &other) const { return !operator==(other); } QPersistentModelIndex &operator=(const QPersistentModelIndex &other); +#ifdef Q_COMPILER_RVALUE_REFS + inline QPersistentModelIndex(QPersistentModelIndex &&other) : d(other.d) { other.d = 0; } + inline QPersistentModelIndex &operator=(QPersistentModelIndex &&other) + { qSwap(d, other.d); return *this; } +#endif inline void swap(QPersistentModelIndex &other) { qSwap(d, other.d); } bool operator==(const QModelIndex &other) const; bool operator!=(const QModelIndex &other) const; @@ -427,6 +432,15 @@ public: int row, int column, const QModelIndex &parent); Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE; + +#ifdef Q_NO_USING_KEYWORD +#ifndef Q_QDOC + inline QObject *parent() const { return QAbstractItemModel::parent(); } +#endif +#else + using QObject::parent; +#endif + protected: QAbstractTableModel(QAbstractItemModelPrivate &dd, QObject *parent); @@ -449,6 +463,15 @@ public: int row, int column, const QModelIndex &parent); Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE; + +#ifdef Q_NO_USING_KEYWORD +#ifndef Q_QDOC + inline QObject *parent() const { return QAbstractItemModel::parent(); } +#endif +#else + using QObject::parent; +#endif + protected: QAbstractListModel(QAbstractItemModelPrivate &dd, QObject *parent); |