fix indicators warnings when removing a view

pull/5/head
Michail Vourlakos 6 years ago
parent 6e1dfe9670
commit 8b3920ef64

@ -360,6 +360,11 @@ void Indicator::configUiFor(QString type, QQuickItem *parent)
}
}
void Indicator::unloadIndicators()
{
setPluginIsReady(false);
}
void Indicator::updateScheme()
{
auto prevConfigLoader = m_configLoader;

@ -120,6 +120,7 @@ public:
QQmlComponent *plasmaComponent() const;
void load(QString type);
void unloadIndicators();
public slots:
Q_INVOKABLE void configUiFor(QString type, QQuickItem *parent);

@ -147,6 +147,10 @@ View::~View()
{
m_inDelete = true;
if (m_indicator) {
m_indicator->unloadIndicators();
}
disconnect(corona(), &Plasma::Corona::availableScreenRectChanged, this, &View::availableScreenRectChanged);
disconnect(containment(), SIGNAL(statusChanged(Plasma::Types::ItemStatus)), this, SLOT(statusChanged(Plasma::Types::ItemStatus)));
@ -177,14 +181,14 @@ View::~View()
delete m_positioner;
}
if (m_indicator) {
delete m_indicator;
}
if (m_effects) {
delete m_effects;
}
if (m_indicator) {
delete m_indicator;
}
if (m_visibility) {
delete m_visibility;
}

Loading…
Cancel
Save