Remove dead code.

This logic was introduced as part of change I92dfb39289a359f49caa02c2caf8baf66098fb59
but isn't used anymore.

Change-Id: I5bcfea99a7a2993434e1e978195a70dae52d6cfa
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
This commit is contained in:
Pierre Rossi 2012-03-06 16:42:03 +01:00 committed by Qt by Nokia
parent d78fab531a
commit a44da8fc12
4 changed files with 0 additions and 32 deletions

View File

@ -2733,20 +2733,6 @@ void QFontCache::updateHitCountAndTimeStamp(Engine &value)
value.data->name());
}
void QFontCache::removeEngine(QFontEngine *engine)
{
EngineCache::iterator it = engineCache.begin();
while (it != engineCache.end()) {
if (it.value().data == engine) {
it = engineCache.erase(it);
if (--engine->cache_count == 0)
decreaseCost(engine->cache_cost);
} else {
++it;
}
}
}
void QFontCache::insertEngine(const Key &key, QFontEngine *engine, bool insertMulti)
{
FC_DEBUG("QFontCache: inserting new engine %p", engine);

View File

@ -245,7 +245,6 @@ public:
void updateHitCountAndTimeStamp(Engine &value);
void insertEngine(const Key &key, QFontEngine *engine, bool insertMulti = false);
void removeEngine(QFontEngine *engine);
private:
void increaseCost(uint cost);

View File

@ -1421,22 +1421,6 @@ bool QFontEngineMulti::shouldLoadFontEngineForCharacter(int at, uint ucs4) const
return true;
}
void QFontEngineMulti::unloadEngine(int at)
{
QFontEngine *fontEngine = engines.at(at);
if (fontEngine == 0)
return;
// If there are other references to the engine, keep it around and keep the reference
if (fontEngine->ref.load() == 1) {
QFontCache::instance()->removeEngine(fontEngine);
if (fontEngine->cache_count == 0) {
delete fontEngine;
engines[at] = 0;
}
}
}
glyph_metrics_t QFontEngineMulti::boundingBox(const QGlyphLayout &glyphs)
{
if (glyphs.numGlyphs <= 0)

View File

@ -401,7 +401,6 @@ protected:
friend class QPSPrintEngineFontMulti;
friend class QRawFont;
virtual void loadEngine(int at) = 0;
virtual void unloadEngine(int at);
QVector<QFontEngine *> engines;
};