diff options
| author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-03-28 15:05:32 +0200 |
|---|---|---|
| committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-04-22 15:27:43 +0200 |
| commit | 656dde05e870cc44297da8d54d73d4bbc6724c89 (patch) | |
| tree | 9e23bc1eb2fd15d432eda56ea5e7920c94ae4607 /src/testlib/doc/snippets/code/code.pro | |
| parent | 396190686c4d1162953badf90f9aab9992bd1e76 (diff) | |
QFontDatabase: Allow partially populating the font database
We were using the count of the registered families as the way to
determine if the font database had been populated yet. As a result
we needed to invalidate the font database every time an application
font was added to an empty database, as once the application font
was added, the font database was no longer empty, and we would end
up failing to populate any of the system/platform fonts.
We now have a dedicated flag for tracking whether the font database
has been populated, and we track whether an application font has been
populated by looking at its properties list, avoiding a second round
of populating when the full initialization happens.
This also opens up the possibility of the platform font database
populating (lazily or fully) fonts up front, for example as part
of resolving theme fonts.
The Windows font database had to be taught to invalidate itself
at the right moment, instead of assuming doing so during populate
was okey.
Change-Id: I80c893df755d8d35fb8a84dd7a83c6756a8f24a2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/testlib/doc/snippets/code/code.pro')
0 files changed, 0 insertions, 0 deletions
