summaryrefslogtreecommitdiff
path: root/src/gui/text/qfont.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-02-02 15:57:44 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-02-02 15:57:44 +0100
commitd3e6e732c70ebc2340d6376d727b3c623be23810 (patch)
tree18d469f02ac36edd04b87a9bfa4886ceef0490f0 /src/gui/text/qfont.cpp
parentfdfd63053ae6b10af06553be3c1b15de274bebf7 (diff)
parentba8d3430029d8c4342e9a47c110ee8c9879818f4 (diff)
downloadqtbase-d3e6e732c70ebc2340d6376d727b3c623be23810.tar.gz
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: config.tests/unix/compile.test src/plugins/platforms/cocoa/qcocoahelpers.mm src/tools/qlalr/cppgenerator.cpp Change-Id: I0103ca076a9aca7118b2fd99f0fdaf81055998c3
Diffstat (limited to 'src/gui/text/qfont.cpp')
-rw-r--r--src/gui/text/qfont.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 16e88dad5f..089104665f 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -2815,6 +2815,10 @@ QFontEngine *QFontCache::findEngine(const Key &key)
EngineCache::Iterator it = engineCache.find(key),
end = engineCache.end();
if (it == end) return 0;
+
+ Q_ASSERT(it.value().data != Q_NULLPTR);
+ Q_ASSERT(key.multi == (it.value().data->type() == QFontEngine::Multi));
+
// found... update the hitcount and timestamp
updateHitCountAndTimeStamp(it.value());
@@ -2835,6 +2839,9 @@ void QFontCache::updateHitCountAndTimeStamp(Engine &value)
void QFontCache::insertEngine(const Key &key, QFontEngine *engine, bool insertMulti)
{
+ Q_ASSERT(engine != Q_NULLPTR);
+ Q_ASSERT(key.multi == (engine->type() == QFontEngine::Multi));
+
#ifdef QFONTCACHE_DEBUG
FC_DEBUG("QFontCache: inserting new engine %p, refcount %d", engine, engine->ref.load());
if (!insertMulti && engineCache.contains(key)) {