diff options
Diffstat (limited to 'src/network/kernel/qdnslookup.h')
-rw-r--r-- | src/network/kernel/qdnslookup.h | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/src/network/kernel/qdnslookup.h b/src/network/kernel/qdnslookup.h index 01ebbb6535..ae015a22b8 100644 --- a/src/network/kernel/qdnslookup.h +++ b/src/network/kernel/qdnslookup.h @@ -55,16 +55,18 @@ class Q_NETWORK_EXPORT QDnsDomainNameRecord public: QDnsDomainNameRecord(); QDnsDomainNameRecord(const QDnsDomainNameRecord &other); +#ifdef Q_COMPILER_RVALUE_REFS + QDnsDomainNameRecord &operator=(QDnsDomainNameRecord &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif + QDnsDomainNameRecord &operator=(const QDnsDomainNameRecord &other); ~QDnsDomainNameRecord(); - void swap(QDnsDomainNameRecord &other) { qSwap(d, other.d); } + void swap(QDnsDomainNameRecord &other) Q_DECL_NOTHROW { qSwap(d, other.d); } QString name() const; quint32 timeToLive() const; QString value() const; - QDnsDomainNameRecord &operator=(const QDnsDomainNameRecord &other); - private: QSharedDataPointer<QDnsDomainNameRecordPrivate> d; friend class QDnsLookupRunnable; @@ -77,16 +79,18 @@ class Q_NETWORK_EXPORT QDnsHostAddressRecord public: QDnsHostAddressRecord(); QDnsHostAddressRecord(const QDnsHostAddressRecord &other); +#ifdef Q_COMPILER_RVALUE_REFS + QDnsHostAddressRecord &operator=(QDnsHostAddressRecord &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif + QDnsHostAddressRecord &operator=(const QDnsHostAddressRecord &other); ~QDnsHostAddressRecord(); - void swap(QDnsHostAddressRecord &other) { qSwap(d, other.d); } + void swap(QDnsHostAddressRecord &other) Q_DECL_NOTHROW { qSwap(d, other.d); } QString name() const; quint32 timeToLive() const; QHostAddress value() const; - QDnsHostAddressRecord &operator=(const QDnsHostAddressRecord &other); - private: QSharedDataPointer<QDnsHostAddressRecordPrivate> d; friend class QDnsLookupRunnable; @@ -99,17 +103,19 @@ class Q_NETWORK_EXPORT QDnsMailExchangeRecord public: QDnsMailExchangeRecord(); QDnsMailExchangeRecord(const QDnsMailExchangeRecord &other); +#ifdef Q_COMPILER_RVALUE_REFS + QDnsMailExchangeRecord &operator=(QDnsMailExchangeRecord &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif + QDnsMailExchangeRecord &operator=(const QDnsMailExchangeRecord &other); ~QDnsMailExchangeRecord(); - void swap(QDnsMailExchangeRecord &other) { qSwap(d, other.d); } + void swap(QDnsMailExchangeRecord &other) Q_DECL_NOTHROW { qSwap(d, other.d); } QString exchange() const; QString name() const; quint16 preference() const; quint32 timeToLive() const; - QDnsMailExchangeRecord &operator=(const QDnsMailExchangeRecord &other); - private: QSharedDataPointer<QDnsMailExchangeRecordPrivate> d; friend class QDnsLookupRunnable; @@ -122,9 +128,13 @@ class Q_NETWORK_EXPORT QDnsServiceRecord public: QDnsServiceRecord(); QDnsServiceRecord(const QDnsServiceRecord &other); +#ifdef Q_COMPILER_RVALUE_REFS + QDnsServiceRecord &operator=(QDnsServiceRecord &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif + QDnsServiceRecord &operator=(const QDnsServiceRecord &other); ~QDnsServiceRecord(); - void swap(QDnsServiceRecord &other) { qSwap(d, other.d); } + void swap(QDnsServiceRecord &other) Q_DECL_NOTHROW { qSwap(d, other.d); } QString name() const; quint16 port() const; @@ -133,8 +143,6 @@ public: quint32 timeToLive() const; quint16 weight() const; - QDnsServiceRecord &operator=(const QDnsServiceRecord &other); - private: QSharedDataPointer<QDnsServiceRecordPrivate> d; friend class QDnsLookupRunnable; @@ -147,16 +155,18 @@ class Q_NETWORK_EXPORT QDnsTextRecord public: QDnsTextRecord(); QDnsTextRecord(const QDnsTextRecord &other); +#ifdef Q_COMPILER_RVALUE_REFS + QDnsTextRecord &operator=(QDnsTextRecord &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif + QDnsTextRecord &operator=(const QDnsTextRecord &other); ~QDnsTextRecord(); - void swap(QDnsTextRecord &other) { qSwap(d, other.d); } + void swap(QDnsTextRecord &other) Q_DECL_NOTHROW { qSwap(d, other.d); } QString name() const; quint32 timeToLive() const; QList<QByteArray> values() const; - QDnsTextRecord &operator=(const QDnsTextRecord &other); - private: QSharedDataPointer<QDnsTextRecordPrivate> d; friend class QDnsLookupRunnable; @@ -201,9 +211,9 @@ public: }; Q_ENUM(Type) - explicit QDnsLookup(QObject *parent = 0); - QDnsLookup(Type type, const QString &name, QObject *parent = 0); - QDnsLookup(Type type, const QString &name, const QHostAddress &nameserver, QObject *parent = 0); + explicit QDnsLookup(QObject *parent = Q_NULLPTR); + QDnsLookup(Type type, const QString &name, QObject *parent = Q_NULLPTR); + QDnsLookup(Type type, const QString &name, const QHostAddress &nameserver, QObject *parent = Q_NULLPTR); ~QDnsLookup(); Error error() const; |