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#221
  • Loading branch information
deepin-ci-robot committed Jan 22, 2024
1 parent 740cea5 commit 303e780
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/util/dicontheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include <private/qguiapplication_p.h>
#include <private/qiconloader_p.h>
#endif
#include "dplatformtheme.h"
#include "dguiapplicationhelper.h"

#include <DStandardPaths>

Expand Down Expand Up @@ -176,7 +178,8 @@ void DIconTheme::Cached::clear()

QIcon DIconTheme::Cached::findQIcon(const QString &iconName, Options options, const QIcon &fallback)
{
const QString cacheKey = iconName + QChar('/') + QString::number(static_cast<int>(options));
const QString themeName = DGuiApplicationHelper::instance()->applicationTheme()->iconThemeName();
const QString cacheKey = themeName + QLatin1Char('/') + iconName + QChar('/') + QString::number(static_cast<int>(options));
if (data->cache.contains(cacheKey)) {
auto cacheIcon = data->cache.object(cacheKey);
if (cacheIcon->isNull())
Expand Down

0 comments on commit 303e780

Please sign in to comment.