Cache QTextLayout objects with Qt/Mac

It seems that the internal Qt5 caching does not work well here,
especially in the case of Herbrew documents.
This commit is contained in:
Jean-Marc Lasgouttes 2017-04-18 14:02:31 +02:00
parent 9119a5e3d1
commit 5354c64b27

View File

@ -61,7 +61,8 @@ namespace frontend {
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
#if (QT_VERSION < 0x050000)
// but it does not seem to work well on MacOS X.
#if (QT_VERSION < 0x050000) || defined(Q_OS_MAC)
int cache_metrics_qtextlayout_size = 500;
#else
int cache_metrics_qtextlayout_size = 0;