summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-04-21 16:25:25 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-05-04 11:27:48 +0000
commite445f3c47bea3e2d3dffa1215b24cb90dccd8c73 (patch)
treec27d983a48b283852dfe9975fddb8fc2854162bb /src/gui/text
parenteb82959d6688f9e58be4b67670afba3649f1f799 (diff)
Add noexcept to move constructors and assignment operators
Add the noexcept attribute to all move constructors and assignment operators in QtGui that didn't already have it. Change-Id: Idcdf79ae8349b8793e7394b5ae7c08e6111fbc9a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfont.h2
-rw-r--r--src/gui/text/qfontmetrics.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h
index cc78ea7f45..72e4197fc5 100644
--- a/src/gui/text/qfont.h
+++ b/src/gui/text/qfont.h
@@ -237,7 +237,7 @@ public:
operator QVariant() const;
bool isCopyOf(const QFont &) const;
#ifdef Q_COMPILER_RVALUE_REFS
- inline QFont &operator=(QFont &&other)
+ inline QFont &operator=(QFont &&other) Q_DECL_NOEXCEPT
{ qSwap(d, other.d); qSwap(resolve_mask, other.resolve_mask); return *this; }
#endif
diff --git a/src/gui/text/qfontmetrics.h b/src/gui/text/qfontmetrics.h
index 12aa2dadb4..65ec219a99 100644
--- a/src/gui/text/qfontmetrics.h
+++ b/src/gui/text/qfontmetrics.h
@@ -58,11 +58,12 @@ public:
QFontMetrics &operator=(const QFontMetrics &);
#ifdef Q_COMPILER_RVALUE_REFS
- inline QFontMetrics &operator=(QFontMetrics &&other)
+ inline QFontMetrics &operator=(QFontMetrics &&other) Q_DECL_NOEXCEPT
{ qSwap(d, other.d); return *this; }
#endif
- void swap(QFontMetrics &other) { qSwap(d, other.d); }
+ void swap(QFontMetrics &other) Q_DECL_NOEXCEPT
+ { qSwap(d, other.d); }
int ascent() const;
int descent() const;