[KMainWindow] Invoke QIcon::setFallbackThemeName (later)

Authored by poboiko on May 22 2020, 9:15 AM.

Description

[KMainWindow] Invoke QIcon::setFallbackThemeName (later)

Summary:
This is alternative approach to D22488: invoke QIcon::setFallbackThemeName a bit later and commit 4214045 to KIconThemes.
Okular (and most - if not all - KDE apps) inherit KMainWindow, so KDE apps
should have breeze icons). KMainWindow ctor should be early enough so no icons
are yet loaded, but late enough so QGuiApplication is already inited.

This should be followed by reverting commit 4214045 in KIconThemes.

Original problem description (by @mart):
invoking QIcon::setFallbackThemeName at QCoreApplication ctor
with Q_COREAPP_STARTUP_FUNCTION breaks the internal status of
QIconLoader as it instantiates it before the QPlatformTheme,
but QIconLoader depends from QPlatformTheme to be already instantiated
otherwise it won't load correctly, thus breaking icon loading
in QtQuickControls2 styles, such as Material and Fusion
see https://bugreports.qt.io/browse/QTBUG-74252

CCBUG: 402172

Test Plan:
Don't have GTK3 QPA plugin, so cannot test it yet.
I would appreciate if someone helped me with testing :)

Reviewers: aacid, mart, broulik

Subscribers: mart, kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D29826

Details

Committed
poboikoJun 4 2020, 10:03 PM
Differential Revision
D29826: [KMainWindow] Invoke QIcon::setFallbackThemeName (later)
Parents
R263:08ab5437ef7b: GIT_SILENT: we don't use phabricator anymore
Branches
Unknown
Tags
Unknown