diff --git a/src/kmainwindow.cpp b/src/kmainwindow.cpp --- a/src/kmainwindow.cpp +++ b/src/kmainwindow.cpp @@ -239,6 +239,23 @@ sMemberList()->append(q); + // Set the icon theme fallback to breeze + // Most of our apps use "lots" of icons that most of the times + // are only available with breeze, we still honour the user icon + // theme but if the icon is not found there, we go to breeze + // since it's almost sure it'll be there. + // Doing this as Q_COREAPP_STARTUP_FUNCTION is too soon as + // at that point QPlatformTheme is not instantiated yet and + // breaks the internal status of QIconLoader + // see https://bugreports.qt.io/browse/QTBUG-74252 +#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) + static bool s_fallbackThemeInitialized = false; + if (!s_fallbackThemeInitialized) { + QIcon::setFallbackThemeName(QStringLiteral("breeze")); + s_fallbackThemeInitialized = true; + } +#endif + // If application is translated, load translator information for use in // KAboutApplicationDialog or other getters. The context and messages below // both must be exactly as listed, and are forced to be loaded from the