From a85c7342ad7592f44727cfc4b9a4ed3b1442bb2a Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Fri, 7 Feb 2014 04:58:14 +0100 Subject: [PATCH] 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 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qfont.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index 5972a80d510..0caffbea09f 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, theFontCache) QFontCache *QFontCache::instance()