mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
refactor: fix shutdown plugin crash
Change-Id: I17b0d62593011c8f87353464c78a429c8f2070ff
This commit is contained in:
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
@ -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;
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ void ShutdownPlugin::pluginStateSwitched()
|
||||
|
||||
if (pluginIsDisable())
|
||||
{
|
||||
m_proxyInter->itemRemoved(this, QString());
|
||||
m_proxyInter->itemRemoved(this, pluginName());
|
||||
} else {
|
||||
if (!m_pluginLoaded) {
|
||||
loadPlugin();
|
||||
|
Loading…
x
Reference in New Issue
Block a user