Skip to content

Commit

Permalink
sync: from linuxdeepin/dtkgui
Browse files Browse the repository at this point in the history
Synchronize source files from linuxdeepin/dtkgui.

Source-pull-request: linuxdeepin/dtkgui#213
  • Loading branch information
deepin-ci-robot committed Dec 19, 2023
1 parent d96aef2 commit 20cffff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
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

0 comments on commit 20cffff

Please sign in to comment.