Back in 36cb3f3f65, we started
properly reference counting font engines as they were entered into
the font cache. Prior to this, ref.load == 0 would mean that the
engine was essentially owned by the cache.
When the change was made, the condition that an engine must be in
use if its reference is != 0 remained, and the result of this was
used to calculate the limit for when the cache should be flushed.
Since this limit was miscalculated, the cache would keep growing,
even if it only contained unused font engines.
[ChangeLog][QtGui][Text] Fixed a bug which could cause the font
cache to grow larger than it was supposed to.
Task-number: QTBUG-76219
Change-Id: I4d1541756f3bdf5bd9b0301bf47c6db2e220716a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>