mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-27 06:03:51 +03:00
release indicator config ui when window closes
This commit is contained in:
parent
381675ac57
commit
e16ca1f87b
@ -320,6 +320,7 @@ void Indicator::configUiFor(QString type, QQuickItem *parent)
|
||||
delete m_lastCreatedConfigUi;
|
||||
m_lastCreatedConfigUi = nullptr;
|
||||
}
|
||||
|
||||
auto prevConfigUi = m_lastCreatedConfigUi;
|
||||
|
||||
KPluginMetaData metadata;
|
||||
@ -353,6 +354,14 @@ void Indicator::configUiFor(QString type, QQuickItem *parent)
|
||||
}
|
||||
}
|
||||
|
||||
void Indicator::releaseConfigUi()
|
||||
{
|
||||
if (m_lastCreatedConfigUi) {
|
||||
delete m_lastCreatedConfigUi;
|
||||
m_lastCreatedConfigUi = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void Indicator::unloadIndicators()
|
||||
{
|
||||
setPluginIsReady(false);
|
||||
|
@ -130,6 +130,7 @@ public slots:
|
||||
Q_INVOKABLE void addIndicator();
|
||||
Q_INVOKABLE void downloadIndicator();
|
||||
Q_INVOKABLE void removeIndicator(QString pluginId);
|
||||
void releaseConfigUi();
|
||||
|
||||
signals:
|
||||
void customPluginsChanged();
|
||||
|
@ -134,6 +134,11 @@ PrimaryConfigView::~PrimaryConfigView()
|
||||
{
|
||||
qDebug() << "ConfigView deleting ...";
|
||||
|
||||
if (m_latteView->indicator()) {
|
||||
//! destroy indicator config ui when the configuration window is closed
|
||||
m_latteView->indicator()->releaseConfigUi();
|
||||
}
|
||||
|
||||
m_corona->dialogShadows()->removeWindow(this);
|
||||
|
||||
m_corona->wm()->unregisterIgnoredWindow(KWindowSystem::isPlatformX11() ? winId() : m_waylandWindowId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user