From f6f517bc5442f8c649ed18136d099d9ae1092a22 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 5 Apr 2012 14:49:02 +0200 Subject: QtGui: add member-swap to shared classes Implemented as in other shared classes (e.g. QPen). Change-Id: I5b96d4a4795870d6252aa53de6fbaedde7c0095a Reviewed-by: Gunnar Sletta --- src/gui/text/qfontmetrics.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gui/text/qfontmetrics.h') diff --git a/src/gui/text/qfontmetrics.h b/src/gui/text/qfontmetrics.h index e48460ffd0..3de7011cde 100644 --- a/src/gui/text/qfontmetrics.h +++ b/src/gui/text/qfontmetrics.h @@ -72,6 +72,8 @@ public: { qSwap(d, other.d); return *this; } #endif + void swap(QFontMetrics &other) { qSwap(d, other.d); } + int ascent() const; int descent() const; int height() const; @@ -139,6 +141,9 @@ public: inline QFontMetricsF &operator=(QFontMetricsF &&other) { qSwap(d, other.d); return *this; } #endif + + void swap(QFontMetricsF &other) { qSwap(d, other.d); } + qreal ascent() const; qreal descent() const; qreal height() const; -- cgit v1.2.3