From: Jean-Marc Lasgouttes Date: Tue, 21 Feb 2017 05:50:48 +0000 (+0100) Subject: Move comment X-Git-Tag: 2.3.0alpha1~344 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5211ca52cac2ad7a6669d15c39f2cee172d18323;p=features.git Move comment It is slightly more useful here. --- diff --git a/src/frontends/qt4/GuiFontMetrics.cpp b/src/frontends/qt4/GuiFontMetrics.cpp index 31c45481ae..33df3cf126 100644 --- a/src/frontends/qt4/GuiFontMetrics.cpp +++ b/src/frontends/qt4/GuiFontMetrics.cpp @@ -51,6 +51,13 @@ namespace lyx { namespace frontend { +/* + * Limit (strwidth|breakat)_cache_ size to 512kB of string data. + * Limit qtextlayout_cache_ size to 500 elements (we do not know the + * size of the QTextLayout objects anyway). + * Note that all these numbers are arbitrary. + * Also, setting size to 0 is tantamount to disabling the cache. + */ int cache_metrics_width_size = 1 << 19; int cache_metrics_breakat_size = 1 << 19; // Qt 5.x already has its own caching of QTextLayout objects @@ -83,12 +90,6 @@ inline QChar const ucs4_to_qchar(char_type const ucs4) } // anon namespace -/* - * Limit (strwidth|breakat)_cache_ size to 512kB of string data. - * Limit qtextlayout_cache_ size to 500 elements (we do not know the - * size of the QTextLayout objects anyway). - * Note that all these numbers are arbitrary. - */ GuiFontMetrics::GuiFontMetrics(QFont const & font) : font_(font), metrics_(font, 0), strwidth_cache_(cache_metrics_width_size),