fix: 修复第三方固定区域插件右键菜单打开时导致任务栏崩溃的问题

第三方固定插件中不含有gsetting对应的配置key(menuEnabled),导致崩溃

Log: 修复第三方固定区域插件右键菜单打开时导致任务栏崩溃的问题
Change-Id: I9c90ad75ef0fa674698aceeeb418fd62be9f66b3
This commit is contained in:
范朋程 2021-03-04 16:45:37 +08:00
parent 4765cc0014
commit f38be40dda

View File

@ -167,7 +167,7 @@ void PluginsItem::mousePressEvent(QMouseEvent *e)
if (e->button() == Qt::RightButton) {
if (perfectIconRect().contains(e->pos())) {
return (m_gsettings && m_gsettings->get("menuEnable").toBool()) ? showContextMenu() : void();
return (m_gsettings && (!m_gsettings->keys().contains("menuEnable") || m_gsettings->get("menuEnable").toBool())) ? showContextMenu() : void();
}
}