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

refactor: use KIconEngine instead #129

Closed
wants to merge 1 commit into from
Closed
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
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
10 changes: 8 additions & 2 deletions platformthemeplugin/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@
#include <qpa/qplatformthemeplugin.h>
#include "qdeepintheme.h"

#include <private/xdgiconloader/xdgiconloader_p.h>
//#include <private/xdgiconloader/xdgiconloader_p.h>

#include <QDBusConnection>
#include <QDBusMessage>

QT_BEGIN_NAMESPACE

void updateXdgIconSystemTheme()
{
XdgIconLoader::instance()->updateSystemTheme();
// XdgIconLoader::instance()->updateSystemTheme();
QDBusMessage message = QDBusMessage::createSignal(QStringLiteral("/KIconLoader"), QStringLiteral("org.kde.KIconLoader"), QStringLiteral("iconChanged"));
message << 0;
QDBusConnection::sessionBus().send(message);
}

class QDeepinThemePlugin : public QPlatformThemePlugin
Expand Down
Loading