summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qglobal.h5
-rw-r--r--src/corelib/mimetypes/qmimetype_p.h19
-rw-r--r--src/corelib/tools/qdatetime.h2
-rw-r--r--src/corelib/tools/qeasingcurve.h2
-rw-r--r--src/corelib/tools/qhash.h4
-rw-r--r--src/corelib/tools/qlinkedlist.h2
-rw-r--r--src/corelib/tools/qlist.h2
-rw-r--r--src/corelib/tools/qlocale.h2
-rw-r--r--src/corelib/tools/qmap.h4
-rw-r--r--src/corelib/tools/qpair.h2
-rw-r--r--src/corelib/tools/qregexp.h2
-rw-r--r--src/corelib/tools/qregularexpression.h8
-rw-r--r--src/corelib/tools/qshareddata.h4
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h5
-rw-r--r--src/corelib/tools/qstring.h4
-rw-r--r--src/corelib/tools/qstringlist.h4
-rw-r--r--src/corelib/tools/qtimezone.h2
-rw-r--r--src/corelib/tools/qvector.h8
-rw-r--r--src/corelib/tools/qversionnumber.h4
-rw-r--r--src/dbus/qdbusargument.h2
-rw-r--r--src/dbus/qdbusconnection.h2
-rw-r--r--src/dbus/qdbuserror.h2
-rw-r--r--src/dbus/qdbusextratypes.h6
-rw-r--r--src/dbus/qdbusmessage.h2
-rw-r--r--src/dbus/qdbuspendingcall.h2
-rw-r--r--src/dbus/qdbusunixfiledescriptor.h6
-rw-r--r--src/gui/image/qicon.h4
-rw-r--r--src/gui/image/qimage.h4
-rw-r--r--src/gui/image/qpicture.h2
-rw-r--r--src/gui/image/qpixmap.h4
-rw-r--r--src/gui/image/qpixmapcache.h2
-rw-r--r--src/gui/kernel/qcursor.h2
-rw-r--r--src/gui/kernel/qevent.h2
-rw-r--r--src/gui/kernel/qkeysequence.h2
-rw-r--r--src/gui/kernel/qpalette.h2
-rw-r--r--src/gui/opengl/qopengldebug.h2
-rw-r--r--src/gui/opengl/qopenglpixeltransferoptions.h2
-rw-r--r--src/gui/painting/qbrush.h2
-rw-r--r--src/gui/painting/qcolor.h2
-rw-r--r--src/gui/painting/qpagelayout.h2
-rw-r--r--src/gui/painting/qpagesize.h2
-rw-r--r--src/gui/painting/qpainterpath.h2
-rw-r--r--src/gui/painting/qpen.h2
-rw-r--r--src/gui/painting/qpolygon.h8
-rw-r--r--src/gui/painting/qregion.h2
-rw-r--r--src/gui/text/qfont.h2
-rw-r--r--src/gui/text/qfontmetrics.h4
-rw-r--r--src/gui/text/qglyphrun.h2
-rw-r--r--src/gui/text/qrawfont.h2
-rw-r--r--src/gui/text/qstatictext.h2
-rw-r--r--src/gui/text/qtextcursor.h2
-rw-r--r--src/network/access/qabstractnetworkcache.h2
-rw-r--r--src/network/access/qhttpmultipart.h2
-rw-r--r--src/network/access/qnetworkcookie.h2
-rw-r--r--src/network/access/qnetworkrequest.h2
-rw-r--r--src/network/bearer/qnetworkconfiguration.h2
-rw-r--r--src/network/kernel/qdnslookup.h10
-rw-r--r--src/network/kernel/qhostaddress.h3
-rw-r--r--src/network/kernel/qnetworkinterface.h4
-rw-r--r--src/network/kernel/qnetworkproxy.h4
-rw-r--r--src/network/ssl/qsslcertificate.h2
-rw-r--r--src/network/ssl/qsslcertificateextension.h2
-rw-r--r--src/network/ssl/qsslcipher.h2
-rw-r--r--src/network/ssl/qsslconfiguration.h2
-rw-r--r--src/network/ssl/qsslerror.h2
-rw-r--r--src/network/ssl/qsslpresharedkeyauthenticator.h2
-rw-r--r--src/printsupport/kernel/qprintdevice_p.h2
67 files changed, 2 insertions, 214 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 3c17bbb2d4..ceae0583ee 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -509,11 +509,8 @@ namespace QtPrivate {
template <class T> struct AlignOf : AlignOf_Default<T> { };
template <class T> struct AlignOf<T &> : AlignOf<T> {};
- template <size_t N, class T> struct AlignOf<T[N]> : AlignOf<T> {};
-
-#ifdef Q_COMPILER_RVALUE_REFS
template <class T> struct AlignOf<T &&> : AlignOf<T> {};
-#endif
+ template <size_t N, class T> struct AlignOf<T[N]> : AlignOf<T> {};
#if defined(Q_PROCESSOR_X86_32) && !defined(Q_OS_WIN)
template <class T> struct AlignOf_WorkaroundForI386Abi { enum { Value = sizeof(T) }; };
diff --git a/src/corelib/mimetypes/qmimetype_p.h b/src/corelib/mimetypes/qmimetype_p.h
index 2918309ad7..0d6b4b4b12 100644
--- a/src/corelib/mimetypes/qmimetype_p.h
+++ b/src/corelib/mimetypes/qmimetype_p.h
@@ -84,25 +84,6 @@ public:
QT_END_NAMESPACE
-#define QMIMETYPE_BUILDER \
- QT_BEGIN_NAMESPACE \
- static QMimeType buildQMimeType ( \
- const QString &name, \
- const QString &genericIconName, \
- const QString &iconName, \
- const QStringList &globPatterns \
- ) \
- { \
- QMimeTypePrivate qMimeTypeData; \
- qMimeTypeData.name = name; \
- qMimeTypeData.loaded = true; \
- qMimeTypeData.genericIconName = genericIconName; \
- qMimeTypeData.iconName = iconName; \
- qMimeTypeData.globPatterns = globPatterns; \
- return QMimeType(qMimeTypeData); \
- } \
- QT_END_NAMESPACE
-
#define QMIMETYPE_BUILDER_FROM_RVALUE_REFS \
QT_BEGIN_NAMESPACE \
static QMimeType buildQMimeType ( \
diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h
index 8873651f17..79fd25d762 100644
--- a/src/corelib/tools/qdatetime.h
+++ b/src/corelib/tools/qdatetime.h
@@ -278,9 +278,7 @@ public:
QDateTime(QDateTime &&other) noexcept;
~QDateTime();
-#ifdef Q_COMPILER_RVALUE_REFS
QDateTime &operator=(QDateTime &&other) noexcept { swap(other); return *this; }
-#endif
QDateTime &operator=(const QDateTime &other) noexcept;
void swap(QDateTime &other) noexcept { qSwap(d.d, other.d.d); }
diff --git a/src/corelib/tools/qeasingcurve.h b/src/corelib/tools/qeasingcurve.h
index 1791f19199..725ddd5dcc 100644
--- a/src/corelib/tools/qeasingcurve.h
+++ b/src/corelib/tools/qeasingcurve.h
@@ -80,11 +80,9 @@ public:
QEasingCurve &operator=(const QEasingCurve &other)
{ if ( this != &other ) { QEasingCurve copy(other); swap(copy); } return *this; }
-#ifdef Q_COMPILER_RVALUE_REFS
QEasingCurve(QEasingCurve &&other) noexcept : d_ptr(other.d_ptr) { other.d_ptr = nullptr; }
QEasingCurve &operator=(QEasingCurve &&other) noexcept
{ qSwap(d_ptr, other.d_ptr); return *this; }
-#endif
void swap(QEasingCurve &other) noexcept { qSwap(d_ptr, other.d_ptr); }
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index a757e85386..0078bbbee9 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -255,11 +255,9 @@ public:
~QHash() { if (!d->ref.deref()) freeData(d); }
QHash &operator=(const QHash &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QHash(QHash &&other) noexcept : d(other.d) { other.d = const_cast<QHashData *>(&QHashData::shared_null); }
QHash &operator=(QHash &&other) noexcept
{ QHash moved(std::move(other)); swap(moved); return *this; }
-#endif
#ifdef Q_QDOC
template <typename InputIterator>
QHash(InputIterator f, InputIterator l);
@@ -1076,9 +1074,7 @@ public:
// compiler-generated destructor is fine!
QMultiHash(const QHash<Key, T> &other) : QHash<Key, T>(other) {}
-#ifdef Q_COMPILER_RVALUE_REFS
QMultiHash(QHash<Key, T> &&other) noexcept : QHash<Key, T>(std::move(other)) {}
-#endif
void swap(QMultiHash &other) noexcept { QHash<Key, T>::swap(other); } // prevent QMultiHash<->QHash swaps
inline typename QHash<Key, T>::iterator replace(const Key &key, const T &value)
diff --git a/src/corelib/tools/qlinkedlist.h b/src/corelib/tools/qlinkedlist.h
index 83f70deceb..0c8a99e258 100644
--- a/src/corelib/tools/qlinkedlist.h
+++ b/src/corelib/tools/qlinkedlist.h
@@ -95,12 +95,10 @@ public:
}
~QLinkedList();
QLinkedList<T> &operator=(const QLinkedList<T> &);
-#ifdef Q_COMPILER_RVALUE_REFS
QLinkedList(QLinkedList<T> &&other) noexcept
: d(other.d) { other.d = const_cast<QLinkedListData *>(&QLinkedListData::shared_null); }
QLinkedList<T> &operator=(QLinkedList<T> &&other) noexcept
{ QLinkedList moved(std::move(other)); swap(moved); return *this; }
-#endif
inline void swap(QLinkedList<T> &other) noexcept { qSwap(d, other.d); }
bool operator==(const QLinkedList<T> &l) const;
inline bool operator!=(const QLinkedList<T> &l) const { return !(*this == l); }
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index 48a71b0ecf..59578b1e61 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -161,12 +161,10 @@ public:
QList(const QList<T> &l);
~QList();
QList<T> &operator=(const QList<T> &l);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QList(QList<T> &&other) noexcept
: d(other.d) { other.d = const_cast<QListData::Data *>(&QListData::shared_null); }
inline QList &operator=(QList<T> &&other) noexcept
{ QList moved(std::move(other)); swap(moved); return *this; }
-#endif
inline void swap(QList<T> &other) noexcept { qSwap(d, other.d); }
#ifdef Q_COMPILER_INITIALIZER_LISTS
inline QList(std::initializer_list<T> args)
diff --git a/src/corelib/tools/qlocale.h b/src/corelib/tools/qlocale.h
index 3dc5ee0a01..977c4c6c9c 100644
--- a/src/corelib/tools/qlocale.h
+++ b/src/corelib/tools/qlocale.h
@@ -939,9 +939,7 @@ public:
QLocale(Language language, Country country = AnyCountry);
QLocale(Language language, Script script, Country country);
QLocale(const QLocale &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QLocale &operator=(QLocale &&other) noexcept { swap(other); return *this; }
-#endif
QLocale &operator=(const QLocale &other);
~QLocale();
diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h
index 103124f4ad..3b8aad9a33 100644
--- a/src/corelib/tools/qmap.h
+++ b/src/corelib/tools/qmap.h
@@ -339,7 +339,6 @@ public:
inline ~QMap() { if (!d->ref.deref()) d->destroy(); }
QMap<Key, T> &operator=(const QMap<Key, T> &other);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QMap(QMap<Key, T> &&other) noexcept
: d(other.d)
{
@@ -349,7 +348,6 @@ public:
inline QMap<Key, T> &operator=(QMap<Key, T> &&other) noexcept
{ QMap moved(std::move(other)); swap(moved); return *this; }
-#endif
inline void swap(QMap<Key, T> &other) noexcept { qSwap(d, other.d); }
explicit QMap(const typename std::map<Key, T> &other);
std::map<Key, T> toStdMap() const;
@@ -1196,9 +1194,7 @@ public:
}
#endif
QMultiMap(const QMap<Key, T> &other) : QMap<Key, T>(other) {}
-#ifdef Q_COMPILER_RVALUE_REFS
QMultiMap(QMap<Key, T> &&other) noexcept : QMap<Key, T>(std::move(other)) {}
-#endif
void swap(QMultiMap<Key, T> &other) noexcept { QMap<Key, T>::swap(other); }
inline typename QMap<Key, T>::iterator replace(const Key &key, const T &value)
diff --git a/src/corelib/tools/qpair.h b/src/corelib/tools/qpair.h
index 6d1e67efb7..9ebf88bc8f 100644
--- a/src/corelib/tools/qpair.h
+++ b/src/corelib/tools/qpair.h
@@ -71,7 +71,6 @@ struct QPair
noexcept((std::is_nothrow_assignable<T1, TT1&>::value &&
std::is_nothrow_assignable<T2, TT2&>::value))
{ first = p.first; second = p.second; return *this; }
-#ifdef Q_COMPILER_RVALUE_REFS
template <typename TT1, typename TT2>
Q_DECL_CONSTEXPR QPair(QPair<TT1, TT2> &&p)
noexcept((std::is_nothrow_constructible<T1, TT1>::value &&
@@ -83,7 +82,6 @@ struct QPair
noexcept((std::is_nothrow_assignable<T1, TT1>::value &&
std::is_nothrow_assignable<T2, TT2>::value))
{ first = std::move(p.first); second = std::move(p.second); return *this; }
-#endif
Q_DECL_RELAXED_CONSTEXPR void swap(QPair &other)
noexcept(noexcept(qSwap(other.first, other.first)) && noexcept(qSwap(other.second, other.second)))
diff --git a/src/corelib/tools/qregexp.h b/src/corelib/tools/qregexp.h
index c043a06496..8f6de24c74 100644
--- a/src/corelib/tools/qregexp.h
+++ b/src/corelib/tools/qregexp.h
@@ -73,9 +73,7 @@ public:
QRegExp(const QRegExp &rx);
~QRegExp();
QRegExp &operator=(const QRegExp &rx);
-#ifdef Q_COMPILER_RVALUE_REFS
QRegExp &operator=(QRegExp &&other) noexcept { swap(other); return *this; }
-#endif
void swap(QRegExp &other) noexcept { qSwap(priv, other.priv); }
bool operator==(const QRegExp &rx) const;
diff --git a/src/corelib/tools/qregularexpression.h b/src/corelib/tools/qregularexpression.h
index f16b7e91be..f799a38ae4 100644
--- a/src/corelib/tools/qregularexpression.h
+++ b/src/corelib/tools/qregularexpression.h
@@ -86,11 +86,8 @@ public:
QRegularExpression(const QRegularExpression &re);
~QRegularExpression();
QRegularExpression &operator=(const QRegularExpression &re);
-
-#ifdef Q_COMPILER_RVALUE_REFS
QRegularExpression &operator=(QRegularExpression &&re) noexcept
{ d.swap(re.d); return *this; }
-#endif
void swap(QRegularExpression &other) noexcept { d.swap(other.d); }
@@ -186,11 +183,8 @@ public:
~QRegularExpressionMatch();
QRegularExpressionMatch(const QRegularExpressionMatch &match);
QRegularExpressionMatch &operator=(const QRegularExpressionMatch &match);
-
-#ifdef Q_COMPILER_RVALUE_REFS
QRegularExpressionMatch &operator=(QRegularExpressionMatch &&match) noexcept
{ d.swap(match.d); return *this; }
-#endif
void swap(QRegularExpressionMatch &other) noexcept { d.swap(other.d); }
QRegularExpression regularExpression() const;
@@ -257,10 +251,8 @@ public:
~QRegularExpressionMatchIterator();
QRegularExpressionMatchIterator(const QRegularExpressionMatchIterator &iterator);
QRegularExpressionMatchIterator &operator=(const QRegularExpressionMatchIterator &iterator);
-#ifdef Q_COMPILER_RVALUE_REFS
QRegularExpressionMatchIterator &operator=(QRegularExpressionMatchIterator &&iterator) noexcept
{ d.swap(iterator.d); return *this; }
-#endif
void swap(QRegularExpressionMatchIterator &other) noexcept { d.swap(other.d); }
bool isValid() const;
diff --git a/src/corelib/tools/qshareddata.h b/src/corelib/tools/qshareddata.h
index cbaa1aa3c4..04051472d6 100644
--- a/src/corelib/tools/qshareddata.h
+++ b/src/corelib/tools/qshareddata.h
@@ -112,7 +112,6 @@ public:
}
return *this;
}
-#ifdef Q_COMPILER_RVALUE_REFS
QSharedDataPointer(QSharedDataPointer &&o) noexcept : d(o.d) { o.d = nullptr; }
inline QSharedDataPointer<T> &operator=(QSharedDataPointer<T> &&other) noexcept
{
@@ -120,7 +119,6 @@ public:
swap(moved);
return *this;
}
-#endif
inline bool operator!() const { return !d; }
@@ -218,7 +216,6 @@ public:
}
return *this;
}
-#ifdef Q_COMPILER_RVALUE_REFS
inline QExplicitlySharedDataPointer(QExplicitlySharedDataPointer &&o) noexcept : d(o.d) { o.d = nullptr; }
inline QExplicitlySharedDataPointer<T> &operator=(QExplicitlySharedDataPointer<T> &&other) noexcept
{
@@ -226,7 +223,6 @@ public:
swap(moved);
return *this;
}
-#endif
inline bool operator!() const { return !d; }
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index 0851121ff2..9fb452da6b 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -337,7 +337,6 @@ public:
swap(copy);
return *this;
}
-#ifdef Q_COMPILER_RVALUE_REFS
QSharedPointer(QSharedPointer &&other) noexcept
: value(other.value), d(other.d)
{
@@ -367,8 +366,6 @@ public:
return *this;
}
-#endif
-
template <class X>
QSharedPointer(const QSharedPointer<X> &other) noexcept : value(other.value), d(other.d)
{ if (d) ref(); }
@@ -590,7 +587,6 @@ public:
QWeakPointer(const QWeakPointer &other) noexcept : d(other.d), value(other.value)
{ if (d) d->weakref.ref(); }
-#ifdef Q_COMPILER_RVALUE_REFS
QWeakPointer(QWeakPointer &&other) noexcept
: d(other.d), value(other.value)
{
@@ -599,7 +595,6 @@ public:
}
QWeakPointer &operator=(QWeakPointer &&other) noexcept
{ QWeakPointer moved(std::move(other)); swap(moved); return *this; }
-#endif
QWeakPointer &operator=(const QWeakPointer &other) noexcept
{
QWeakPointer copy(other);
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index a526a6537a..e4798eb51b 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -230,11 +230,9 @@ public:
QString &operator=(QChar c);
QString &operator=(const QString &) noexcept;
QString &operator=(QLatin1String latin1);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QString(QString && other) noexcept : d(other.d) { other.d = Data::sharedNull(); }
inline QString &operator=(QString &&other) noexcept
{ qSwap(d, other.d); return *this; }
-#endif
inline void swap(QString &other) noexcept { qSwap(d, other.d); }
inline int size() const { return d->size; }
inline int count() const { return d->size; }
@@ -1437,10 +1435,8 @@ public:
QStringRef(const QStringRef &other) noexcept
:m_string(other.m_string), m_position(other.m_position), m_size(other.m_size)
{}
-#ifdef Q_COMPILER_RVALUE_REFS
QStringRef(QStringRef &&other) noexcept : m_string(other.m_string), m_position(other.m_position), m_size(other.m_size) {}
QStringRef &operator=(QStringRef &&other) noexcept { return *this = other; }
-#endif
QStringRef &operator=(const QStringRef &other) noexcept
{
m_string = other.m_string; m_position = other.m_position;
diff --git a/src/corelib/tools/qstringlist.h b/src/corelib/tools/qstringlist.h
index 5ad01a0658..73ac737643 100644
--- a/src/corelib/tools/qstringlist.h
+++ b/src/corelib/tools/qstringlist.h
@@ -104,9 +104,7 @@ public:
inline QStringList() noexcept { }
inline explicit QStringList(const QString &i) { append(i); }
inline QStringList(const QList<QString> &l) : QList<QString>(l) { }
-#ifdef Q_COMPILER_RVALUE_REFS
inline QStringList(QList<QString> &&l) noexcept : QList<QString>(std::move(l)) { }
-#endif
#ifdef Q_COMPILER_INITIALIZER_LISTS
inline QStringList(std::initializer_list<QString> args) : QList<QString>(args) { }
#endif
@@ -116,10 +114,8 @@ public:
QStringList &operator=(const QList<QString> &other)
{ QList<QString>::operator=(other); return *this; }
-#ifdef Q_COMPILER_RVALUE_REFS
QStringList &operator=(QList<QString> &&other) noexcept
{ QList<QString>::operator=(std::move(other)); return *this; }
-#endif
#if QT_STRINGVIEW_LEVEL < 2
inline bool contains(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
diff --git a/src/corelib/tools/qtimezone.h b/src/corelib/tools/qtimezone.h
index ca98986ec1..62ecee49bb 100644
--- a/src/corelib/tools/qtimezone.h
+++ b/src/corelib/tools/qtimezone.h
@@ -99,9 +99,7 @@ public:
~QTimeZone();
QTimeZone &operator=(const QTimeZone &other);
- #ifdef Q_COMPILER_RVALUE_REFS
QTimeZone &operator=(QTimeZone &&other) noexcept { swap(other); return *this; }
-#endif
void swap(QTimeZone &other) noexcept
{ d.swap(other.d); }
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index 6cbf794c6c..7e14a0c9b2 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -72,11 +72,9 @@ public:
inline QVector(const QVector<T> &v);
inline ~QVector() { if (!d->ref.deref()) freeData(d); }
QVector<T> &operator=(const QVector<T> &v);
-#if defined(Q_COMPILER_RVALUE_REFS) || defined(Q_CLANG_QDOC)
QVector(QVector<T> &&other) noexcept : d(other.d) { other.d = Data::sharedNull(); }
QVector<T> &operator=(QVector<T> &&other) noexcept
{ QVector moved(std::move(other)); swap(moved); return *this; }
-#endif
void swap(QVector<T> &other) noexcept { qSwap(d, other.d); }
#ifdef Q_COMPILER_INITIALIZER_LISTS
inline QVector(std::initializer_list<T> args);
@@ -143,9 +141,7 @@ public:
T &operator[](int i);
const T &operator[](int i) const;
void append(const T &t);
-#if defined(Q_COMPILER_RVALUE_REFS) || defined(Q_CLANG_QDOC)
void append(T &&t);
-#endif
inline void append(const QVector<T> &l) { *this += l; }
void prepend(T &&t);
void prepend(const T &t);
@@ -268,10 +264,8 @@ public:
typedef const_iterator ConstIterator;
typedef int size_type;
inline void push_back(const T &t) { append(t); }
-#if defined(Q_COMPILER_RVALUE_REFS) || defined(Q_CLANG_QDOC)
void push_back(T &&t) { append(std::move(t)); }
void push_front(T &&t) { prepend(std::move(t)); }
-#endif
inline void push_front(const T &t) { prepend(t); }
void pop_back() { removeLast(); }
void pop_front() { removeFirst(); }
@@ -799,7 +793,6 @@ void QVector<T>::append(const T &t)
++d->size;
}
-#ifdef Q_COMPILER_RVALUE_REFS
template <typename T>
void QVector<T>::append(T &&t)
{
@@ -813,7 +806,6 @@ void QVector<T>::append(T &&t)
++d->size;
}
-#endif
template <typename T>
void QVector<T>::removeLast()
diff --git a/src/corelib/tools/qversionnumber.h b/src/corelib/tools/qversionnumber.h
index d51947c091..1488014d38 100644
--- a/src/corelib/tools/qversionnumber.h
+++ b/src/corelib/tools/qversionnumber.h
@@ -119,7 +119,6 @@ class QVersionNumber
return *this;
}
-#ifdef Q_COMPILER_RVALUE_REFS
SegmentStorage(SegmentStorage &&other) noexcept
: dummy(other.dummy)
{
@@ -139,7 +138,6 @@ class QVersionNumber
else
pointer_segments = new QVector<int>(std::move(seg));
}
-#endif
#ifdef Q_COMPILER_INITIALIZER_LISTS
SegmentStorage(std::initializer_list<int> args)
{
@@ -227,11 +225,9 @@ public:
// compiler-generated copy/move ctor/assignment operators and the destructor are ok
-#ifdef Q_COMPILER_RVALUE_REFS
explicit QVersionNumber(QVector<int> &&seg)
: m_segments(std::move(seg))
{}
-#endif
#ifdef Q_COMPILER_INITIALIZER_LISTS
inline QVersionNumber(std::initializer_list<int> args)
diff --git a/src/dbus/qdbusargument.h b/src/dbus/qdbusargument.h
index 7f4bd269a9..b7cd4c8989 100644
--- a/src/dbus/qdbusargument.h
+++ b/src/dbus/qdbusargument.h
@@ -76,10 +76,8 @@ public:
QDBusArgument();
QDBusArgument(const QDBusArgument &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QDBusArgument(QDBusArgument &&other) noexcept : d(other.d) { other.d = nullptr; }
QDBusArgument &operator=(QDBusArgument &&other) noexcept { swap(other); return *this; }
-#endif
QDBusArgument &operator=(const QDBusArgument &other);
~QDBusArgument();
diff --git a/src/dbus/qdbusconnection.h b/src/dbus/qdbusconnection.h
index a880a7a939..368f811602 100644
--- a/src/dbus/qdbusconnection.h
+++ b/src/dbus/qdbusconnection.h
@@ -131,10 +131,8 @@ public:
explicit QDBusConnection(const QString &name);
QDBusConnection(const QDBusConnection &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QDBusConnection(QDBusConnection &&other) noexcept : d(other.d) { other.d = nullptr; }
QDBusConnection &operator=(QDBusConnection &&other) noexcept { swap(other); return *this; }
-#endif
QDBusConnection &operator=(const QDBusConnection &other);
~QDBusConnection();
diff --git a/src/dbus/qdbuserror.h b/src/dbus/qdbuserror.h
index 5a68a417c4..bcf68dbcdc 100644
--- a/src/dbus/qdbuserror.h
+++ b/src/dbus/qdbuserror.h
@@ -98,12 +98,10 @@ public:
#endif
QDBusError(ErrorType error, const QString &message);
QDBusError(const QDBusError &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QDBusError(QDBusError &&other) noexcept
: code(other.code), msg(std::move(other.msg)), nm(std::move(other.nm))
{}
QDBusError &operator=(QDBusError &&other) noexcept { swap(other); return *this; }
-#endif
QDBusError &operator=(const QDBusError &other);
#ifndef QT_BOOTSTRAPPED
QDBusError &operator=(const QDBusMessage &msg);
diff --git a/src/dbus/qdbusextratypes.h b/src/dbus/qdbusextratypes.h
index e2430ad6f2..fdac917947 100644
--- a/src/dbus/qdbusextratypes.h
+++ b/src/dbus/qdbusextratypes.h
@@ -66,9 +66,7 @@ public:
inline explicit QDBusObjectPath(const char *path);
inline explicit QDBusObjectPath(QLatin1String path);
inline explicit QDBusObjectPath(const QString &path);
-#ifdef Q_COMPILER_RVALUE_REFS
explicit QDBusObjectPath(QString &&p) : m_path(std::move(p)) { doCheck(); }
-#endif
void swap(QDBusObjectPath &other) noexcept { qSwap(m_path, other.m_path); }
@@ -121,9 +119,7 @@ public:
inline explicit QDBusSignature(const char *signature);
inline explicit QDBusSignature(QLatin1String signature);
inline explicit QDBusSignature(const QString &signature);
-#ifdef Q_COMPILER_RVALUE_REFS
explicit QDBusSignature(QString &&sig) : m_signature(std::move(sig)) { doCheck(); }
-#endif
void swap(QDBusSignature &other) noexcept { qSwap(m_signature, other.m_signature); }
@@ -173,9 +169,7 @@ public:
// compiler-generated destructor is ok!
inline explicit QDBusVariant(const QVariant &variant);
-#ifdef Q_COMPILER_RVALUE_REFS
explicit QDBusVariant(QVariant &&v) noexcept : m_variant(std::move(v)) {}
-#endif
void swap(QDBusVariant &other) noexcept { qSwap(m_variant, other.m_variant); }
diff --git a/src/dbus/qdbusmessage.h b/src/dbus/qdbusmessage.h
index 3e73db70de..41845317c4 100644
--- a/src/dbus/qdbusmessage.h
+++ b/src/dbus/qdbusmessage.h
@@ -68,9 +68,7 @@ public:
QDBusMessage();
QDBusMessage(const QDBusMessage &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QDBusMessage &operator=(QDBusMessage &&other) noexcept { swap(other); return *this; }
-#endif
QDBusMessage &operator=(const QDBusMessage &other);
~QDBusMessage();
diff --git a/src/dbus/qdbuspendingcall.h b/src/dbus/qdbuspendingcall.h
index c521b7d163..dd99346301 100644
--- a/src/dbus/qdbuspendingcall.h
+++ b/src/dbus/qdbuspendingcall.h
@@ -60,9 +60,7 @@ class Q_DBUS_EXPORT QDBusPendingCall
public:
QDBusPendingCall(const QDBusPendingCall &other);
~QDBusPendingCall();
-#ifdef Q_COMPILER_RVALUE_REFS
QDBusPendingCall &operator=(QDBusPendingCall &&other) noexcept { swap(other); return *this; }
-#endif
QDBusPendingCall &operator=(const QDBusPendingCall &other);
void swap(QDBusPendingCall &other) noexcept { qSwap(d, other.d); }
diff --git a/src/dbus/qdbusunixfiledescriptor.h b/src/dbus/qdbusunixfiledescriptor.h
index 6b264a6b86..fcd73b2ec5 100644
--- a/src/dbus/qdbusunixfiledescriptor.h
+++ b/src/dbus/qdbusunixfiledescriptor.h
@@ -46,9 +46,7 @@
#ifndef QT_NO_DBUS
-#ifdef Q_COMPILER_RVALUE_REFS
-# include <utility>
-#endif
+#include <utility>
QT_BEGIN_NAMESPACE
@@ -61,9 +59,7 @@ public:
QDBusUnixFileDescriptor();
explicit QDBusUnixFileDescriptor(int fileDescriptor);
QDBusUnixFileDescriptor(const QDBusUnixFileDescriptor &other);
-#if defined(Q_COMPILER_RVALUE_REFS)
QDBusUnixFileDescriptor &operator=(QDBusUnixFileDescriptor &&other) noexcept { swap(other); return *this; }
-#endif
QDBusUnixFileDescriptor &operator=(const QDBusUnixFileDescriptor &other);
~QDBusUnixFileDescriptor();
diff --git a/src/gui/image/qicon.h b/src/gui/image/qicon.h
index 0f834fc2cb..735a3e134d 100644
--- a/src/gui/image/qicon.h
+++ b/src/gui/image/qicon.h
@@ -61,19 +61,15 @@ public:
QIcon() noexcept;
QIcon(const QPixmap &pixmap);
QIcon(const QIcon &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QIcon(QIcon &&other) noexcept
: d(other.d)
{ other.d = nullptr; }
-#endif
explicit QIcon(const QString &fileName); // file or resource name
explicit QIcon(QIconEngine *engine);
~QIcon();
QIcon &operator=(const QIcon &other);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QIcon &operator=(QIcon &&other) noexcept
{ swap(other); return *this; }
-#endif
inline void swap(QIcon &other) noexcept
{ qSwap(d, other.d); }
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h
index 9d177142d9..7c68168be8 100644
--- a/src/gui/image/qimage.h
+++ b/src/gui/image/qimage.h
@@ -151,18 +151,14 @@ public:
explicit QImage(const QString &fileName, const char *format = nullptr);
QImage(const QImage &);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QImage(QImage &&other) noexcept
: QPaintDevice(), d(nullptr)
{ qSwap(d, other.d); }
-#endif
~QImage();
QImage &operator=(const QImage &);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QImage &operator=(QImage &&other) noexcept
{ qSwap(d, other.d); return *this; }
-#endif
inline void swap(QImage &other) noexcept
{ qSwap(d, other.d); }
diff --git a/src/gui/image/qpicture.h b/src/gui/image/qpicture.h
index cac2ef5dfc..189e57b9a3 100644
--- a/src/gui/image/qpicture.h
+++ b/src/gui/image/qpicture.h
@@ -78,10 +78,8 @@ public:
void setBoundingRect(const QRect &r);
QPicture& operator=(const QPicture &p);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QPicture &operator=(QPicture &&other) noexcept
{ qSwap(d_ptr, other.d_ptr); return *this; }
-#endif
inline void swap(QPicture &other) noexcept
{ d_ptr.swap(other.d_ptr); }
void detach();
diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h
index 2103fcc58c..8c1395857e 100644
--- a/src/gui/image/qpixmap.h
+++ b/src/gui/image/qpixmap.h
@@ -73,10 +73,8 @@ public:
~QPixmap();
QPixmap &operator=(const QPixmap &);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QPixmap &operator=(QPixmap &&other) noexcept
{ qSwap(data, other.data); return *this; }
-#endif
inline void swap(QPixmap &other) noexcept
{ qSwap(data, other.data); }
@@ -139,12 +137,10 @@ public:
QImage toImage() const;
static QPixmap fromImage(const QImage &image, Qt::ImageConversionFlags flags = Qt::AutoColor);
static QPixmap fromImageReader(QImageReader *imageReader, Qt::ImageConversionFlags flags = Qt::AutoColor);
-#ifdef Q_COMPILER_RVALUE_REFS
static QPixmap fromImage(QImage &&image, Qt::ImageConversionFlags flags = Qt::AutoColor)
{
return fromImageInPlace(image, flags);
}
-#endif
bool load(const QString& fileName, const char *format = nullptr, Qt::ImageConversionFlags flags = Qt::AutoColor);
bool loadFromData(const uchar *buf, uint len, const char* format = nullptr, Qt::ImageConversionFlags flags = Qt::AutoColor);
diff --git a/src/gui/image/qpixmapcache.h b/src/gui/image/qpixmapcache.h
index c5bedb27ab..55af35a5d9 100644
--- a/src/gui/image/qpixmapcache.h
+++ b/src/gui/image/qpixmapcache.h
@@ -55,10 +55,8 @@ public:
public:
Key();
Key(const Key &other);
-#ifdef Q_COMPILER_RVALUE_REFS
Key(Key &&other) noexcept : d(other.d) { other.d = nullptr; }
Key &operator =(Key &&other) noexcept { swap(other); return *this; }
-#endif
~Key();
bool operator ==(const Key &key) const;
inline bool operator !=(const Key &key) const
diff --git a/src/gui/kernel/qcursor.h b/src/gui/kernel/qcursor.h
index ced166dc29..7966e35840 100644
--- a/src/gui/kernel/qcursor.h
+++ b/src/gui/kernel/qcursor.h
@@ -86,11 +86,9 @@ public:
QCursor(const QCursor &cursor);
~QCursor();
QCursor &operator=(const QCursor &cursor);
-#ifdef Q_COMPILER_RVALUE_REFS
QCursor(QCursor &&other) noexcept : d(other.d) { other.d = nullptr; }
inline QCursor &operator=(QCursor &&other) noexcept
{ swap(other); return *this; }
-#endif
void swap(QCursor &other) noexcept { qSwap(d, other.d); }
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index aeefb53819..eb0a6208a9 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -855,13 +855,11 @@ public:
explicit TouchPoint(int id = -1);
TouchPoint(const TouchPoint &other);
-#ifdef Q_COMPILER_RVALUE_REFS
TouchPoint(TouchPoint &&other) noexcept
: d(nullptr)
{ qSwap(d, other.d); }
TouchPoint &operator=(TouchPoint &&other) noexcept
{ qSwap(d, other.d); return *this; }
-#endif
~TouchPoint();
TouchPoint &operator=(const TouchPoint &other)
diff --git a/src/gui/kernel/qkeysequence.h b/src/gui/kernel/qkeysequence.h
index 5630bdda58..3dcbbe5941 100644
--- a/src/gui/kernel/qkeysequence.h
+++ b/src/gui/kernel/qkeysequence.h
@@ -186,9 +186,7 @@ public:
operator QVariant() const;
int operator[](uint i) const;
QKeySequence &operator=(const QKeySequence &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QKeySequence &operator=(QKeySequence &&other) noexcept { swap(other); return *this; }
-#endif
void swap(QKeySequence &other) noexcept { qSwap(d, other.d); }
bool operator==(const QKeySequence &other) const;
diff --git a/src/gui/kernel/qpalette.h b/src/gui/kernel/qpalette.h
index a463245d4d..d3a840d9ad 100644
--- a/src/gui/kernel/qpalette.h
+++ b/src/gui/kernel/qpalette.h
@@ -67,7 +67,6 @@ public:
QPalette(const QPalette &palette);
~QPalette();
QPalette &operator=(const QPalette &palette);
-#ifdef Q_COMPILER_RVALUE_REFS
QPalette(QPalette &&other) noexcept
: d(other.d), data(other.data)
{ other.d = nullptr; }
@@ -76,7 +75,6 @@ public:
for_faster_swapping_dont_use = other.for_faster_swapping_dont_use;
qSwap(d, other.d); return *this;
}
-#endif
void swap(QPalette &other) noexcept
{
diff --git a/src/gui/opengl/qopengldebug.h b/src/gui/opengl/qopengldebug.h
index 1ba3ef91ac..7363985d60 100644
--- a/src/gui/opengl/qopengldebug.h
+++ b/src/gui/opengl/qopengldebug.h
@@ -110,9 +110,7 @@ public:
QOpenGLDebugMessage(const QOpenGLDebugMessage &debugMessage);
QOpenGLDebugMessage &operator=(const QOpenGLDebugMessage &debugMessage);
-#ifdef Q_COMPILER_RVALUE_REFS
QOpenGLDebugMessage &operator=(QOpenGLDebugMessage &&other) noexcept { swap(other); return *this; }
-#endif
~QOpenGLDebugMessage();
void swap(QOpenGLDebugMessage &other) noexcept { qSwap(d, other.d); }
diff --git a/src/gui/opengl/qopenglpixeltransferoptions.h b/src/gui/opengl/qopenglpixeltransferoptions.h
index be60e66e71..195543ae90 100644
--- a/src/gui/opengl/qopenglpixeltransferoptions.h
+++ b/src/gui/opengl/qopenglpixeltransferoptions.h
@@ -55,10 +55,8 @@ class Q_GUI_EXPORT QOpenGLPixelTransferOptions
public:
QOpenGLPixelTransferOptions();
QOpenGLPixelTransferOptions(const QOpenGLPixelTransferOptions &);
-#ifdef Q_COMPILER_RVALUE_REFS
QOpenGLPixelTransferOptions &operator=(QOpenGLPixelTransferOptions &&other) noexcept
{ swap(other); return *this; }
-#endif
QOpenGLPixelTransferOptions &operator=(const QOpenGLPixelTransferOptions &);
~QOpenGLPixelTransferOptions();
diff --git a/src/gui/painting/qbrush.h b/src/gui/painting/qbrush.h
index 27d710eca6..ef8f7a18de 100644
--- a/src/gui/painting/qbrush.h
+++ b/src/gui/painting/qbrush.h
@@ -79,10 +79,8 @@ public:
~QBrush();
QBrush &operator=(const QBrush &brush);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QBrush &operator=(QBrush &&other) noexcept
{ qSwap(d, other.d); return *this; }
-#endif
inline void swap(QBrush &other) noexcept
{ qSwap(d, other.d); }
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index 77b2d43c40..e3c267f97d 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -82,11 +82,9 @@ public:
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
inline QColor(const QColor &color) noexcept; // ### Qt 6: remove all of these, the trivial ones are fine.
-# ifdef Q_COMPILER_RVALUE_REFS
QColor(QColor &&other) noexcept : cspec(other.cspec), ct(other.ct) {}
QColor &operator=(QColor &&other) noexcept
{ cspec = other.cspec; ct = other.ct; return *this; }
-# endif
QColor &operator=(const QColor &) noexcept;
#endif // Qt < 6
diff --git a/src/gui/painting/qpagelayout.h b/src/gui/painting/qpagelayout.h
index faf0827c1a..7ee0ce7a76 100644
--- a/src/gui/painting/qpagelayout.h
+++ b/src/gui/painting/qpagelayout.h
@@ -82,9 +82,7 @@ public:
const QMarginsF &margins, Unit units = Point,
const QMarginsF &minMargins = QMarginsF(0, 0, 0, 0));
QPageLayout(const QPageLayout &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QPageLayout &operator=(QPageLayout &&other) noexcept { swap(other); return *this; }
-#endif
QPageLayout &operator=(const QPageLayout &other);
~QPageLayout();
diff --git a/src/gui/painting/qpagesize.h b/src/gui/painting/qpagesize.h
index a2ea691677..133274760f 100644
--- a/src/gui/painting/qpagesize.h
+++ b/src/gui/painting/qpagesize.h
@@ -236,9 +236,7 @@ public:
const QString &name = QString(),
SizeMatchPolicy matchPolicy = FuzzyMatch);
QPageSize(const QPageSize &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QPageSize &operator=(QPageSize &&other) noexcept { swap(other); return *this; }
-#endif
QPageSize &operator=(const QPageSize &other);
~QPageSize();
diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h
index 2785669260..ed5be667b7 100644
--- a/src/gui/painting/qpainterpath.h
+++ b/src/gui/painting/qpainterpath.h
@@ -92,10 +92,8 @@ public:
explicit QPainterPath(const QPointF &startPoint);
QPainterPath(const QPainterPath &other);
QPainterPath &operator=(const QPainterPath &other);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QPainterPath &operator=(QPainterPath &&other) noexcept
{ qSwap(d_ptr, other.d_ptr); return *this; }
-#endif
~QPainterPath();
inline void swap(QPainterPath &other) noexcept { d_ptr.swap(other.d_ptr); }
diff --git a/src/gui/painting/qpen.h b/src/gui/painting/qpen.h
index 884ec8cdfa..10b11d1d85 100644
--- a/src/gui/painting/qpen.h
+++ b/src/gui/painting/qpen.h
@@ -70,12 +70,10 @@ public:
~QPen();
QPen &operator=(const QPen &pen) noexcept;
-#ifdef Q_COMPILER_RVALUE_REFS
QPen(QPen &&other) noexcept
: d(other.d) { other.d = nullptr; }
QPen &operator=(QPen &&other) noexcept
{ qSwap(d, other.d); return *this; }
-#endif
void swap(QPen &other) noexcept { qSwap(d, other.d); }
Qt::PenStyle style() const;
diff --git a/src/gui/painting/qpolygon.h b/src/gui/painting/qpolygon.h
index 118861c0f2..93fab55aa1 100644
--- a/src/gui/painting/qpolygon.h
+++ b/src/gui/painting/qpolygon.h
@@ -60,16 +60,12 @@ public:
inline ~QPolygon() {}
inline explicit QPolygon(int size);
inline /*implicit*/ QPolygon(const QVector<QPoint> &v) : QVector<QPoint>(v) {}
-#ifdef Q_COMPILER_RVALUE_REFS
/*implicit*/ QPolygon(QVector<QPoint> &&v) noexcept : QVector<QPoint>(std::move(v)) {}
-#endif
QPolygon(const QRect &r, bool closed=false);
QPolygon(int nPoints, const int *points);
QPolygon(const QPolygon &other) : QVector<QPoint>(other) {}
-#ifdef Q_COMPILER_RVALUE_REFS
QPolygon(QPolygon &&other) noexcept : QVector<QPoint>(std::move(other)) {}
QPolygon &operator=(QPolygon &&other) noexcept { swap(other); return *this; }
-#endif
QPolygon &operator=(const QPolygon &other) { QVector<QPoint>::operator=(other); return *this; }
void swap(QPolygon &other) noexcept { QVector<QPoint>::swap(other); } // prevent QVector<QPoint><->QPolygon swaps
@@ -145,16 +141,12 @@ public:
inline ~QPolygonF() {}
inline explicit QPolygonF(int size);
inline /*implicit*/ QPolygonF(const QVector<QPointF> &v) : QVector<QPointF>(v) {}
-#ifdef Q_COMPILER_RVALUE_REFS
/* implicit */ QPolygonF(QVector<QPointF> &&v) noexcept : QVector<QPointF>(std::move(v)) {}
-#endif
QPolygonF(const QRectF &r);
/*implicit*/ QPolygonF(const QPolygon &a);
inline QPolygonF(const QPolygonF &a) : QVector<QPointF>(a) {}
-#ifdef Q_COMPILER_RVALUE_REFS
QPolygonF(QPolygonF &&other) noexcept : QVector<QPointF>(std::move(other)) {}
QPolygonF &operator=(QPolygonF &&other) noexcept { swap(other); return *this; }
-#endif
QPolygonF &operator=(const QPolygonF &other) { QVector<QPointF>::operator=(other); return *this; }
inline void swap(QPolygonF &other) { QVector<QPointF>::swap(other); } // prevent QVector<QPointF><->QPolygonF swaps
diff --git a/src/gui/painting/qregion.h b/src/gui/painting/qregion.h
index 9b6b25d743..54de916198 100644
--- a/src/gui/painting/qregion.h
+++ b/src/gui/painting/qregion.h
@@ -74,10 +74,8 @@ public:
QRegion(const QBitmap &bitmap);
~QRegion();
QRegion &operator=(const QRegion &);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QRegion &operator=(QRegion &&other) noexcept
{ qSwap(d, other.d); return *this; }
-#endif
inline void swap(QRegion &other) noexcept { qSwap(d, other.d); }
bool isEmpty() const;
bool isNull() const;
diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h
index 16685ed9e8..683aa3bf65 100644
--- a/src/gui/text/qfont.h
+++ b/src/gui/text/qfont.h
@@ -261,10 +261,8 @@ public:
bool operator<(const QFont &) const;
operator QVariant() const;
bool isCopyOf(const QFont &) const;
-#ifdef Q_COMPILER_RVALUE_REFS
inline QFont &operator=(QFont &&other) noexcept
{ qSwap(d, other.d); qSwap(resolve_mask, other.resolve_mask); return *this; }
-#endif
#if QT_DEPRECATED_SINCE(5, 3)
// needed for X11
diff --git a/src/gui/text/qfontmetrics.h b/src/gui/text/qfontmetrics.h
index 761cadde47..a92ee9ed2f 100644
--- a/src/gui/text/qfontmetrics.h
+++ b/src/gui/text/qfontmetrics.h
@@ -76,10 +76,8 @@ public:
~QFontMetrics();
QFontMetrics &operator=(const QFontMetrics &);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QFontMetrics &operator=(QFontMetrics &&other) noexcept
{ qSwap(d, other.d); return *this; }
-#endif
void swap(QFontMetrics &other) noexcept
{ qSwap(d, other.d); }
@@ -172,10 +170,8 @@ public:
QFontMetricsF &operator=(const QFontMetricsF &);
QFontMetricsF &operator=(const QFontMetrics &);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QFontMetricsF &operator=(QFontMetricsF &&other)
{ qSwap(d, other.d); return *this; }
-#endif
void swap(QFontMetricsF &other) { qSwap(d, other.d); }
diff --git a/src/gui/text/qglyphrun.h b/src/gui/text/qglyphrun.h
index 9bb1d3c820..15e315bea2 100644
--- a/src/gui/text/qglyphrun.h
+++ b/src/gui/text/qglyphrun.h
@@ -66,9 +66,7 @@ public:
QGlyphRun();
QGlyphRun(const QGlyphRun &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QGlyphRun &operator=(QGlyphRun &&other) noexcept { swap(other); return *this; }
-#endif
QGlyphRun &operator=(const QGlyphRun &other);
~QGlyphRun();
diff --git a/src/gui/text/qrawfont.h b/src/gui/text/qrawfont.h
index 3b84f642d3..c6289d6c93 100644
--- a/src/gui/text/qrawfont.h
+++ b/src/gui/text/qrawfont.h
@@ -79,9 +79,7 @@ public:
qreal pixelSize,
QFont::HintingPreference hintingPreference = QFont::PreferDefaultHinting);
QRawFont(const QRawFont &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QRawFont &operator=(QRawFont &&other) noexcept { swap(other); return *this; }
-#endif
QRawFont &operator=(const QRawFont &other);
~QRawFont();
diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h
index c6a0d158c1..e8c94a6add 100644
--- a/src/gui/text/qstatictext.h
+++ b/src/gui/text/qstatictext.h
@@ -64,9 +64,7 @@ public:
QStaticText();
explicit QStaticText(const QString &text);
QStaticText(const QStaticText &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QStaticText &operator=(QStaticText &&other) noexcept { swap(other); return *this; }
-#endif
QStaticText &operator=(const QStaticText &);
~QStaticText();
diff --git a/src/gui/text/qtextcursor.h b/src/gui/text/qtextcursor.h
index 4a9c614887..7cad3cc5e8 100644
--- a/src/gui/text/qtextcursor.h
+++ b/src/gui/text/qtextcursor.h
@@ -73,9 +73,7 @@ public:
explicit QTextCursor(QTextFrame *frame);
explicit QTextCursor(const QTextBlock &block);
QTextCursor(const QTextCursor &cursor);
-#ifdef Q_COMPILER_RVALUE_REFS
QTextCursor &operator=(QTextCursor &&other) noexcept { swap(other); return *this; }
-#endif
QTextCursor &operator=(const QTextCursor &other);
~QTextCursor();
diff --git a/src/network/access/qabstractnetworkcache.h b/src/network/access/qabstractnetworkcache.h
index b604323c41..e357dfe58f 100644
--- a/src/network/access/qabstractnetworkcache.h
+++ b/src/network/access/qabstractnetworkcache.h
@@ -67,9 +67,7 @@ public:
QNetworkCacheMetaData(const QNetworkCacheMetaData &other);
~QNetworkCacheMetaData();
-#ifdef Q_COMPILER_RVALUE_REFS
QNetworkCacheMetaData &operator=(QNetworkCacheMetaData &&other) noexcept { swap(other); return *this; }
-#endif
QNetworkCacheMetaData &operator=(const QNetworkCacheMetaData &other);
void swap(QNetworkCacheMetaData &other) noexcept
diff --git a/src/network/access/qhttpmultipart.h b/src/network/access/qhttpmultipart.h
index f718d51d0c..56db83779a 100644
--- a/src/network/access/qhttpmultipart.h
+++ b/src/network/access/qhttpmultipart.h
@@ -60,9 +60,7 @@ public:
QHttpPart();
QHttpPart(const QHttpPart &other);
~QHttpPart();
-#ifdef Q_COMPILER_RVALUE_REFS
QHttpPart &operator=(QHttpPart &&other) noexcept { swap(other); return *this; }
-#endif
QHttpPart &operator=(const QHttpPart &other);
void swap(QHttpPart &other) noexcept { qSwap(d, other.d); }
diff --git a/src/network/access/qnetworkcookie.h b/src/network/access/qnetworkcookie.h
index 58c504f9ae..b712b63849 100644
--- a/src/network/access/qnetworkcookie.h
+++ b/src/network/access/qnetworkcookie.h
@@ -66,9 +66,7 @@ public:
explicit QNetworkCookie(const QByteArray &name = QByteArray(), const QByteArray &value = QByteArray());
QNetworkCookie(const QNetworkCookie &other);
~QNetworkCookie();
-#ifdef Q_COMPILER_RVALUE_REFS
QNetworkCookie &operator=(QNetworkCookie &&other) noexcept { swap(other); return *this; }
-#endif
QNetworkCookie &operator=(const QNetworkCookie &other);
void swap(QNetworkCookie &other) noexcept { qSwap(d, other.d); }
diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h
index 2515ff6ead..de27b9fede 100644
--- a/src/network/access/qnetworkrequest.h
+++ b/src/network/access/qnetworkrequest.h
@@ -130,9 +130,7 @@ public:
explicit QNetworkRequest(const QUrl &url = QUrl());
QNetworkRequest(const QNetworkRequest &other);
~QNetworkRequest();
-#ifdef Q_COMPILER_RVALUE_REFS
QNetworkRequest &operator=(QNetworkRequest &&other) noexcept { swap(other); return *this; }
-#endif
QNetworkRequest &operator=(const QNetworkRequest &other);
void swap(QNetworkRequest &other) noexcept { qSwap(d, other.d); }
diff --git a/src/network/bearer/qnetworkconfiguration.h b/src/network/bearer/qnetworkconfiguration.h
index 41b6e6f020..048abc2fc8 100644
--- a/src/network/bearer/qnetworkconfiguration.h
+++ b/src/network/bearer/qnetworkconfiguration.h
@@ -55,9 +55,7 @@ class Q_NETWORK_EXPORT QNetworkConfiguration
public:
QNetworkConfiguration();
QNetworkConfiguration(const QNetworkConfiguration& other);
-#ifdef Q_COMPILER_RVALUE_REFS
QNetworkConfiguration &operator=(QNetworkConfiguration &&other) noexcept { swap(other); return *this; }
-#endif
QNetworkConfiguration &operator=(const QNetworkConfiguration &other);
~QNetworkConfiguration();
diff --git a/src/network/kernel/qdnslookup.h b/src/network/kernel/qdnslookup.h
index 79a476b98f..110a74da44 100644
--- a/src/network/kernel/qdnslookup.h
+++ b/src/network/kernel/qdnslookup.h
@@ -64,9 +64,7 @@ class Q_NETWORK_EXPORT QDnsDomainNameRecord
public:
QDnsDomainNameRecord();
QDnsDomainNameRecord(const QDnsDomainNameRecord &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QDnsDomainNameRecord &operator=(QDnsDomainNameRecord &&other) noexcept { swap(other); return *this; }
-#endif
QDnsDomainNameRecord &operator=(const QDnsDomainNameRecord &other);
~QDnsDomainNameRecord();
@@ -88,9 +86,7 @@ class Q_NETWORK_EXPORT QDnsHostAddressRecord
public:
QDnsHostAddressRecord();
QDnsHostAddressRecord(const QDnsHostAddressRecord &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QDnsHostAddressRecord &operator=(QDnsHostAddressRecord &&other) noexcept { swap(other); return *this; }
-#endif
QDnsHostAddressRecord &operator=(const QDnsHostAddressRecord &other);
~QDnsHostAddressRecord();
@@ -112,9 +108,7 @@ class Q_NETWORK_EXPORT QDnsMailExchangeRecord
public:
QDnsMailExchangeRecord();
QDnsMailExchangeRecord(const QDnsMailExchangeRecord &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QDnsMailExchangeRecord &operator=(QDnsMailExchangeRecord &&other) noexcept { swap(other); return *this; }
-#endif
QDnsMailExchangeRecord &operator=(const QDnsMailExchangeRecord &other);
~QDnsMailExchangeRecord();
@@ -137,9 +131,7 @@ class Q_NETWORK_EXPORT QDnsServiceRecord
public:
QDnsServiceRecord();
QDnsServiceRecord(const QDnsServiceRecord &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QDnsServiceRecord &operator=(QDnsServiceRecord &&other) noexcept { swap(other); return *this; }
-#endif
QDnsServiceRecord &operator=(const QDnsServiceRecord &other);
~QDnsServiceRecord();
@@ -164,9 +156,7 @@ class Q_NETWORK_EXPORT QDnsTextRecord
public:
QDnsTextRecord();
QDnsTextRecord(const QDnsTextRecord &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QDnsTextRecord &operator=(QDnsTextRecord &&other) noexcept { swap(other); return *this; }
-#endif
QDnsTextRecord &operator=(const QDnsTextRecord &other);
~QDnsTextRecord();
diff --git a/src/network/kernel/qhostaddress.h b/src/network/kernel/qhostaddress.h
index f20da3304f..799247695e 100644
--- a/src/network/kernel/qhostaddress.h
+++ b/src/network/kernel/qhostaddress.h
@@ -102,11 +102,8 @@ public:
QHostAddress(SpecialAddress address);
~QHostAddress();
-#ifdef Q_COMPILER_RVALUE_REFS
QHostAddress &operator=(QHostAddress &&other) noexcept
{ swap(other); return *this; }
-#endif
-
QHostAddress &operator=(const QHostAddress &other);
#if QT_DEPRECATED_SINCE(5, 8)
QT_DEPRECATED_X("use = QHostAddress(string) instead")
diff --git a/src/network/kernel/qnetworkinterface.h b/src/network/kernel/qnetworkinterface.h
index 1d3286118e..4caedaa38f 100644
--- a/src/network/kernel/qnetworkinterface.h
+++ b/src/network/kernel/qnetworkinterface.h
@@ -64,9 +64,7 @@ public:
QNetworkAddressEntry();
QNetworkAddressEntry(const QNetworkAddressEntry &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QNetworkAddressEntry &operator=(QNetworkAddressEntry &&other) noexcept { swap(other); return *this; }
-#endif
QNetworkAddressEntry &operator=(const QNetworkAddressEntry &other);
~QNetworkAddressEntry();
@@ -142,9 +140,7 @@ public:
QNetworkInterface();
QNetworkInterface(const QNetworkInterface &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QNetworkInterface &operator=(QNetworkInterface &&other) noexcept { swap(other); return *this; }
-#endif
QNetworkInterface &operator=(const QNetworkInterface &other);
~QNetworkInterface();
diff --git a/src/network/kernel/qnetworkproxy.h b/src/network/kernel/qnetworkproxy.h
index 0b1bc02695..302a2ce6ca 100644
--- a/src/network/kernel/qnetworkproxy.h
+++ b/src/network/kernel/qnetworkproxy.h
@@ -89,9 +89,7 @@ public:
QueryType queryType = TcpServer);
#endif
QNetworkProxyQuery(const QNetworkProxyQuery &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QNetworkProxyQuery &operator=(QNetworkProxyQuery &&other) noexcept { swap(other); return *this; }
-#endif
QNetworkProxyQuery &operator=(const QNetworkProxyQuery &other);
~QNetworkProxyQuery();
@@ -161,9 +159,7 @@ public:
QNetworkProxy(ProxyType type, const QString &hostName = QString(), quint16 port = 0,
const QString &user = QString(), const QString &password = QString());
QNetworkProxy(const QNetworkProxy &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QNetworkProxy &operator=(QNetworkProxy &&other) noexcept { swap(other); return *this; }
-#endif
QNetworkProxy &operator=(const QNetworkProxy &other);
~QNetworkProxy();
diff --git a/src/network/ssl/qsslcertificate.h b/src/network/ssl/qsslcertificate.h
index a6acfa2cc3..69901b526c 100644
--- a/src/network/ssl/qsslcertificate.h
+++ b/src/network/ssl/qsslcertificate.h
@@ -88,9 +88,7 @@ public:
explicit QSslCertificate(const QByteArray &data = QByteArray(), QSsl::EncodingFormat format = QSsl::Pem);
QSslCertificate(const QSslCertificate &other);
~QSslCertificate();
-#ifdef Q_COMPILER_RVALUE_REFS
QSslCertificate &operator=(QSslCertificate &&other) noexcept { swap(other); return *this; }
-#endif
QSslCertificate &operator=(const QSslCertificate &other);
void swap(QSslCertificate &other) noexcept
diff --git a/src/network/ssl/qsslcertificateextension.h b/src/network/ssl/qsslcertificateextension.h
index f862015312..7cc8a888be 100644
--- a/src/network/ssl/qsslcertificateextension.h
+++ b/src/network/ssl/qsslcertificateextension.h
@@ -55,9 +55,7 @@ class Q_NETWORK_EXPORT QSslCertificateExtension
public:
QSslCertificateExtension();
QSslCertificateExtension(const QSslCertificateExtension &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QSslCertificateExtension &operator=(QSslCertificateExtension &&other) noexcept { swap(other); return *this; }
-#endif
QSslCertificateExtension &operator=(const QSslCertificateExtension &other);
~QSslCertificateExtension();
diff --git a/src/network/ssl/qsslcipher.h b/src/network/ssl/qsslcipher.h
index 430fe9aa7c..6994f590ae 100644
--- a/src/network/ssl/qsslcipher.h
+++ b/src/network/ssl/qsslcipher.h
@@ -59,9 +59,7 @@ public:
explicit QSslCipher(const QString &name);
QSslCipher(const QString &name, QSsl::SslProtocol protocol);
QSslCipher(const QSslCipher &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QSslCipher &operator=(QSslCipher &&other) noexcept { swap(other); return *this; }
-#endif
QSslCipher &operator=(const QSslCipher &other);
~QSslCipher();
diff --git a/src/network/ssl/qsslconfiguration.h b/src/network/ssl/qsslconfiguration.h
index 16704ba17b..c25c2686de 100644
--- a/src/network/ssl/qsslconfiguration.h
+++ b/src/network/ssl/qsslconfiguration.h
@@ -85,9 +85,7 @@ public:
QSslConfiguration();
QSslConfiguration(const QSslConfiguration &other);
~QSslConfiguration();
-#ifdef Q_COMPILER_RVALUE_REFS
QSslConfiguration &operator=(QSslConfiguration &&other) noexcept { swap(other); return *this; }
-#endif
QSslConfiguration &operator=(const QSslConfiguration &other);
void swap(QSslConfiguration &other) noexcept
diff --git a/src/network/ssl/qsslerror.h b/src/network/ssl/qsslerror.h
index a9c46c8571..c4a0d52193 100644
--- a/src/network/ssl/qsslerror.h
+++ b/src/network/ssl/qsslerror.h
@@ -107,9 +107,7 @@ public:
{ qSwap(d, other.d); }
~QSslError();
-#ifdef Q_COMPILER_RVALUE_REFS
QSslError &operator=(QSslError &&other) noexcept { swap(other); return *this; }
-#endif
QSslError &operator=(const QSslError &other);
bool operator==(const QSslError &other) const;
inline bool operator!=(const QSslError &other) const
diff --git a/src/network/ssl/qsslpresharedkeyauthenticator.h b/src/network/ssl/qsslpresharedkeyauthenticator.h
index 29d647b121..5d714dc34e 100644
--- a/src/network/ssl/qsslpresharedkeyauthenticator.h
+++ b/src/network/ssl/qsslpresharedkeyauthenticator.h
@@ -59,9 +59,7 @@ public:
Q_NETWORK_EXPORT QSslPreSharedKeyAuthenticator(const QSslPreSharedKeyAuthenticator &authenticator);
Q_NETWORK_EXPORT QSslPreSharedKeyAuthenticator &operator=(const QSslPreSharedKeyAuthenticator &authenticator);
-#ifdef Q_COMPILER_RVALUE_REFS
QSslPreSharedKeyAuthenticator &operator=(QSslPreSharedKeyAuthenticator &&other) noexcept { swap(other); return *this; }
-#endif
void swap(QSslPreSharedKeyAuthenticator &other) noexcept { qSwap(d, other.d); }
diff --git a/src/printsupport/kernel/qprintdevice_p.h b/src/printsupport/kernel/qprintdevice_p.h
index a2b18f08cf..9e76c37617 100644
--- a/src/printsupport/kernel/qprintdevice_p.h
+++ b/src/printsupport/kernel/qprintdevice_p.h
@@ -76,9 +76,7 @@ public:
~QPrintDevice();
QPrintDevice &operator=(const QPrintDevice &other);
- #ifdef Q_COMPILER_RVALUE_REFS
QPrintDevice &operator=(QPrintDevice &&other) { swap(other); return *this; }
-#endif
void swap(QPrintDevice &other) { d.swap(other.d); }