QFontDatabase: Simplify and standardize emit of fontDatabaseChanged signal

Change-Id: Iabb637b52de225bf8823b1c3089e50db932c0b85
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
Tor Arne Vestbø 2022-03-28 15:10:26 +02:00
parent a84b96a5bc
commit 0709803416

View File

@ -315,7 +315,7 @@ void QFontDatabasePrivate::invalidate()
fallbacksCache.clear();
clearFamilies();
QGuiApplicationPrivate::platformIntegration()->fontDatabase()->invalidate();
emit static_cast<QGuiApplication *>(QCoreApplication::instance())->fontDatabaseChanged();
emit qGuiApp->fontDatabaseChanged();
}
QtFontFamily *QFontDatabasePrivate::family(const QString &f, FamilyRequestFlags flags)
@ -2179,7 +2179,7 @@ int QFontDatabasePrivate::addAppFont(const QByteArray &fontData, const QString &
if (wasEmpty) {
invalidate();
} else {
emit qApp->fontDatabaseChanged();
emit qGuiApp->fontDatabaseChanged();
// The font cache may have cached lookups for the font that was now
// loaded, so it has to be flushed.