summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2012-02-24 17:15:25 +0100
committerQt by Nokia <qt-info@nokia.com>2012-08-11 22:35:06 +0200
commit952d06f7d6cb8ad2b84b0d80bce936abdd0be196 (patch)
tree79953f748452ff14848876fea29b9fc242b3cbe9 /src/corelib
parentb603fd36c256e91beff758363d6943cf2f8294d8 (diff)
QModelIndex: remove user-defined copy operations
They're identical to the ones the compiler will synthesize and their presence prevents move constructor and assignment operators from being synthesized alongside their copy counterparts. The destructor can go, too. Change-Id: Ia9cc26ba1ffaa670f03642af457e632f44bd69c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/corelib/itemmodels/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h
index 4cdafdd9d8..26d4cb53d1 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.h
+++ b/src/corelib/itemmodels/qabstractitemmodel.h
@@ -61,9 +61,7 @@ class Q_CORE_EXPORT QModelIndex
friend class QProxyModel;
public:
inline QModelIndex() : r(-1), c(-1), p(0), m(0) {}
- inline QModelIndex(const QModelIndex &other)
- : r(other.r), c(other.c), p(other.p), m(other.m) {}
- inline ~QModelIndex() { p = 0; m = 0; }
+ // compiler-generated copy/move ctors/assignment operators are fine!
inline int row() const { return r; }
inline int column() const { return c; }
inline void *internalPointer() const { return p; }