diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-02-17 11:35:58 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-02-18 15:45:03 +0000 |
commit | 8fa8f4dab059a5e77313bcc599d421bde40bc4e8 (patch) | |
tree | eefb86cfc199c451778923246e190f549797513d | |
parent | bb1a550d583fa938386cab210437697921876493 (diff) |
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 <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit c0b67256740e98a9071885284edb8ae0e69640dc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/gui/text/qfont.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h index f9af52f537..fa17011fe2 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 |