From 04756c8f38d0564a538ba581099c26127d8d0161 Mon Sep 17 00:00:00 2001 From: donghualin Date: Wed, 23 Nov 2022 16:10:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=BB=E6=8E=89=E7=94=B5=E6=B1=A0?= =?UTF-8?q?=E7=9A=84=E5=8F=B3=E9=94=AE=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除电池右键菜单接口 Log: Influence: 右键电池插件,观察是否存在菜单 Bug: https://pms.uniontech.com/bug-view-171753.html Change-Id: I305fd4b48c4b89d8fbf92f109eb401a6d6223a41 --- plugins/power/powerplugin.cpp | 25 ------------------------- plugins/power/powerplugin.h | 1 - 2 files changed, 26 deletions(-) diff --git a/plugins/power/powerplugin.cpp b/plugins/power/powerplugin.cpp index 6e83cec23..a55fe2123 100644 --- a/plugins/power/powerplugin.cpp +++ b/plugins/power/powerplugin.cpp @@ -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 items; - items.reserve(6); - - if (!QFile::exists(ICBC_CONF_FILE)) { - QMap power; - power["itemId"] = "power"; - power["itemText"] = tr("Power settings"); - power["isActive"] = true; - items.push_back(power); - } - - QMap 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) diff --git a/plugins/power/powerplugin.h b/plugins/power/powerplugin.h index 02911f7ff..8d2ae4420 100644 --- a/plugins/power/powerplugin.h +++ b/plugins/power/powerplugin.h @@ -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;