Commit 06b7166
committed
Fix crash in QFont::exactMatch() with different family counts
This amends d8602ce.
This change prepared for removing the singular family from the
QFontDef, making the families list the only way to store family
names.
Before this, there was some intricate logic here to support when
both family and families were set. The idea was to make it
possible to match a QFont where family was set to a QFont where
a single family had been added to families. For all other
cases where the families lists had different lengths, we would
return false.
Since this was no longer needed, the code was removed, but it
also accidentally introduced a crash when the sizes of the two
families lists were different.
This simply puts back the check for different family counts
and returns false if they are different like before.
Pick-to: 6.5 6.8 6.9 6.10
Fixes: QTBUG-138561
Change-Id: I864c19105dc5d582a43023e71e46b1efb29cbc21
Reviewed-by: Andy Shaw <andy.shaw@qt.io>1 parent 0b3d7b9 commit 06b7166
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
| |||
0 commit comments