From 389f2a076d3321c285fb9652177ccb3367019e51 Mon Sep 17 00:00:00 2001 From: Wolf-Michael Bolle Date: Thu, 15 Mar 2012 15:56:14 +0100 Subject: [PATCH] Removed move constructor. All C++-2011-specific constructors, operators and methods may be inline only in Qt. Since an implementation in the header file does not seem to be possible for QMimeType without breaking backward compatiblity the move constructor has to disappear altogether. See also the discussion at http://codereview.qt-project.org/#change,19150 Change-Id: If07347a51a1ae5bd4c2d292dac835592ede4b370 Reviewed-by: Thiago Macieira --- src/corelib/mimetypes/qmimetype.cpp | 19 ------------------- src/corelib/mimetypes/qmimetype.h | 2 -- 2 files changed, 21 deletions(-) diff --git a/src/corelib/mimetypes/qmimetype.cpp b/src/corelib/mimetypes/qmimetype.cpp index ebf687bb4b9..18ce5e50008 100644 --- a/src/corelib/mimetypes/qmimetype.cpp +++ b/src/corelib/mimetypes/qmimetype.cpp @@ -181,25 +181,6 @@ QMimeType &QMimeType::operator=(const QMimeType &other) return *this; } -#ifdef Q_COMPILER_RVALUE_REFS -/*! - \fn QMimeType::QMimeType(QMimeType &&other); - Constructs this QMimeType object by moving the data of the rvalue reference \a other. - */ -QMimeType::QMimeType(QMimeType &&other) : - d(std::move(other.d)) -{ - DBG() << "name():" << name(); - //DBG() << "aliases():" << aliases(); - //DBG() << "comment():" << comment(); - DBG() << "genericIconName():" << genericIconName(); - DBG() << "iconName():" << iconName(); - DBG() << "globPatterns():" << globPatterns(); - DBG() << "suffixes():" << suffixes(); - DBG() << "preferredSuffix():" << preferredSuffix(); -} -#endif - /*! \fn QMimeType::QMimeType(const QMimeTypePrivate &dd); Assigns the data of the QMimeTypePrivate \a dd to this QMimeType object, and returns a reference to this object. diff --git a/src/corelib/mimetypes/qmimetype.h b/src/corelib/mimetypes/qmimetype.h index 68d17caaba8..172973e77aa 100644 --- a/src/corelib/mimetypes/qmimetype.h +++ b/src/corelib/mimetypes/qmimetype.h @@ -59,8 +59,6 @@ public: QMimeType(const QMimeType &other); QMimeType &operator=(const QMimeType &other); #ifdef Q_COMPILER_RVALUE_REFS - QMimeType(QMimeType &&other); - QMimeType &operator=(QMimeType &&other) { qSwap(d, other.d);