diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 5d72a7b909..00e4567472 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -2188,12 +2188,12 @@ int QFontDatabasePrivate::addAppFont(const QByteArray &fontData, const QString & applicationFonts[i] = font; - emit qApp->fontDatabaseChanged(); - // The font cache may have cached lookups for the font that was now // loaded, so it has to be flushed. QFontCache::instance()->clear(); + emit qApp->fontDatabaseChanged(); + return i; }