From 5f472cae71e3f1451d4b78fa9b65f7b15b9a1be1 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Mon, 25 Jan 2016 09:46:55 +0400 Subject: QFontCache: Centralize the engine type safety check We depend on the assumption QFontCache::findEngine(key) for key.multi=1 returns a font engine of type QFontEngine::Multi; guarantee that by checking it in a single place. Change-Id: I287da4fd62deb22fc5520cde5b0505bc44547609 Reviewed-by: Eskil Abrahamsen Blomfeldt --- tests/auto/gui/text/qfontcache/tst_qfontcache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/gui/text/qfontcache/tst_qfontcache.cpp b/tests/auto/gui/text/qfontcache/tst_qfontcache.cpp index 272827e57b..c92b7eed58 100644 --- a/tests/auto/gui/text/qfontcache/tst_qfontcache.cpp +++ b/tests/auto/gui/text/qfontcache/tst_qfontcache.cpp @@ -110,7 +110,7 @@ void tst_QFontCache::clear() fontEngine->ref.ref(); // cache the engine once again; there is a special case when the engine is cached more than once - QFontCache::instance()->insertEngine(QFontCache::Key(QFontDef(), 0, 0), fontEngine); + QFontCache::instance()->insertEngine(QFontCache::Key(QFontDef(), 0, 1), fontEngine); } // use it: -- cgit v1.2.3