Skip to content

Commit

Permalink
refactor: use KIconEngine instead
Browse files Browse the repository at this point in the history
  • Loading branch information
BLumia committed Mar 11, 2023
1 parent 1422523 commit fc88b79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions iconengineplugins/diconproxyengine/diconproxyengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include <QPixmap>
#include <QDebug>
#include <QDir>
#include <KIconLoader>
#include <KIconEngine>

#include <private/qiconloader_p.h>
#include <private/qguiapplication_p.h>
Expand Down Expand Up @@ -57,8 +59,9 @@ static QIconEngine *createIconEngineWithKey(const QString &iconName, const QStri

static inline QIconEngine *createXdgProxyIconEngine(const QString &iconName)
{
const QString &key(qEnvironmentVariable("D_PROXY_ICON_ENGINE", QLatin1String("XdgIconProxyEngine")));
return createIconEngineWithKey(iconName, key);
return new KIconEngine(iconName, KIconLoader::global());
// const QString &key(qEnvironmentVariable("D_PROXY_ICON_ENGINE", QLatin1String("XdgIconProxyEngine")));
// return createIconEngineWithKey(iconName, key);
}

static inline QIconEngine *createDciIconEngine(const QString &iconName)
Expand Down
2 changes: 1 addition & 1 deletion iconengineplugins/diconproxyengine/diconproxyengine.pro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SOURCES += main.cpp \
diconproxyengine.cpp
OTHER_FILES += diconproxyengine.json

QT += dtkgui
QT += dtkgui KIconThemes
DESTDIR = $$_PRO_FILE_PWD_/../../bin/plugins/iconengines/

unix {
Expand Down

0 comments on commit fc88b79

Please sign in to comment.