Skip to content

Commit

Permalink
[QFontDatabase] Get rid of some dead code
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
KonstantinRitt committed May 1, 2015
1 parent af217e6 commit 9bf6ea7
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/gui/text/qfontdatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9bf6ea7

Please sign in to comment.