summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qhostinfo.h
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@qt.io>2017-04-27 19:08:56 +0200
committerJesus Fernandez <Jesus.Fernandez@qt.io>2017-05-16 09:55:46 +0000
commit904788e3c6e800e4a8b641b549cbfd86f2045f80 (patch)
treeb4cb6a1bfe96bce217321428380b61ee477e3294 /src/network/kernel/qhostinfo.h
parentcafefd1d33349209617d391b3b49c9663590b3c9 (diff)
Add swap and move operator to QHostInfo
Also mark as shared-come-qt6, [ChangeLog][QtNetwork][QHostInfo] Added swap() and move operator. Change-Id: I8f422868f0487a37aeba3bc74685dc4912e9b3a4 Coverity-Id: 168204 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/network/kernel/qhostinfo.h')
-rw-r--r--src/network/kernel/qhostinfo.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/kernel/qhostinfo.h b/src/network/kernel/qhostinfo.h
index 00c70ae9b9..c5727bb6eb 100644
--- a/src/network/kernel/qhostinfo.h
+++ b/src/network/kernel/qhostinfo.h
@@ -63,8 +63,11 @@ public:
explicit QHostInfo(int lookupId = -1);
QHostInfo(const QHostInfo &d);
QHostInfo &operator=(const QHostInfo &d);
+ QHostInfo &operator=(QHostInfo &&other) Q_DECL_NOTHROW { swap(other); return *this; }
~QHostInfo();
+ void swap(QHostInfo &other) Q_DECL_NOTHROW { qSwap(d, other.d); }
+
QString hostName() const;
void setHostName(const QString &name);
@@ -154,6 +157,8 @@ private:
QtPrivate::QSlotObjectBase *slotObj);
};
+Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QHostInfo)
+
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QHostInfo)