Remove handling of missing Q_COMPILER_RVALUE_REFS
Remove remaining handling of missing support for rvalue refs. Change-Id: I78bab8bccfeeb9c76f464f345874364a37e4840a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
2ded0043ca
commit
b32b61f17e
@ -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) }; };
|
||||
|
@ -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 ( \
|
||||
|
@ -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); }
|
||||
|
@ -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); }
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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); }
|
||||
|
@ -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)
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)))
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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; }
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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); }
|
||||
|
@ -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()
|
||||
|
@ -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)
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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); }
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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); }
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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); }
|
||||
|
||||
|
@ -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); }
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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); }
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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); }
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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); }
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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); }
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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); }
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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
|
||||
|
@ -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); }
|
||||
|
@ -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); }
|
||||
|
@ -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); }
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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")
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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); }
|
||||
|
||||
|
@ -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); }
|
||||
|
||||
|
@ -456,12 +456,8 @@ typedef int (Empty::*memFun) ();
|
||||
} while (false) \
|
||||
/**/
|
||||
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
#define TEST_AlignOf_RValueRef(type, alignment) \
|
||||
TEST_AlignOf_impl(type, alignment)
|
||||
#else
|
||||
#define TEST_AlignOf_RValueRef(type, alignment) do {} while (false)
|
||||
#endif
|
||||
|
||||
#define TEST_AlignOf_impl(type, alignment) \
|
||||
do { \
|
||||
|
@ -66,7 +66,6 @@ void tst_QSignalBlocker::signalBlocking()
|
||||
|
||||
void tst_QSignalBlocker::moveAssignment()
|
||||
{
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
QObject o1, o2;
|
||||
|
||||
// move-assignment: both block other objects
|
||||
@ -157,10 +156,6 @@ void tst_QSignalBlocker::moveAssignment()
|
||||
|
||||
QVERIFY(!o1.signalsBlocked());
|
||||
QVERIFY(!o2.signalsBlocked());
|
||||
|
||||
#else
|
||||
QSKIP("This compiler is not in C++11 mode or doesn't support move semantics");
|
||||
#endif // Q_COMPILER_RVALUE_REFS
|
||||
}
|
||||
|
||||
QTEST_MAIN(tst_QSignalBlocker)
|
||||
|
@ -91,11 +91,7 @@ static QStringList qMimeTypeGlobPatterns()
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
#ifndef Q_COMPILER_RVALUE_REFS
|
||||
QMIMETYPE_BUILDER
|
||||
#else
|
||||
QMIMETYPE_BUILDER_FROM_RVALUE_REFS
|
||||
#endif
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -79,9 +79,7 @@ private slots:
|
||||
void fromRawData();
|
||||
void literals();
|
||||
void variadicLiterals();
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
void rValueReferences();
|
||||
#endif
|
||||
void grow();
|
||||
};
|
||||
|
||||
@ -1678,7 +1676,6 @@ void tst_QArrayData::variadicLiterals()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
// std::remove_reference is in C++11, but requires library support
|
||||
template <class T> struct RemoveReference { typedef T Type; };
|
||||
template <class T> struct RemoveReference<T &> { typedef T Type; };
|
||||
@ -1761,7 +1758,6 @@ void tst_QArrayData::rValueReferences()
|
||||
QCOMPARE(v3.size(), size_t(1));
|
||||
QCOMPARE(v3.front(), 42);
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QArrayData::grow()
|
||||
{
|
||||
|
@ -47,7 +47,6 @@ private Q_SLOTS:
|
||||
void state();
|
||||
};
|
||||
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
static bool dpointer_is_null(QCollator &c)
|
||||
{
|
||||
char mem[sizeof c];
|
||||
@ -58,11 +57,9 @@ static bool dpointer_is_null(QCollator &c)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QCollator::moveSemantics()
|
||||
{
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
const QLocale de_AT(QLocale::German, QLocale::Austria);
|
||||
|
||||
QCollator c1(de_AT);
|
||||
@ -78,9 +75,6 @@ void tst_QCollator::moveSemantics()
|
||||
c1 = std::move(c2);
|
||||
QCOMPARE(c1.locale(), de_AT);
|
||||
QVERIFY(dpointer_is_null(c2));
|
||||
#else
|
||||
QSKIP("The compiler is not in C++11 mode or does not support move semantics.");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,9 +30,7 @@
|
||||
|
||||
#include <qeasingcurve.h>
|
||||
|
||||
#ifdef Q_COMPILER_RVALUE_REFS // cpp11() slot
|
||||
# include <utility> // for std::move()
|
||||
#endif
|
||||
#include <utility> // for std::move()
|
||||
|
||||
class tst_QEasingCurve : public QObject
|
||||
{
|
||||
@ -794,7 +792,6 @@ void tst_QEasingCurve::testCbrtFloat()
|
||||
|
||||
void tst_QEasingCurve::cpp11()
|
||||
{
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
{
|
||||
QEasingCurve ec( QEasingCurve::InOutBack );
|
||||
QEasingCurve copy = std::move(ec); // move ctor
|
||||
@ -809,7 +806,6 @@ void tst_QEasingCurve::cpp11()
|
||||
QCOMPARE( copy.type(), QEasingCurve::InOutBack );
|
||||
QCOMPARE( ec.type(), type );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void tst_QEasingCurve::quadraticEquation() {
|
||||
|
@ -225,13 +225,11 @@ struct NoDefaultConstructorConstRef2
|
||||
NoDefaultConstructorConstRef2(const QByteArray &ba, int i = 42) : str(QString::fromLatin1(ba)), i(i) {}
|
||||
};
|
||||
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
struct NoDefaultConstructorRRef1
|
||||
{
|
||||
int &i;
|
||||
NoDefaultConstructorRRef1(int &&i) : i(i) {}
|
||||
};
|
||||
#endif
|
||||
|
||||
void tst_QSharedPointer::basics_data()
|
||||
{
|
||||
@ -500,7 +498,6 @@ void tst_QSharedPointer::swap()
|
||||
|
||||
void tst_QSharedPointer::moveSemantics()
|
||||
{
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
QSharedPointer<int> p1, p2(new int(42)), control = p2;
|
||||
QVERIFY(p1 != control);
|
||||
QVERIFY(p1.isNull());
|
||||
@ -553,9 +550,6 @@ void tst_QSharedPointer::moveSemantics()
|
||||
QVERIFY(w1.isNull());
|
||||
QVERIFY(w2.isNull());
|
||||
QVERIFY(w3.isNull());
|
||||
#else
|
||||
QSKIP("This test requires C++11 rvalue/move semantics support in the compiler.");
|
||||
#endif
|
||||
}
|
||||
|
||||
void tst_QSharedPointer::useOfForwardDeclared()
|
||||
|
@ -709,7 +709,6 @@ void tst_QVector::appendCustom() const
|
||||
|
||||
void tst_QVector::appendRvalue() const
|
||||
{
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
QVector<QString> v;
|
||||
v.append("hello");
|
||||
QString world = "world";
|
||||
@ -717,9 +716,6 @@ void tst_QVector::appendRvalue() const
|
||||
QVERIFY(world.isEmpty());
|
||||
QCOMPARE(v.front(), QString("hello"));
|
||||
QCOMPARE(v.back(), QString("world"));
|
||||
#else
|
||||
QSKIP("This test requires that C++11 move semantics support is enabled in the compiler");
|
||||
#endif
|
||||
}
|
||||
|
||||
void tst_QVector::at() const
|
||||
|
@ -586,7 +586,6 @@ void tst_QVersionNumber::serialize()
|
||||
|
||||
void tst_QVersionNumber::moveSemantics()
|
||||
{
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
// QVersionNumber(QVersionNumber &&)
|
||||
{
|
||||
QVersionNumber v1(1, 2, 3);
|
||||
@ -609,7 +608,6 @@ void tst_QVersionNumber::moveSemantics()
|
||||
QVERIFY(!v2.isNull());
|
||||
QCOMPARE(v1, v2);
|
||||
}
|
||||
#endif
|
||||
#ifdef Q_COMPILER_REF_QUALIFIERS
|
||||
// normalized()
|
||||
{
|
||||
@ -636,9 +634,6 @@ void tst_QVersionNumber::moveSemantics()
|
||||
QVERIFY(!segments.empty());
|
||||
}
|
||||
#endif
|
||||
#if !defined(Q_COMPILER_RVALUE_REFS) && !defined(Q_COMPILER_REF_QUALIFIERS)
|
||||
QSKIP("This test requires C++11 move semantics support in the compiler.");
|
||||
#endif
|
||||
}
|
||||
|
||||
void tst_QVersionNumber::qtVersion()
|
||||
|
@ -141,7 +141,6 @@ void tst_QPalette::copySemantics()
|
||||
|
||||
void tst_QPalette::moveSemantics()
|
||||
{
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
QPalette src(Qt::red), dst;
|
||||
const QPalette control = src;
|
||||
QVERIFY(src != dst);
|
||||
@ -163,9 +162,6 @@ void tst_QPalette::moveSemantics()
|
||||
QVERIFY(dst2.isCopyOf(dst));
|
||||
QVERIFY(dst2.isCopyOf(control));
|
||||
// check moved-from 'src' can still be destroyed (doesn't crash)
|
||||
#else
|
||||
QSKIP("Compiler doesn't support C++11 move semantics");
|
||||
#endif
|
||||
}
|
||||
|
||||
void tst_QPalette::setBrush()
|
||||
|
Loading…
Reference in New Issue
Block a user