summaryrefslogtreecommitdiffstats
path: root/src/network/ssl
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2012-04-05 14:49:02 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-06 16:08:02 +0200
commitb0aa023aa2e08fb24eb1220c92bec02df3df8c90 (patch)
tree1660f4eb0b552ff32bb86f47f6ac7f9cca7878ac /src/network/ssl
parent7d63fa6edcbe706bf0eab2c7e24efa1ed8940e6d (diff)
QtNetwork: add member-swap to shared classes
Implemented as in other shared classes (e.g. QPen). Change-Id: Ib3d87ff99603e617cc8810489f9f5e9fe054cd2a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Diffstat (limited to 'src/network/ssl')
-rw-r--r--src/network/ssl/qsslcertificate.cpp8
-rw-r--r--src/network/ssl/qsslcertificate.h4
-rw-r--r--src/network/ssl/qsslcertificateextension.cpp7
-rw-r--r--src/network/ssl/qsslcertificateextension.h2
-rw-r--r--src/network/ssl/qsslcipher.cpp8
-rw-r--r--src/network/ssl/qsslcipher.h4
-rw-r--r--src/network/ssl/qsslconfiguration.cpp8
-rw-r--r--src/network/ssl/qsslconfiguration.h3
-rw-r--r--src/network/ssl/qsslerror.cpp8
-rw-r--r--src/network/ssl/qsslerror.h3
-rw-r--r--src/network/ssl/qsslkey.cpp8
-rw-r--r--src/network/ssl/qsslkey.h2
12 files changed, 65 insertions, 0 deletions
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index 1b9563b0f5..6287cef214 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -191,6 +191,14 @@ QSslCertificate &QSslCertificate::operator=(const QSslCertificate &other)
}
/*!
+ \fn void QSslCertificate::swap(QSslCertificate &other)
+ \since 5.0
+
+ Swaps this certificate instance with \a other. This function is
+ very fast and never fails.
+*/
+
+/*!
Returns true if this certificate is the same as \a other; otherwise
returns false.
*/
diff --git a/src/network/ssl/qsslcertificate.h b/src/network/ssl/qsslcertificate.h
index ff86e95909..a0ec195b6a 100644
--- a/src/network/ssl/qsslcertificate.h
+++ b/src/network/ssl/qsslcertificate.h
@@ -87,6 +87,10 @@ public:
QSslCertificate(const QSslCertificate &other);
~QSslCertificate();
QSslCertificate &operator=(const QSslCertificate &other);
+
+ inline void swap(QSslCertificate &other)
+ { qSwap(d, other.d); }
+
bool operator==(const QSslCertificate &other) const;
inline bool operator!=(const QSslCertificate &other) const { return !operator==(other); }
diff --git a/src/network/ssl/qsslcertificateextension.cpp b/src/network/ssl/qsslcertificateextension.cpp
index fae261a258..e68180cab6 100644
--- a/src/network/ssl/qsslcertificateextension.cpp
+++ b/src/network/ssl/qsslcertificateextension.cpp
@@ -166,6 +166,13 @@ QSslCertificateExtension &QSslCertificateExtension::operator=(const QSslCertific
}
/*!
+ \fn void QSslCertificateExtension::swap(QSslCertificateExtension &other)
+
+ Swaps this certificate extension instance with \a other. This
+ function is very fast and never fails.
+*/
+
+/*!
Returns the ASN.1 OID of this extension.
*/
QString QSslCertificateExtension::oid() const
diff --git a/src/network/ssl/qsslcertificateextension.h b/src/network/ssl/qsslcertificateextension.h
index 1ba294ba1b..3ba90cefe3 100644
--- a/src/network/ssl/qsslcertificateextension.h
+++ b/src/network/ssl/qsslcertificateextension.h
@@ -65,6 +65,8 @@ public:
QSslCertificateExtension &operator=(const QSslCertificateExtension &other);
+ void swap(QSslCertificateExtension &other) { qSwap(d, other.d); }
+
QString oid() const;
QString name() const;
QVariant value() const;
diff --git a/src/network/ssl/qsslcipher.cpp b/src/network/ssl/qsslcipher.cpp
index ae24e9e3e2..f7e2118fe4 100644
--- a/src/network/ssl/qsslcipher.cpp
+++ b/src/network/ssl/qsslcipher.cpp
@@ -124,6 +124,14 @@ QSslCipher &QSslCipher::operator=(const QSslCipher &other)
}
/*!
+ \fn void QSslCipher::swap(QSslCipher &other)
+ \since 5.0
+
+ Swaps this cipher instance with \a other. This function is very
+ fast and never fails.
+*/
+
+/*!
Returns true if this cipher is the same as \a other; otherwise,
false is returned.
*/
diff --git a/src/network/ssl/qsslcipher.h b/src/network/ssl/qsslcipher.h
index 78989b7cb8..48b9d13615 100644
--- a/src/network/ssl/qsslcipher.h
+++ b/src/network/ssl/qsslcipher.h
@@ -63,6 +63,10 @@ public:
QSslCipher(const QSslCipher &other);
~QSslCipher();
QSslCipher &operator=(const QSslCipher &other);
+
+ inline void swap(QSslCipher &other)
+ { qSwap(d, other.d); }
+
bool operator==(const QSslCipher &other) const;
inline bool operator!=(const QSslCipher &other) const { return !operator==(other); }
diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp
index f7b3228816..3dedd29bfe 100644
--- a/src/network/ssl/qsslconfiguration.cpp
+++ b/src/network/ssl/qsslconfiguration.cpp
@@ -149,6 +149,14 @@ QSslConfiguration &QSslConfiguration::operator=(const QSslConfiguration &other)
}
/*!
+ \fn void QSslConfiguration::swap(QSslConfiguration &other)
+ \since 5.0
+
+ Swaps this SSL configuration instance with \a other. This function
+ is very fast and never fails.
+*/
+
+/*!
Returns true if this QSslConfiguration object is equal to \a
other.
diff --git a/src/network/ssl/qsslconfiguration.h b/src/network/ssl/qsslconfiguration.h
index 0ef6a6b4f3..d57ba38561 100644
--- a/src/network/ssl/qsslconfiguration.h
+++ b/src/network/ssl/qsslconfiguration.h
@@ -82,6 +82,9 @@ public:
~QSslConfiguration();
QSslConfiguration &operator=(const QSslConfiguration &other);
+ inline void swap(QSslConfiguration &other)
+ { qSwap(d, other.d); }
+
bool operator==(const QSslConfiguration &other) const;
inline bool operator!=(const QSslConfiguration &other) const
{ return !(*this == other); }
diff --git a/src/network/ssl/qsslerror.cpp b/src/network/ssl/qsslerror.cpp
index 224ef9db8f..5c00907802 100644
--- a/src/network/ssl/qsslerror.cpp
+++ b/src/network/ssl/qsslerror.cpp
@@ -173,6 +173,14 @@ QSslError &QSslError::operator=(const QSslError &other)
}
/*!
+ \fn void QSslError::swap(QSslError &other)
+ \since 5.0
+
+ Swaps this error instance with \a other. This function is very
+ fast and never fails.
+*/
+
+/*!
\since 4.4
Returns true if this error is equal to \a other; otherwise returns false.
diff --git a/src/network/ssl/qsslerror.h b/src/network/ssl/qsslerror.h
index a84010adbe..fe9a8ece5e 100644
--- a/src/network/ssl/qsslerror.h
+++ b/src/network/ssl/qsslerror.h
@@ -94,6 +94,9 @@ public:
QSslError(const QSslError &other);
+ inline void swap(QSslError &other)
+ { qSwap(d, other.d); }
+
~QSslError();
QSslError &operator=(const QSslError &other);
bool operator==(const QSslError &other) const;
diff --git a/src/network/ssl/qsslkey.cpp b/src/network/ssl/qsslkey.cpp
index e934a2e383..31f211c3e7 100644
--- a/src/network/ssl/qsslkey.cpp
+++ b/src/network/ssl/qsslkey.cpp
@@ -313,6 +313,14 @@ QSslKey &QSslKey::operator=(const QSslKey &other)
}
/*!
+ \fn void QSslKey::swap(QSslKey &other)
+ \since 5.0
+
+ Swaps this ssl key with \a other. This function is very fast and
+ never fails.
+*/
+
+/*!
Returns true if this is a null key; otherwise false.
\sa clear()
diff --git a/src/network/ssl/qsslkey.h b/src/network/ssl/qsslkey.h
index e64df5fce7..3a1a8cd696 100644
--- a/src/network/ssl/qsslkey.h
+++ b/src/network/ssl/qsslkey.h
@@ -77,6 +77,8 @@ public:
~QSslKey();
QSslKey &operator=(const QSslKey &other);
+ inline void swap(QSslKey &other) { qSwap(d, other.d); }
+
bool isNull() const;
void clear();