Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.13.0
-
None
-
-
06cc5d307177ebacf8e6926b9690c12703004a1a (qt/qtbase/5.13)
Description
The problem is here: https://code.woboq.org/qt5/qtbase/src/gui/text/qfont.cpp.html#_ZN5QFont10fromStringERK7QString
const auto l = descrip.splitRef(QLatin1Char(','));
should be
const auto l = descrip.splitRef(QLatin1Char(','), QString::SkipEmptyParts);
Presumably this is a bug, since the next few lines of this function test if count() == 0. And of course, please add tests for this function being passed empty strings. Super easy to encounter when reading from QSettings.
It probably affects much more than just 5.13.0 and Windows, but that's all I tested.
Attachments
For Gerrit Dashboard: QTBUG-78236 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
274119,6 | Ensure that QFont::fromString() doesn't parse empty font specifications | 5.13 | qt/qtbase | Status: MERGED | +2 | 0 |