From c0c4be672bd652d29a5c8f52e31ad76a1361e320 Mon Sep 17 00:00:00 2001 From: Luca Beldi Date: Tue, 13 Nov 2018 08:54:37 +0000 Subject: Fix constness of QPaintDevice arguments QFont, QFontMetrics, QFontMetricsF and QTextLayout constructors use only const methods of QPaintDevice so there is no reason for them to require a non-const pointer argument Fixes: QTBUG-65967 Change-Id: Ibfcdef2a25f0cd4284dad76135fc4c9bf5667d7a Reviewed-by: Samuel Gaist Reviewed-by: Christian Ehrlicher Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qfont.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gui/text/qfont.h') diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h index 1fe450e002..e86f06353a 100644 --- a/src/gui/text/qfont.h +++ b/src/gui/text/qfont.h @@ -170,8 +170,11 @@ public: QFont(); QFont(const QString &family, int pointSize = -1, int weight = -1, bool italic = false); - QFont(const QFont &, QPaintDevice *pd); - QFont(const QFont &); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + QFont(const QFont &font, QPaintDevice *pd); +#endif + QFont(const QFont &font, const QPaintDevice *pd); + QFont(const QFont &font); ~QFont(); void swap(QFont &other) -- cgit v1.2.3