diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2014-02-07 04:58:14 +0100 |
---|---|---|
committer | Dominik Holland <dominik.holland@qt.io> | 2020-06-08 13:23:21 +0200 |
commit | a85c7342ad7592f44727cfc4b9a4ed3b1442bb2a (patch) | |
tree | 745a2fc78463c12289b239403d2d0296b75d1bcd /src | |
parent | 38096a3d7040edac4f769270d2402ff4e39d7694 (diff) |
Make the QFontCache size configurable
It can be configured using the QFONTCACHE_MIN_COST
define when configuring Qt.
Change-Id: I41fb781099c4c0f03c378f10c8db4ea06ef4e9ff
Task-number: QTBUG-83127
Reviewed-by: Risto Avila <risto.avila@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/qfont.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index 5972a80d51..0caffbea09 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -2648,8 +2648,10 @@ static const int fast_timeout = 10000; // 10s static const int slow_timeout = 300000; // 5m #endif // QFONTCACHE_DEBUG -const uint QFontCache::min_cost = 4*1024; // 4mb - +#ifndef QFONTCACHE_MIN_COST +# define QFONTCACHE_MIN_COST 4*1024 // 4mb +#endif +const uint QFontCache::min_cost = QFONTCACHE_MIN_COST; Q_GLOBAL_STATIC(QThreadStorage<QFontCache *>, theFontCache) QFontCache *QFontCache::instance() |