QModelIndex: remove user-defined copy operations
authorMarc Mutz <marc.mutz@kdab.com>
Fri, 24 Feb 2012 16:15:25 +0000 (17:15 +0100)
committerQt by Nokia <qt-info@nokia.com>
Sat, 11 Aug 2012 20:35:06 +0000 (22:35 +0200)
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>
src/corelib/itemmodels/qabstractitemmodel.h

index 4cdafdd..26d4cb5 100644 (file)
@@ -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; }