diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-04-02 16:23:48 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-04-08 21:24:26 +0000 |
commit | 28c9e0e606d104e526bb1c8e6e8bcda3ee0aa496 (patch) | |
tree | f94de2034f1b8b8c2d315268e6bf3b11483dc0e3 | |
parent | be56db2c49be02fd7083c5a02131462748e29bef (diff) | |
download | qtbase-28c9e0e606d104e526bb1c8e6e8bcda3ee0aa496.tar.gz |
Remove handling of missing Q_COMPILER_RVALUE_REFS
Change-Id: I7bc6c455fbae4cdad584c76773299a6d8cd40c82
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/concurrent/qtconcurrentfunctionwrappers.h | 2 | ||||
-rw-r--r-- | src/corelib/io/qdir.h | 2 | ||||
-rw-r--r-- | src/corelib/io/qfileinfo.h | 2 | ||||
-rw-r--r-- | src/corelib/io/qprocess.h | 2 | ||||
-rw-r--r-- | src/corelib/io/qstorageinfo.h | 2 | ||||
-rw-r--r-- | src/corelib/io/qurl.h | 2 | ||||
-rw-r--r-- | src/corelib/io/qurlquery.h | 2 | ||||
-rw-r--r-- | src/corelib/itemmodels/qabstractitemmodel.h | 2 | ||||
-rw-r--r-- | src/corelib/itemmodels/qitemselectionmodel.h | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qobject.h | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qppsattribute.cpp | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qppsattribute_p.h | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant.h | 2 | ||||
-rw-r--r-- | src/corelib/mimetypes/qmimetype.h | 2 | ||||
-rw-r--r-- | src/corelib/mimetypes/qmimetype_p.h | 2 | ||||
-rw-r--r-- | src/corelib/serialization/qxmlstream.h | 6 | ||||
-rw-r--r-- | src/corelib/tools/qarraydatapointer.h | 2 | ||||
-rw-r--r-- | src/corelib/tools/qbitarray.h | 2 | ||||
-rw-r--r-- | src/corelib/tools/qbytearray.h | 2 | ||||
-rw-r--r-- | src/corelib/tools/qcollator.h | 4 | ||||
-rw-r--r-- | src/corelib/tools/qcommandlineoption.h | 2 | ||||
-rw-r--r-- | src/corelib/tools/qcontiguouscache.h | 2 |
22 files changed, 0 insertions, 52 deletions
diff --git a/src/concurrent/qtconcurrentfunctionwrappers.h b/src/concurrent/qtconcurrentfunctionwrappers.h index 734bb29df1..7ba6720e03 100644 --- a/src/concurrent/qtconcurrentfunctionwrappers.h +++ b/src/concurrent/qtconcurrentfunctionwrappers.h @@ -225,13 +225,11 @@ struct PushBackWrapper return c.push_back(u); } -#ifdef Q_COMPILER_RVALUE_REFS template <class C, class U> inline void operator()(C &c, U &&u) const { return c.push_back(u); } -#endif }; template <typename Functor, bool foo = HasResultType<Functor>::Value> diff --git a/src/corelib/io/qdir.h b/src/corelib/io/qdir.h index 547ac163c7..45a40995f8 100644 --- a/src/corelib/io/qdir.h +++ b/src/corelib/io/qdir.h @@ -109,9 +109,7 @@ public: QT_DEPRECATED_X("Use QDir::setPath() instead") QDir &operator=(const QString &path); #endif -#ifdef Q_COMPILER_RVALUE_REFS QDir &operator=(QDir &&other) noexcept { swap(other); return *this; } -#endif void swap(QDir &other) noexcept { qSwap(d_ptr, other.d_ptr); } diff --git a/src/corelib/io/qfileinfo.h b/src/corelib/io/qfileinfo.h index bd9e1d216f..111517325d 100644 --- a/src/corelib/io/qfileinfo.h +++ b/src/corelib/io/qfileinfo.h @@ -67,9 +67,7 @@ public: ~QFileInfo(); QFileInfo &operator=(const QFileInfo &fileinfo); -#ifdef Q_COMPILER_RVALUE_REFS QFileInfo &operator=(QFileInfo &&other) noexcept { swap(other); return *this; } -#endif void swap(QFileInfo &other) noexcept { qSwap(d_ptr, other.d_ptr); } diff --git a/src/corelib/io/qprocess.h b/src/corelib/io/qprocess.h index 83b7138ff9..9fda5fba11 100644 --- a/src/corelib/io/qprocess.h +++ b/src/corelib/io/qprocess.h @@ -72,9 +72,7 @@ public: QProcessEnvironment(); QProcessEnvironment(const QProcessEnvironment &other); ~QProcessEnvironment(); -#ifdef Q_COMPILER_RVALUE_REFS QProcessEnvironment &operator=(QProcessEnvironment && other) noexcept { swap(other); return *this; } -#endif QProcessEnvironment &operator=(const QProcessEnvironment &other); void swap(QProcessEnvironment &other) noexcept { qSwap(d, other.d); } diff --git a/src/corelib/io/qstorageinfo.h b/src/corelib/io/qstorageinfo.h index addcbb2990..237e68d2a1 100644 --- a/src/corelib/io/qstorageinfo.h +++ b/src/corelib/io/qstorageinfo.h @@ -62,9 +62,7 @@ public: ~QStorageInfo(); QStorageInfo &operator=(const QStorageInfo &other); -#ifdef Q_COMPILER_RVALUE_REFS QStorageInfo &operator=(QStorageInfo &&other) noexcept { swap(other); return *this; } -#endif inline void swap(QStorageInfo &other) noexcept { qSwap(d, other.d); } diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h index 70e549c1a9..94269e4369 100644 --- a/src/corelib/io/qurl.h +++ b/src/corelib/io/qurl.h @@ -182,12 +182,10 @@ public: QUrl(const QString &url, ParsingMode mode = TolerantMode); QUrl &operator=(const QString &url); #endif -#ifdef Q_COMPILER_RVALUE_REFS QUrl(QUrl &&other) noexcept : d(other.d) { other.d = nullptr; } inline QUrl &operator=(QUrl &&other) noexcept { qSwap(d, other.d); return *this; } -#endif ~QUrl(); inline void swap(QUrl &other) noexcept { qSwap(d, other.d); } diff --git a/src/corelib/io/qurlquery.h b/src/corelib/io/qurlquery.h index 2a497dc8da..89d0f88059 100644 --- a/src/corelib/io/qurlquery.h +++ b/src/corelib/io/qurlquery.h @@ -70,9 +70,7 @@ public: QUrlQuery(const QUrlQuery &other); QUrlQuery &operator=(const QUrlQuery &other); -#ifdef Q_COMPILER_RVALUE_REFS QUrlQuery &operator=(QUrlQuery &&other) noexcept { swap(other); return *this; } -#endif ~QUrlQuery(); bool operator==(const QUrlQuery &other) const; diff --git a/src/corelib/itemmodels/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h index 496f583c22..43649cf79b 100644 --- a/src/corelib/itemmodels/qabstractitemmodel.h +++ b/src/corelib/itemmodels/qabstractitemmodel.h @@ -117,12 +117,10 @@ 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) noexcept : d(other.d) { other.d = nullptr; } inline QPersistentModelIndex &operator=(QPersistentModelIndex &&other) noexcept { qSwap(d, other.d); return *this; } -#endif inline void swap(QPersistentModelIndex &other) noexcept { qSwap(d, other.d); } bool operator==(const QModelIndex &other) const; bool operator!=(const QModelIndex &other) const; diff --git a/src/corelib/itemmodels/qitemselectionmodel.h b/src/corelib/itemmodels/qitemselectionmodel.h index e5cd24817b..3c3f9fb1ac 100644 --- a/src/corelib/itemmodels/qitemselectionmodel.h +++ b/src/corelib/itemmodels/qitemselectionmodel.h @@ -60,12 +60,10 @@ public: // ### Qt 6: remove them all, the compiler-generated ones are fine inline QItemSelectionRange(const QItemSelectionRange &other) : tl(other.tl), br(other.br) {} -# ifdef Q_COMPILER_RVALUE_REFS QItemSelectionRange(QItemSelectionRange &&other) noexcept : tl(std::move(other.tl)), br(std::move(other.br)) {} QItemSelectionRange &operator=(QItemSelectionRange &&other) noexcept { tl = std::move(other.tl); br = std::move(other.br); return *this; } -# endif QItemSelectionRange &operator=(const QItemSelectionRange &other) { tl = other.tl; br = other.br; return *this; } #endif // Qt < 6 diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index 6d7b9521c2..1d83731441 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -544,10 +544,8 @@ public: inline explicit QSignalBlocker(QObject &o) noexcept; inline ~QSignalBlocker(); -#ifdef Q_COMPILER_RVALUE_REFS inline QSignalBlocker(QSignalBlocker &&other) noexcept; inline QSignalBlocker &operator=(QSignalBlocker &&other) noexcept; -#endif inline void reblock() noexcept; inline void unblock() noexcept; @@ -570,7 +568,6 @@ QSignalBlocker::QSignalBlocker(QObject &o) noexcept m_inhibited(false) {} -#ifdef Q_COMPILER_RVALUE_REFS QSignalBlocker::QSignalBlocker(QSignalBlocker &&other) noexcept : m_o(other.m_o), m_blocked(other.m_blocked), @@ -594,7 +591,6 @@ QSignalBlocker &QSignalBlocker::operator=(QSignalBlocker &&other) noexcept } return *this; } -#endif QSignalBlocker::~QSignalBlocker() { diff --git a/src/corelib/kernel/qppsattribute.cpp b/src/corelib/kernel/qppsattribute.cpp index 6be462edb5..166d590872 100644 --- a/src/corelib/kernel/qppsattribute.cpp +++ b/src/corelib/kernel/qppsattribute.cpp @@ -145,7 +145,6 @@ QPpsAttribute &QPpsAttribute::operator=(const QPpsAttribute &other) return *this; } -#ifdef Q_COMPILER_RVALUE_REFS QPpsAttribute::QPpsAttribute(QPpsAttribute &&other) : d(other.d) { other.d->type = QPpsAttribute::None; @@ -156,7 +155,6 @@ QPpsAttribute &QPpsAttribute::operator=(QPpsAttribute &&other) qSwap(d, other.d); return *this; } -#endif bool QPpsAttribute::operator==(const QPpsAttribute &other) const { diff --git a/src/corelib/kernel/qppsattribute_p.h b/src/corelib/kernel/qppsattribute_p.h index b59dcd5851..d6611cb675 100644 --- a/src/corelib/kernel/qppsattribute_p.h +++ b/src/corelib/kernel/qppsattribute_p.h @@ -96,10 +96,8 @@ public: bool operator==(const QPpsAttribute &other) const; bool operator!=(const QPpsAttribute &other) const; -#ifdef Q_COMPILER_RVALUE_REFS QPpsAttribute(QPpsAttribute &&other); QPpsAttribute &operator=(QPpsAttribute &&other); -#endif bool isValid() const; Type type() const; diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index 6b35bfa9e9..2247c7adc8 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -267,12 +267,10 @@ class Q_CORE_EXPORT QVariant #endif QVariant& operator=(const QVariant &other); -#ifdef Q_COMPILER_RVALUE_REFS inline QVariant(QVariant &&other) noexcept : d(other.d) { other.d = Private(); } inline QVariant &operator=(QVariant &&other) noexcept { qSwap(d, other.d); return *this; } -#endif inline void swap(QVariant &other) noexcept { qSwap(d, other.d); } diff --git a/src/corelib/mimetypes/qmimetype.h b/src/corelib/mimetypes/qmimetype.h index c496af7d58..6d6f9eb488 100644 --- a/src/corelib/mimetypes/qmimetype.h +++ b/src/corelib/mimetypes/qmimetype.h @@ -78,9 +78,7 @@ public: QMimeType(); QMimeType(const QMimeType &other); QMimeType &operator=(const QMimeType &other); -#ifdef Q_COMPILER_RVALUE_REFS QMimeType &operator=(QMimeType &&other) noexcept { swap(other); return *this; } -#endif void swap(QMimeType &other) noexcept { qSwap(d, other.d); diff --git a/src/corelib/mimetypes/qmimetype_p.h b/src/corelib/mimetypes/qmimetype_p.h index 5a36e6613c..2918309ad7 100644 --- a/src/corelib/mimetypes/qmimetype_p.h +++ b/src/corelib/mimetypes/qmimetype_p.h @@ -103,7 +103,6 @@ QT_END_NAMESPACE } \ QT_END_NAMESPACE -#ifdef Q_COMPILER_RVALUE_REFS #define QMIMETYPE_BUILDER_FROM_RVALUE_REFS \ QT_BEGIN_NAMESPACE \ static QMimeType buildQMimeType ( \ @@ -122,6 +121,5 @@ QT_END_NAMESPACE return QMimeType(qMimeTypeData); \ } \ QT_END_NAMESPACE -#endif #endif // QMIMETYPE_P_H diff --git a/src/corelib/serialization/qxmlstream.h b/src/corelib/serialization/qxmlstream.h index fedd149fd0..55dcc4e4e8 100644 --- a/src/corelib/serialization/qxmlstream.h +++ b/src/corelib/serialization/qxmlstream.h @@ -59,19 +59,15 @@ public: inline QXmlStreamStringRef(const QStringRef &aString) :m_string(aString.string()?*aString.string():QString()), m_position(aString.position()), m_size(aString.size()){} QXmlStreamStringRef(const QString &aString) : m_string(aString), m_position(0), m_size(m_string.size()) {} -#ifdef Q_COMPILER_RVALUE_REFS QXmlStreamStringRef(QString &&aString) noexcept : m_string(std::move(aString)), m_position(0), m_size(m_string.size()) {} -#endif #if QT_VERSION < QT_VERSION_CHECK(6,0,0) QXmlStreamStringRef(const QXmlStreamStringRef &other) // = default : m_string(other.m_string), m_position(other.m_position), m_size(other.m_size) {} -#ifdef Q_COMPILER_RVALUE_REFS QXmlStreamStringRef(QXmlStreamStringRef &&other) noexcept // = default : m_string(std::move(other.m_string)), m_position(other.m_position), m_size(other.m_size) {} QXmlStreamStringRef &operator=(QXmlStreamStringRef &&other) noexcept // = default { swap(other); return *this; } -#endif QXmlStreamStringRef &operator=(const QXmlStreamStringRef &other) // = default { m_string = other.m_string; m_position = other.m_position; m_size = other.m_size; return *this; } inline ~QXmlStreamStringRef() {} // ### this prevents (or deprecates) all the move/copy special member functions, @@ -111,7 +107,6 @@ public: #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QXmlStreamAttribute(const QString &namespaceUri, const QString &name, const QString &value); QXmlStreamAttribute(const QXmlStreamAttribute &); -#ifdef Q_COMPILER_RVALUE_REFS QXmlStreamAttribute(QXmlStreamAttribute &&other) noexcept // = default; : m_name(std::move(other.m_name)), m_namespaceUri(std::move(other.m_namespaceUri)), @@ -132,7 +127,6 @@ public: m_isDefault = other.m_isDefault; return *this; } -#endif QXmlStreamAttribute& operator=(const QXmlStreamAttribute &); ~QXmlStreamAttribute(); #endif // < Qt 6 diff --git a/src/corelib/tools/qarraydatapointer.h b/src/corelib/tools/qarraydatapointer.h index bce8fc8ddc..0322615f91 100644 --- a/src/corelib/tools/qarraydatapointer.h +++ b/src/corelib/tools/qarraydatapointer.h @@ -82,7 +82,6 @@ public: return *this; } -#ifdef Q_COMPILER_RVALUE_REFS QArrayDataPointer(QArrayDataPointer &&other) noexcept : d(other.d) { @@ -95,7 +94,6 @@ public: this->swap(moved); return *this; } -#endif DataOps &operator*() const { diff --git a/src/corelib/tools/qbitarray.h b/src/corelib/tools/qbitarray.h index 78beff0d42..9b0e931aca 100644 --- a/src/corelib/tools/qbitarray.h +++ b/src/corelib/tools/qbitarray.h @@ -58,11 +58,9 @@ public: explicit QBitArray(int size, bool val = false); QBitArray(const QBitArray &other) : d(other.d) {} inline QBitArray &operator=(const QBitArray &other) { d = other.d; return *this; } -#ifdef Q_COMPILER_RVALUE_REFS inline QBitArray(QBitArray &&other) noexcept : d(std::move(other.d)) {} inline QBitArray &operator=(QBitArray &&other) noexcept { qSwap(d, other.d); return *this; } -#endif inline void swap(QBitArray &other) noexcept { qSwap(d, other.d); } diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h index 318d773eb6..14fcddce7c 100644 --- a/src/corelib/tools/qbytearray.h +++ b/src/corelib/tools/qbytearray.h @@ -177,11 +177,9 @@ public: QByteArray &operator=(const QByteArray &) noexcept; QByteArray &operator=(const char *str); -#ifdef Q_COMPILER_RVALUE_REFS inline QByteArray(QByteArray && other) noexcept : d(other.d) { other.d = Data::sharedNull(); } inline QByteArray &operator=(QByteArray &&other) noexcept { qSwap(d, other.d); return *this; } -#endif inline void swap(QByteArray &other) noexcept { qSwap(d, other.d); } diff --git a/src/corelib/tools/qcollator.h b/src/corelib/tools/qcollator.h index 6c76ef038f..96a5902526 100644 --- a/src/corelib/tools/qcollator.h +++ b/src/corelib/tools/qcollator.h @@ -57,10 +57,8 @@ public: QCollatorSortKey(const QCollatorSortKey &other); ~QCollatorSortKey(); QCollatorSortKey &operator=(const QCollatorSortKey &other); -#ifdef Q_COMPILER_RVALUE_REFS inline QCollatorSortKey &operator=(QCollatorSortKey &&other) noexcept { swap(other); return *this; } -#endif void swap(QCollatorSortKey &other) noexcept { d.swap(other.d); } @@ -87,12 +85,10 @@ public: QCollator(const QCollator &); ~QCollator(); QCollator &operator=(const QCollator &); -#ifdef Q_COMPILER_RVALUE_REFS QCollator(QCollator &&other) noexcept : d(other.d) { other.d = nullptr; } QCollator &operator=(QCollator &&other) noexcept { swap(other); return *this; } -#endif void swap(QCollator &other) noexcept { qSwap(d, other.d); } diff --git a/src/corelib/tools/qcommandlineoption.h b/src/corelib/tools/qcommandlineoption.h index 643427f6fb..e2ca64acef 100644 --- a/src/corelib/tools/qcommandlineoption.h +++ b/src/corelib/tools/qcommandlineoption.h @@ -71,9 +71,7 @@ public: ~QCommandLineOption(); QCommandLineOption &operator=(const QCommandLineOption &other); -#ifdef Q_COMPILER_RVALUE_REFS QCommandLineOption &operator=(QCommandLineOption &&other) noexcept { swap(other); return *this; } -#endif void swap(QCommandLineOption &other) noexcept { qSwap(d, other.d); } diff --git a/src/corelib/tools/qcontiguouscache.h b/src/corelib/tools/qcontiguouscache.h index fdb9c6d19a..433e3f9ea4 100644 --- a/src/corelib/tools/qcontiguouscache.h +++ b/src/corelib/tools/qcontiguouscache.h @@ -107,10 +107,8 @@ public: #endif QContiguousCache<T> &operator=(const QContiguousCache<T> &other); -#ifdef Q_COMPILER_RVALUE_REFS inline QContiguousCache<T> &operator=(QContiguousCache<T> &&other) { qSwap(d, other.d); return *this; } -#endif inline void swap(QContiguousCache<T> &other) { qSwap(d, other.d); } bool operator==(const QContiguousCache<T> &other) const; inline bool operator!=(const QContiguousCache<T> &other) const { return !(*this == other); } |