summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-04-09 13:33:15 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-04-09 14:48:42 +0000
commit95f787bfdc890c259e8b347bdad9123d534efe0f (patch)
treeda996356102a4ebf953d662c81442a82ebed27fd /src/corelib
parent434c866e1b76c12b3bf3dcdd76a00f4d29aa64d3 (diff)
Replace Q_DECL_NOTHROW with noexcept the remaining places
The first replacement had missed objective-C++ code some places ourside the src dir. In C-files Q_DECL_NOTHROW is replaced with Q_DECL_NOEXCEPT as we still need to turn it off when compiled in C mode, but can get rid of the old NOTHROW moniker. Change-Id: I6370f57066679c5120d0265a69e7e378e09d4759 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qfloat16_f16c.c4
-rw-r--r--src/corelib/kernel/qcore_foundation.mm18
-rw-r--r--src/corelib/kernel/qcore_mac_objc.mm2
3 files changed, 12 insertions, 12 deletions
diff --git a/src/corelib/global/qfloat16_f16c.c b/src/corelib/global/qfloat16_f16c.c
index a7eadc71b7..ba1e16f481 100644
--- a/src/corelib/global/qfloat16_f16c.c
+++ b/src/corelib/global/qfloat16_f16c.c
@@ -54,7 +54,7 @@ extern "C" {
#endif
QT_FUNCTION_TARGET(F16C)
-void qFloatToFloat16_fast(quint16 *out, const float *in, qsizetype len) Q_DECL_NOTHROW
+void qFloatToFloat16_fast(quint16 *out, const float *in, qsizetype len) Q_DECL_NOEXCEPT
{
qsizetype i = 0;
int epilog_i;
@@ -70,7 +70,7 @@ void qFloatToFloat16_fast(quint16 *out, const float *in, qsizetype len) Q_DECL_N
}
QT_FUNCTION_TARGET(F16C)
-void qFloatFromFloat16_fast(float *out, const quint16 *in, qsizetype len) Q_DECL_NOTHROW
+void qFloatFromFloat16_fast(float *out, const quint16 *in, qsizetype len) Q_DECL_NOEXCEPT
{
qsizetype i = 0;
int epilog_i;
diff --git a/src/corelib/kernel/qcore_foundation.mm b/src/corelib/kernel/qcore_foundation.mm
index 56eabc4b8c..623d462749 100644
--- a/src/corelib/kernel/qcore_foundation.mm
+++ b/src/corelib/kernel/qcore_foundation.mm
@@ -501,7 +501,7 @@ NSTimeZone *QTimeZone::toNSTimeZone() const
\sa QRectF::fromCGRect()
*/
-CGRect QRect::toCGRect() const Q_DECL_NOTHROW
+CGRect QRect::toCGRect() const noexcept
{
return CGRectMake(x(), y(), width(), height());
}
@@ -513,7 +513,7 @@ CGRect QRect::toCGRect() const Q_DECL_NOTHROW
\sa fromCGRect()
*/
-CGRect QRectF::toCGRect() const Q_DECL_NOTHROW
+CGRect QRectF::toCGRect() const noexcept
{
return CGRectMake(x(), y(), width(), height());
}
@@ -525,7 +525,7 @@ CGRect QRectF::toCGRect() const Q_DECL_NOTHROW
\sa toCGRect()
*/
-QRectF QRectF::fromCGRect(CGRect rect) Q_DECL_NOTHROW
+QRectF QRectF::fromCGRect(CGRect rect) noexcept
{
return QRectF(rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);
}
@@ -539,7 +539,7 @@ QRectF QRectF::fromCGRect(CGRect rect) Q_DECL_NOTHROW
\sa QPointF::fromCGPoint()
*/
-CGPoint QPoint::toCGPoint() const Q_DECL_NOTHROW
+CGPoint QPoint::toCGPoint() const noexcept
{
return CGPointMake(x(), y());
}
@@ -551,7 +551,7 @@ CGPoint QPoint::toCGPoint() const Q_DECL_NOTHROW
\sa fromCGPoint()
*/
-CGPoint QPointF::toCGPoint() const Q_DECL_NOTHROW
+CGPoint QPointF::toCGPoint() const noexcept
{
return CGPointMake(x(), y());
}
@@ -563,7 +563,7 @@ CGPoint QPointF::toCGPoint() const Q_DECL_NOTHROW
\sa toCGPoint()
*/
-QPointF QPointF::fromCGPoint(CGPoint point) Q_DECL_NOTHROW
+QPointF QPointF::fromCGPoint(CGPoint point) noexcept
{
return QPointF(point.x, point.y);
}
@@ -577,7 +577,7 @@ QPointF QPointF::fromCGPoint(CGPoint point) Q_DECL_NOTHROW
\sa QSizeF::fromCGSize()
*/
-CGSize QSize::toCGSize() const Q_DECL_NOTHROW
+CGSize QSize::toCGSize() const noexcept
{
return CGSizeMake(width(), height());
}
@@ -589,7 +589,7 @@ CGSize QSize::toCGSize() const Q_DECL_NOTHROW
\sa fromCGSize()
*/
-CGSize QSizeF::toCGSize() const Q_DECL_NOTHROW
+CGSize QSizeF::toCGSize() const noexcept
{
return CGSizeMake(width(), height());
}
@@ -601,7 +601,7 @@ CGSize QSizeF::toCGSize() const Q_DECL_NOTHROW
\sa toCGSize()
*/
-QSizeF QSizeF::fromCGSize(CGSize size) Q_DECL_NOTHROW
+QSizeF QSizeF::fromCGSize(CGSize size) noexcept
{
return QSizeF(size.width, size.height);
}
diff --git a/src/corelib/kernel/qcore_mac_objc.mm b/src/corelib/kernel/qcore_mac_objc.mm
index 6687eb88a5..6b51eb65d9 100644
--- a/src/corelib/kernel/qcore_mac_objc.mm
+++ b/src/corelib/kernel/qcore_mac_objc.mm
@@ -371,7 +371,7 @@ bool operator<(const KeyPair &entry, const Qt::Key &key)
struct qtKey2CocoaKeySortLessThan
{
typedef bool result_type;
- Q_DECL_CONSTEXPR result_type operator()(const KeyPair &entry1, const KeyPair &entry2) const Q_DECL_NOTHROW
+ Q_DECL_CONSTEXPR result_type operator()(const KeyPair &entry1, const KeyPair &entry2) const noexcept
{
return entry1.qtKey < entry2.qtKey;
}