From 8fa8f4dab059a5e77313bcc599d421bde40bc4e8 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 17 Feb 2021 11:35:58 +0100 Subject: [PATCH] Make constructing QFont from families explicit Disallow implicit conversion from QStringList to QFont. Address API review comment. Change-Id: I73eb3a49182865e050965e97d459463e73bcddfd Reviewed-by: Eskil Abrahamsen Blomfeldt (cherry picked from commit c0b67256740e98a9071885284edb8ae0e69640dc) Reviewed-by: Qt Cherry-pick Bot --- src/gui/text/qfont.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h index f9af52f537f..fa17011fe27 100644 --- a/src/gui/text/qfont.h +++ b/src/gui/text/qfont.h @@ -168,7 +168,7 @@ public: QFont(); QFont(const QString &family, int pointSize = -1, int weight = -1, bool italic = false); - QFont(const QStringList &families, int pointSize = -1, int weight = -1, bool italic = false); + explicit QFont(const QStringList &families, int pointSize = -1, int weight = -1, bool italic = false); #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QFont(const QFont &font, QPaintDevice *pd); #endif