bugfix: destroy pluginitemwrapper when plugin removed

Change-Id: I2d3fae40e76c2970d8a049a1562aa7b1e5704a86
This commit is contained in:
杨万青 2015-09-08 10:03:29 +08:00
parent 00c8423e49
commit e64474b8d7
Notes: Deepin Code Review 2016-06-14 07:19:47 +00:00
Verified+1: Anonymous Coward #1000004
Code-Review+2: <yangwanqing@linuxdeepin.com>
Submitted-by: <yangwanqing@linuxdeepin.com>
Submitted-at: Tue, 08 Sep 2015 09:58:03 +0800
Reviewed-on: https://cr.deepin.io/6836
Project: dde/dde-dock
Branch: refs/heads/master
3 changed files with 3 additions and 2 deletions

View File

@ -47,7 +47,7 @@ QString PluginsSettingLine::pluginId() const
return m_pluginId;
}
bool PluginsSettingLine::checked(bool check)
bool PluginsSettingLine::checked()
{
return m_switchButton->checked();
}

View File

@ -30,7 +30,7 @@ public:
void setChecked(const bool checked);
QString pluginId() const;
bool checked(bool check);
bool checked();
signals:
void disableChanged(QString id, bool check);

View File

@ -107,6 +107,7 @@ void Panel::initPluginManager()
});
connect(pluginManager, &DockPluginManager::itemRemoved, [=](AbstractDockItem* item) {
m_pluginLayout->removeItem(item);
item->deleteLater();
});
connect(PanelMenu::instance(), &PanelMenu::settingPlugin, [=]{
QRect rec = QApplication::desktop()->screenGeometry();