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

sync: from linuxdeepin/dtkgui #12

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.13)
cmake_minimum_required(VERSION 3.25)

set(DTK_VERSION "5.6.11" CACHE STRING "define project version")
project(DtkGui
Expand Down
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