From 9bf6ea7fde7228c8fcc669162969120a356b4d15 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Fri, 24 Apr 2015 05:29:07 +0400 Subject: [QFontDatabase] Get rid of some dead code 1. Checking if `db->count == 0` inside the `for (int x = 0; x < db->count; ++x)` loop makes absolutely no sense; 2. The family gets loaded just a line above (ensurePopulated()). Change-Id: I72dbd42565c4f5a5d9ff8879f10ee0ece7298fa7 Reviewed-by: Simon Hausmann --- src/gui/text/qfontdatabase.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 0f3cb21c70..af3fe72948 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -1181,9 +1181,6 @@ static int match(int script, const QFontDef &request, test.family->ensurePopulated(); - if (family_name.isEmpty()) - load(test.family->name, script); - // Check if family is supported in the script we want if (writingSystem != QFontDatabase::Any && !(test.family->writingSystems[writingSystem] & QtFontFamily::Supported)) continue; -- cgit v1.2.3