Skip to content

Commit

Permalink
fix: not update the xdg system icon theme when the icon theme is changed
Browse files Browse the repository at this point in the history
Change-Id: I961bed984cd1df60cbadedccebc4eee2a04810cf
  • Loading branch information
zccrs committed Jul 27, 2018
1 parent ddfa28a commit cc738c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion platformthemeplugin/qdeepintheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <QGuiApplication>

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

#include <private/qicon_p.h>
#include <private/qiconloader_p.h>
Expand Down Expand Up @@ -57,7 +58,7 @@ static void onIconThemeSetCallback()

QDeepinTheme::QDeepinTheme()
{
QObject::connect(settings(), &DThemeSettings::iconThemeNameChanged, &onIconThemeSetCallback);
// 注意!!!, 此处还没有开始启动事件循环, 很多Qt类无法使用, 例如QTimer
}

QDeepinTheme::~QDeepinTheme()
Expand Down Expand Up @@ -228,6 +229,7 @@ DThemeSettings *QDeepinTheme::settings() const

QObject::connect(m_settings, &DThemeSettings::systemFontChanged, m_settings, updateSystemFont, Qt::UniqueConnection);
QObject::connect(m_settings, &DThemeSettings::systemFontPointSizeChanged, m_settings, updateSystemFont, Qt::UniqueConnection);
QObject::connect(m_settings, &DThemeSettings::iconThemeNameChanged, m_settings, &onIconThemeSetCallback, Qt::UniqueConnection);
}

return m_settings;
Expand Down

0 comments on commit cc738c1

Please sign in to comment.