mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
fix: 去掉电池的右键菜单
删除电池右键菜单接口 Log: Influence: 右键电池插件,观察是否存在菜单 Bug: https://pms.uniontech.com/bug-view-171753.html Change-Id: I305fd4b48c4b89d8fbf92f109eb401a6d6223a41
This commit is contained in:
parent
a41df224f6
commit
04756c8f38
@ -122,31 +122,6 @@ const QString PowerPlugin::itemCommand(const QString &itemKey)
|
||||
return QString();
|
||||
}
|
||||
|
||||
const QString PowerPlugin::itemContextMenu(const QString &itemKey)
|
||||
{
|
||||
if (itemKey != POWER_KEY) {
|
||||
return QString();
|
||||
}
|
||||
|
||||
QList<QVariant> items;
|
||||
items.reserve(6);
|
||||
|
||||
if (!QFile::exists(ICBC_CONF_FILE)) {
|
||||
QMap<QString, QVariant> power;
|
||||
power["itemId"] = "power";
|
||||
power["itemText"] = tr("Power settings");
|
||||
power["isActive"] = true;
|
||||
items.push_back(power);
|
||||
}
|
||||
|
||||
QMap<QString, QVariant> menu;
|
||||
menu["items"] = items;
|
||||
menu["checkableMenu"] = false;
|
||||
menu["singleCheck"] = false;
|
||||
|
||||
return QJsonDocument::fromVariant(menu).toJson();
|
||||
}
|
||||
|
||||
void PowerPlugin::invokedMenuItem(const QString &itemKey, const QString &menuId, const bool checked)
|
||||
{
|
||||
Q_UNUSED(itemKey)
|
||||
|
@ -52,7 +52,6 @@ public:
|
||||
QWidget *itemWidget(const QString &itemKey) override;
|
||||
QWidget *itemTipsWidget(const QString &itemKey) override;
|
||||
const QString itemCommand(const QString &itemKey) override;
|
||||
const QString itemContextMenu(const QString &itemKey) override;
|
||||
void invokedMenuItem(const QString &itemKey, const QString &menuId, const bool checked) override;
|
||||
void refreshIcon(const QString &itemKey) override;
|
||||
int itemSortKey(const QString &itemKey) override;
|
||||
|
Loading…
x
Reference in New Issue
Block a user