diff options
Diffstat (limited to 'src/gui/text/qfont.cpp')
-rw-r--r-- | src/gui/text/qfont.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index 258a9ba675..27d804a3b4 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -562,14 +562,25 @@ QFontEngineData::~QFontEngineData() \since 5.2 */ +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) /*! + \obsolete Constructs a font from \a font for use on the paint device \a pd. */ QFont::QFont(const QFont &font, QPaintDevice *pd) + : QFont(font, static_cast<const QPaintDevice*>(pd)) +{} +#endif + +/*! + \since 5.13 + Constructs a font from \a font for use on the paint device \a pd. +*/ +QFont::QFont(const QFont &font, const QPaintDevice *pd) : resolve_mask(font.resolve_mask) { - Q_ASSERT(pd != 0); - int dpi = pd->logicalDpiY(); + Q_ASSERT(pd); + const int dpi = pd->logicalDpiY(); const int screen = 0; if (font.d->dpi != dpi || font.d->screen != screen ) { d = new QFontPrivate(*font.d); |