diff options
Diffstat (limited to 'src/gui/text/qfont_p.h')
-rw-r--r-- | src/gui/text/qfont_p.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h index b5e753e246..4cbf51d59c 100644 --- a/src/gui/text/qfont_p.h +++ b/src/gui/text/qfont_p.h @@ -57,7 +57,6 @@ #include "QtCore/qmap.h" #include "QtCore/qobject.h" #include "QtCore/qstringlist.h" -#include <private/qunicodetables_p.h> #include <QtGui/qfontdatabase.h> #include "private/qfixed_p.h" @@ -143,7 +142,7 @@ public: QAtomicInt ref; QFontCache *fontCache; - QFontEngine *engines[QUnicodeTables::ScriptCount]; + QFontEngine *engines[QChar::ScriptCount]; }; @@ -194,9 +193,8 @@ private: }; -class QFontCache : public QObject +class Q_AUTOTEST_EXPORT QFontCache : public QObject { - Q_OBJECT public: // note: these static functions work on a per-thread basis static QFontCache *instance(); @@ -206,8 +204,7 @@ public: ~QFontCache(); void clear(); - // universal key structure. QFontEngineDatas and QFontEngines are cached using - // the same keys + struct Key { Key() : script(0), screen(0) { } Key(const QFontDef &d, int c, int s = 0) @@ -246,13 +243,14 @@ public: typedef QMap<Key,Engine> EngineCache; EngineCache engineCache; + QHash<QFontEngine *, int> engineCacheCount; QFontEngine *findEngine(const Key &key); void updateHitCountAndTimeStamp(Engine &value); void insertEngine(const Key &key, QFontEngine *engine, bool insertMulti = false); - private: +private: void increaseCost(uint cost); void decreaseCost(uint cost); void timerEvent(QTimerEvent *event); |