diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /src/gui/text/qfontmetrics.cpp | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'src/gui/text/qfontmetrics.cpp')
-rw-r--r-- | src/gui/text/qfontmetrics.cpp | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp index 407559ad51..c8dc8d676e 100644 --- a/src/gui/text/qfontmetrics.cpp +++ b/src/gui/text/qfontmetrics.cpp @@ -156,6 +156,8 @@ QFontMetrics::QFontMetrics(const QFont &font) } /*! + \since 5.13 + \fn QFontMetrics::QFontMetrics(const QFont &font, const QPaintDevice *paintdevice) Constructs a font metrics object for \a font and \a paintdevice. The font metrics will be compatible with the paintdevice passed. @@ -168,9 +170,21 @@ QFontMetrics::QFontMetrics(const QFont &font) passed in the constructor at the time it is created, and is not updated if the font's attributes are changed later. */ + +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +/*! + \fn QFontMetrics::QFontMetrics(const QFont &font, QPaintDevice *paintdevice) + \obsolete + Identical to QFontMetrics::QFontMetrics(const QFont &font, const QPaintDevice *paintdevice) +*/ + + QFontMetrics::QFontMetrics(const QFont &font, QPaintDevice *paintdevice) +#else +QFontMetrics::QFontMetrics(const QFont &font, const QPaintDevice *paintdevice) +#endif { - int dpi = paintdevice ? paintdevice->logicalDpiY() : qt_defaultDpi(); + const int dpi = paintdevice ? paintdevice->logicalDpiY() : qt_defaultDpi(); const int screen = 0; if (font.d->dpi != dpi || font.d->screen != screen ) { d = new QFontPrivate(*font.d); @@ -1127,6 +1141,8 @@ QFontMetricsF::QFontMetricsF(const QFont &font) } /*! + \fn QFontMetricsF::QFontMetricsF(const QFont &font, const QPaintDevice *paintdevice) + \since 5.13 Constructs a font metrics object for \a font and \a paintdevice. The font metrics will be compatible with the paintdevice passed. @@ -1139,7 +1155,20 @@ QFontMetricsF::QFontMetricsF(const QFont &font) passed in the constructor at the time it is created, and is not updated if the font's attributes are changed later. */ + + +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +/*! + \fn QFontMetricsF::QFontMetricsF(const QFont &font, QPaintDevice *paintdevice) + \obsolete + Identical to QFontMetricsF::QFontMetricsF(const QFont &font, const QPaintDevice *paintdevice) +*/ + + QFontMetricsF::QFontMetricsF(const QFont &font, QPaintDevice *paintdevice) +#else +QFontMetricsF::QFontMetricsF(const QFont &font, const QPaintDevice *paintdevice) +#endif { int dpi = paintdevice ? paintdevice->logicalDpiY() : qt_defaultDpi(); const int screen = 0; |