summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontmetrics.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qfontmetrics.h')
-rw-r--r--src/gui/text/qfontmetrics.h5
1 files changed, 5 insertions, 0 deletions
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;