diff options
Diffstat (limited to 'src/gui/text/qtextlayout.h')
-rw-r--r-- | src/gui/text/qtextlayout.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gui/text/qtextlayout.h b/src/gui/text/qtextlayout.h index 67bc75a6b8..a29791534e 100644 --- a/src/gui/text/qtextlayout.h +++ b/src/gui/text/qtextlayout.h @@ -107,7 +107,19 @@ public: // does itemization QTextLayout(); QTextLayout(const QString& text); - QTextLayout(const QString& text, const QFont &font, QPaintDevice *paintdevice = nullptr); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + QTextLayout(const QString &text, const QFont &font, QPaintDevice *paintdevice = nullptr); +#ifndef Q_QDOC + // the template is necessary to make QTextLayout(font,text,nullptr) and QTextLayout(font,text,NULL) + // not ambiguous. Implementation detail that should not be documented. + template<char = 0> +#endif + QTextLayout(const QString &text, const QFont &font, const QPaintDevice *paintdevice) + : QTextLayout(text, font, const_cast<QPaintDevice*>(paintdevice)) + {} +#else + QTextLayout(const QString &text, const QFont &font, const QPaintDevice *paintdevice = nullptr); +#endif QTextLayout(const QTextBlock &b); ~QTextLayout(); |