react to config change

Summary:
applets that acces their config in C++ needs to implement
configChanged() in order to still work correctly in the scripting
console

Test Plan: correct icon when created from scripting console and config written from there

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D4461
wilder-5.14
Marco Martin 9 years ago
parent 6ee6880fb5
commit a0374d8fff
  1. 5
      applets/icon/iconapplet.cpp
  2. 1
      applets/icon/iconapplet.h

@ -66,6 +66,11 @@ void IconApplet::init()
populate();
}
void IconApplet::configChanged()
{
populate();
}
void IconApplet::populate()
{
m_url = config().readEntry(QStringLiteral("url"), QUrl());

@ -45,6 +45,7 @@ public:
~IconApplet() override;
void init() override;
void configChanged() override;
QUrl url() const;
void setUrl(const QUrl &url);

Loading…
Cancel
Save