diff options
author | Janne Juntunen <janne.juntunen@qt.io> | 2022-06-14 15:01:43 +0300 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-06-17 16:02:34 +0000 |
commit | a6081a816327d9c408f50decf5cf7f8d3980313d (patch) | |
tree | ce5ff0d7ec888b29283cdaf31631a64366568aa5 /src/gui | |
parent | f0a24e982508d219e8c0f9aeb1927ad913366030 (diff) |
QFont: remove support for comma split setFamily()
In the documentation it is said that from Qt 6.2 onwards setFamily()
only sets a single family but so far this hasn't been the case.
Fixes: QTBUG-102768
Change-Id: I2a5037ea1385cb8c6644d1e256b89e167c590967
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit a2cb9ae8cc6c512e9c16f3fecc79dad9d585948a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/text/qfont.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index c75a984e1e..9b749f432c 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -798,22 +798,11 @@ QString QFont::family() const available a family will be set using the \l{QFont}{font matching} algorithm. - This will split the family string on a comma and call setFamilies() with the - resulting list. To preserve a font that uses a comma in it's name then use - setFamilies() directly. From Qt 6.2 this behavior will no longer happen and - \a family will be passed as a single family. - \sa family(), setStyleHint(), setFamilies(), families(), QFontInfo */ void QFont::setFamily(const QString &family) { -#ifdef QT_DEBUG - if (family.contains(u',')) { - qWarning("From Qt 6.2, QFont::setFamily() will no long split the family string on the comma" - " and will keep it as a single family"); - } -#endif - setFamilies(splitIntoFamilies(family)); + setFamilies(QStringList(family)); } /*! |