From b0aa023aa2e08fb24eb1220c92bec02df3df8c90 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 5 Apr 2012 14:49:02 +0200 Subject: QtNetwork: add member-swap to shared classes Implemented as in other shared classes (e.g. QPen). Change-Id: Ib3d87ff99603e617cc8810489f9f5e9fe054cd2a Reviewed-by: Thiago Macieira Reviewed-by: Shane Kearns --- src/network/bearer/qnetworkconfiguration.cpp | 8 ++++++++ src/network/bearer/qnetworkconfiguration.h | 2 ++ 2 files changed, 10 insertions(+) (limited to 'src/network/bearer') diff --git a/src/network/bearer/qnetworkconfiguration.cpp b/src/network/bearer/qnetworkconfiguration.cpp index 0aa843f393..9e3f685642 100644 --- a/src/network/bearer/qnetworkconfiguration.cpp +++ b/src/network/bearer/qnetworkconfiguration.cpp @@ -233,6 +233,14 @@ QNetworkConfiguration &QNetworkConfiguration::operator=(const QNetworkConfigurat return *this; } +/*! + \fn void QNetworkConfiguration::swap(QNetworkConfiguration &other) + \since 5.0 + + Swaps this network configuration with \a other. This function is + very fast and never fails. +*/ + /*! Returns true, if this configuration is the same as the \a other configuration given; otherwise returns false. diff --git a/src/network/bearer/qnetworkconfiguration.h b/src/network/bearer/qnetworkconfiguration.h index 2feb3d2394..807589cf45 100644 --- a/src/network/bearer/qnetworkconfiguration.h +++ b/src/network/bearer/qnetworkconfiguration.h @@ -61,6 +61,8 @@ public: QNetworkConfiguration &operator=(const QNetworkConfiguration &other); ~QNetworkConfiguration(); + void swap(QNetworkConfiguration &other) { qSwap(d, other.d); } + bool operator==(const QNetworkConfiguration &other) const; inline bool operator!=(const QNetworkConfiguration &other) const { return !operator==(other); } -- cgit v1.2.3