aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2019-05-14 14:40:49 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2019-05-14 15:16:13 +0000
commit596c407a3c5719d5369c602b51cbd3b31779b9da (patch)
treefe038b3af9bc571ca0d9dc038d298b48d3cc006e
parent86b77d2da82697f914889b8377eaf03f671fcb6e (diff)
Replace Q_DECL_NOTHROW -> noexcept
This change is based on the feedback from API review. Change-Id: I422f08cfc31d442893feefcacfa34271e8d7954b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/coap/qcoapmessage.cpp4
-rw-r--r--src/coap/qcoapmessage.h4
-rw-r--r--src/coap/qcoapoption.cpp4
-rw-r--r--src/coap/qcoapoption.h4
-rw-r--r--src/coap/qcoapresource.cpp2
-rw-r--r--src/coap/qcoapresource.h2
-rw-r--r--src/coap/qcoapsecurityconfiguration.cpp4
-rw-r--r--src/coap/qcoapsecurityconfiguration.h12
8 files changed, 18 insertions, 18 deletions
diff --git a/src/coap/qcoapmessage.cpp b/src/coap/qcoapmessage.cpp
index 21462f7..d1ad665 100644
--- a/src/coap/qcoapmessage.cpp
+++ b/src/coap/qcoapmessage.cpp
@@ -398,7 +398,7 @@ void QCoapMessage::setOptions(const QVector<QCoapOption> &options)
d->options = options;
}
-void QCoapMessage::swap(QCoapMessage &other) Q_DECL_NOTHROW
+void QCoapMessage::swap(QCoapMessage &other) noexcept
{
qSwap(d_ptr, other.d_ptr);
}
@@ -406,7 +406,7 @@ void QCoapMessage::swap(QCoapMessage &other) Q_DECL_NOTHROW
/*!
Move-assignment operator.
*/
-QCoapMessage &QCoapMessage::operator=(QCoapMessage &&other) Q_DECL_NOTHROW
+QCoapMessage &QCoapMessage::operator=(QCoapMessage &&other) noexcept
{
swap(other);
return *this;
diff --git a/src/coap/qcoapmessage.h b/src/coap/qcoapmessage.h
index b88a41a..200a44b 100644
--- a/src/coap/qcoapmessage.h
+++ b/src/coap/qcoapmessage.h
@@ -55,9 +55,9 @@ public:
QCoapMessage(const QCoapMessage &other);
~QCoapMessage();
- void swap(QCoapMessage &other) Q_DECL_NOTHROW;
+ void swap(QCoapMessage &other) noexcept;
QCoapMessage &operator=(const QCoapMessage &other);
- QCoapMessage &operator=(QCoapMessage &&other) Q_DECL_NOTHROW;
+ QCoapMessage &operator=(QCoapMessage &&other) noexcept;
quint8 version() const;
Type type() const;
diff --git a/src/coap/qcoapoption.cpp b/src/coap/qcoapoption.cpp
index 4973091..ac5e809 100644
--- a/src/coap/qcoapoption.cpp
+++ b/src/coap/qcoapoption.cpp
@@ -172,7 +172,7 @@ QCoapOption &QCoapOption::operator=(const QCoapOption &other)
/*!
Move-assignment operator.
*/
-QCoapOption &QCoapOption::operator=(QCoapOption &&other) Q_DECL_NOTHROW
+QCoapOption &QCoapOption::operator=(QCoapOption &&other) noexcept
{
swap(other);
return *this;
@@ -181,7 +181,7 @@ QCoapOption &QCoapOption::operator=(QCoapOption &&other) Q_DECL_NOTHROW
/*!
Swaps this option with \a other. This operation is very fast and never fails.
*/
-void QCoapOption::swap(QCoapOption &other) Q_DECL_NOTHROW
+void QCoapOption::swap(QCoapOption &other) noexcept
{
qSwap(d_ptr, other.d_ptr);
}
diff --git a/src/coap/qcoapoption.h b/src/coap/qcoapoption.h
index ed8ebaf..3b44450 100644
--- a/src/coap/qcoapoption.h
+++ b/src/coap/qcoapoption.h
@@ -72,8 +72,8 @@ public:
~QCoapOption();
QCoapOption &operator=(const QCoapOption &other);
- QCoapOption &operator=(QCoapOption &&other) Q_DECL_NOTHROW;
- void swap(QCoapOption &other) Q_DECL_NOTHROW;
+ QCoapOption &operator=(QCoapOption &&other) noexcept;
+ void swap(QCoapOption &other) noexcept;
QByteArray opaqueValue() const;
quint32 uintValue() const;
diff --git a/src/coap/qcoapresource.cpp b/src/coap/qcoapresource.cpp
index 3ce1eea..3e0dc15 100644
--- a/src/coap/qcoapresource.cpp
+++ b/src/coap/qcoapresource.cpp
@@ -84,7 +84,7 @@ QCoapResource &QCoapResource::operator=(const QCoapResource &other)
/*!
Swaps this resource with \a other. This operation is very fast and never fails.
*/
-void QCoapResource::swap(QCoapResource &other) Q_DECL_NOTHROW
+void QCoapResource::swap(QCoapResource &other) noexcept
{
d.swap(other.d);
}
diff --git a/src/coap/qcoapresource.h b/src/coap/qcoapresource.h
index 5a97e12..9b1e421 100644
--- a/src/coap/qcoapresource.h
+++ b/src/coap/qcoapresource.h
@@ -47,7 +47,7 @@ public:
~QCoapResource();
QCoapResource &operator =(const QCoapResource &other);
- void swap(QCoapResource &other) Q_DECL_NOTHROW;
+ void swap(QCoapResource &other) noexcept;
QHostAddress host() const;
QString path() const;
diff --git a/src/coap/qcoapsecurityconfiguration.cpp b/src/coap/qcoapsecurityconfiguration.cpp
index 5fb8b26..c9dba57 100644
--- a/src/coap/qcoapsecurityconfiguration.cpp
+++ b/src/coap/qcoapsecurityconfiguration.cpp
@@ -123,7 +123,7 @@ QCoapPrivateKey::QCoapPrivateKey(const QCoapPrivateKey &other)
Move-constructs a QCoapPrivateKey, making it point to the same
object as \a other was pointing to.
*/
-QCoapPrivateKey::QCoapPrivateKey(QCoapPrivateKey &&other) Q_DECL_NOTHROW
+QCoapPrivateKey::QCoapPrivateKey(QCoapPrivateKey &&other) noexcept
: d(other.d)
{
other.d = nullptr;
@@ -236,7 +236,7 @@ QCoapSecurityConfiguration::QCoapSecurityConfiguration(const QCoapSecurityConfig
object as \a other was pointing to.
*/
QCoapSecurityConfiguration::QCoapSecurityConfiguration(
- QCoapSecurityConfiguration &&other) Q_DECL_NOTHROW
+ QCoapSecurityConfiguration &&other) noexcept
: d(other.d)
{
other.d = nullptr;
diff --git a/src/coap/qcoapsecurityconfiguration.h b/src/coap/qcoapsecurityconfiguration.h
index d91ac52..f935b5e 100644
--- a/src/coap/qcoapsecurityconfiguration.h
+++ b/src/coap/qcoapsecurityconfiguration.h
@@ -49,14 +49,14 @@ public:
QCoapPrivateKey(const Qt::HANDLE &handle);
QCoapPrivateKey(const QCoapPrivateKey& other);
- QCoapPrivateKey(QCoapPrivateKey&& other) Q_DECL_NOTHROW;
+ QCoapPrivateKey(QCoapPrivateKey&& other) noexcept;
~QCoapPrivateKey();
- QCoapPrivateKey &operator=(QCoapPrivateKey &&other) Q_DECL_NOTHROW
+ QCoapPrivateKey &operator=(QCoapPrivateKey &&other) noexcept
{ swap(other); return *this; }
QCoapPrivateKey &operator=(const QCoapPrivateKey &other);
- void swap(QCoapPrivateKey &other) Q_DECL_NOTHROW
+ void swap(QCoapPrivateKey &other) noexcept
{ qSwap(d, other.d); }
bool isNull() const;
@@ -78,12 +78,12 @@ public:
QCoapSecurityConfiguration(const QCoapSecurityConfiguration &other);
~QCoapSecurityConfiguration();
- QCoapSecurityConfiguration(QCoapSecurityConfiguration &&other) Q_DECL_NOTHROW;
- QCoapSecurityConfiguration &operator=(QCoapSecurityConfiguration &&other) Q_DECL_NOTHROW
+ QCoapSecurityConfiguration(QCoapSecurityConfiguration &&other) noexcept;
+ QCoapSecurityConfiguration &operator=(QCoapSecurityConfiguration &&other) noexcept
{ swap(other); return *this; }
QCoapSecurityConfiguration &operator=(const QCoapSecurityConfiguration &other);
- void swap(QCoapSecurityConfiguration &other) Q_DECL_NOTHROW
+ void swap(QCoapSecurityConfiguration &other) noexcept
{ qSwap(d, other.d); }
void setPreSharedKeyIdentity(const QByteArray &preSharedKeyIdentity);