Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: xdg icon loading failed with qt6 #213

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/util/private/diconproxyengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,13 @@ void DIconProxyEngine::ensureEngine()
m_iconEngine = createDBuiltinIconEngine(m_iconName);
}
#ifdef DTK_DISABLE_LIBXDG
if (!m_iconEngine && Q_UNLIKELY(!m_option.testFlag(DIconTheme::DontFallbackToQIconFromTheme)) && QGuiApplicationPrivate::platformTheme() ) {
// Warning : do not call from qplatformTheme createIconEngine (stackoverflow)
m_iconEngine = QGuiApplicationPrivate::platformTheme()->createIconEngine(m_iconName);
if (!m_iconEngine && Q_UNLIKELY(!m_option.testFlag(DIconTheme::DontFallbackToQIconFromTheme))) {
// fallback to QPlatformTheme::createIconEngine ==> QIconLoaderEngine
QPlatformTheme * const platformTheme = QGuiApplicationPrivate::platformTheme();
bool hasUserTheme = QIconLoader::instance()->hasUserTheme();
if (platformTheme && !hasUserTheme) {
m_iconEngine = platformTheme->QPlatformTheme::createIconEngine(m_iconName);
}
}
#else
if (!m_iconEngine ) {
Expand Down