From 35e32e3c054b5eb0e2438e14c952cc5d68a1c662 Mon Sep 17 00:00:00 2001 From: chenjun <104487271+chenjun1982@users.noreply.github.com> Date: Wed, 9 Nov 2022 11:36:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9C=A8=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=85=B6=E4=BB=96=E6=8F=92=E4=BB=B6=E7=9A=84Tips?= =?UTF-8?q?=E6=97=B6=E6=97=A0=E6=B3=95=E5=BC=B9=E5=87=BA=E7=BD=91=E7=BB=9C?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E8=BE=93=E5=85=A5=E5=AF=86=E7=A0=81=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#713)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复在显示其他插件的Tips时无法弹出网络列表输入密码问题 Log: 修复在显示其他插件的Tips时无法弹出网络列表输入密码问题 Task: https://pms.uniontech.com/task-view-212979.html Influence: 在显示其他插件的TIps或控制面板时,网络列表正常弹出 --- cmake/DdeDock/DdeDockConfig.cmake | 2 -- frame/controller/dockpluginscontroller.cpp | 15 +++++++++++++++ .../tray/system-trays/systemtrayscontroller.cpp | 15 +++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) delete mode 100644 cmake/DdeDock/DdeDockConfig.cmake diff --git a/cmake/DdeDock/DdeDockConfig.cmake b/cmake/DdeDock/DdeDockConfig.cmake deleted file mode 100644 index a01f4929b..000000000 --- a/cmake/DdeDock/DdeDockConfig.cmake +++ /dev/null @@ -1,2 +0,0 @@ -set(DDE_DOCK_INCLUDE_DIR /usr/local/include/dde-dock) -include_directories("${DDE_DOCK_INCLUDE_DIR}") diff --git a/frame/controller/dockpluginscontroller.cpp b/frame/controller/dockpluginscontroller.cpp index 474b46c7f..552d086d2 100644 --- a/frame/controller/dockpluginscontroller.cpp +++ b/frame/controller/dockpluginscontroller.cpp @@ -110,6 +110,21 @@ void DockPluginsController::requestSetAppletVisible(PluginsItemInterface *const return; if (visible) { + // 在弹出界面前先隐藏其他插件的tips + QMap> &mPluginsMap = pluginsMap(); + foreach (auto interface, mPluginsMap.keys()) { + if (interface != itemInter) { + foreach (auto oldItemKey, mPluginsMap[interface].keys()) { + if (oldItemKey != "pluginloader") { + PluginsItem *oldItem = qobject_cast(pluginItemAt(interface, oldItemKey)); + if (oldItem) { + oldItem->hidePopup(); + } + } + } + } + } + item->showPopupApplet(itemInter->itemPopupApplet(itemKey)); } else { item->hidePopup(); diff --git a/plugins/tray/system-trays/systemtrayscontroller.cpp b/plugins/tray/system-trays/systemtrayscontroller.cpp index b74038a1d..bf8298762 100644 --- a/plugins/tray/system-trays/systemtrayscontroller.cpp +++ b/plugins/tray/system-trays/systemtrayscontroller.cpp @@ -97,6 +97,21 @@ void SystemTraysController::requestSetAppletVisible(PluginsItemInterface * const return; if (visible) { + // 在弹出界面前先隐藏其他插件的tips + QMap> &mPluginsMap = pluginsMap(); + foreach (auto interface, mPluginsMap.keys()) { + if (interface != itemInter) { + foreach (auto oldItemKey, mPluginsMap[interface].keys()) { + if (oldItemKey != "pluginloader") { + SystemTrayItem *oldItem = qobject_cast(pluginItemAt(interface, oldItemKey)); + if (oldItem) { + oldItem->hidePopup(); + } + } + } + } + } + item->showPopupApplet(itemInter->itemPopupApplet(itemKey)); } else { item->hidePopup();