refactor: fix shutdown plugin crash

Change-Id: I17b0d62593011c8f87353464c78a429c8f2070ff
This commit is contained in:
listenerri 2018-11-13 10:23:45 +08:00
parent e7aee75ba4
commit 98d48a8053
Notes: gerrit 2018-11-13 10:35:33 +08:00
Verified+1: <jenkins@deepin.com>
Verified+1: liuwen123 <liuwen@linuxdeepin.com>
Code-Review+2: listenerri <listenerri@gmail.com>
Submitted-by: listenerri <listenerri@gmail.com>
Submitted-at: Tue, 13 Nov 2018 10:35:33 +0800
Reviewed-on: https://cr.deepin.io/39683
Project: dde/dde-dock
Branch: refs/heads/master
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ void PluginWidget::mousePressEvent(QMouseEvent *e)
const QPoint p(e->pos() - rect().center());
if (p.manhattanLength() < std::min(width(), height()) * 0.8 * 0.5)
{
emit requestContextMenu(QString());
emit requestContextMenu(QString("shutdown"));
return;
}

View File

@ -82,7 +82,7 @@ void ShutdownPlugin::pluginStateSwitched()
if (pluginIsDisable())
{
m_proxyInter->itemRemoved(this, QString());
m_proxyInter->itemRemoved(this, pluginName());
} else {
if (!m_pluginLoaded) {
loadPlugin();