Skip to content

Commit 241ba60

Browse files
ut003640deepin-bot[bot]
authored andcommitted
fix: fix system and app proxy is hide
the system and app proxy must show on the control center PMS: BUG-350619
1 parent f551c70 commit 241ba60

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

net-view/operation/nettype.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2019 - 2022 UnionTech Software Technology Co., Ltd.
1+
// SPDX-FileCopyrightText: 2019 - 2026 UnionTech Software Technology Co., Ltd.
22
//
33
// SPDX-License-Identifier: LGPL-3.0-or-later
44
#ifndef NETTYPE_H
@@ -103,12 +103,12 @@ class NetType
103103
Net_AirplaneTips = 0x01000000,
104104
Net_VPNTips = 0x02000000,
105105
Net_VPNChildren = 0x04000000,
106-
106+
Net_SysProxyAlwaysShow = 0x08000000,
107107
//
108108
Net_DockFlags = Net_Device | Net_VPN | Net_SysProxy | Net_Airplane | Net_AirplaneTips | Net_VPNTips | Net_tipsLinkEnabled | Net_UseSecretAgent | Net_CheckPortal | Net_8021xToControlCenterUnderConnect | Net_autoUpdateHiddenConfig,
109109
Net_LockFlags = Net_Device | Net_VPN | Net_SysProxy | Net_Airplane | Net_AirplaneTips | Net_VPNTips | Net_UseSecretAgent | Net_CheckPortal | Net_8021xSendNotifyUnderConnect,
110110
Net_GreeterFlags = Net_Device | Net_Airplane | Net_AirplaneTips | Net_ServiceNM | Net_AutoAddConnection | Net_UseSecretAgent | Net_CheckPortal | Net_8021xSendNotifyUnderConnect,
111-
Net_DccFlags = Net_Device | Net_VPN | Net_VPNChildren | Net_SysProxy | Net_Hotspot | Net_Airplane | Net_DSL | Net_Details,
111+
Net_DccFlags = Net_Device | Net_VPN | Net_VPNChildren | Net_SysProxy | Net_Hotspot | Net_Airplane | Net_DSL | Net_Details | Net_SysProxyAlwaysShow,
112112
//
113113
Net_8021xMask = 0x00000F00,
114114
};

net-view/operation/private/netmanagerthreadprivate.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,11 +462,12 @@ void NetManagerThreadPrivate::doInit()
462462
item->updatemethod(NetType::ProxyMethod(method));
463463
item->item()->moveToThread(m_parentThread);
464464
Q_EMIT itemAdded("Root", item);
465-
onSystemProxyExistChanged(networkController->proxyController()->systemProxyExist());
466465
onSystemAutoProxyChanged(networkController->proxyController()->autoProxy());
467466
onSystemManualProxyChanged();
468-
469-
connect(networkController->proxyController(), &ProxyController::systemProxyExistChanged, this, &NetManagerThreadPrivate::onSystemProxyExistChanged);
467+
if (!m_flags.testFlags(NetType::NetManagerFlag::Net_SysProxyAlwaysShow)) {
468+
onSystemProxyExistChanged(networkController->proxyController()->systemProxyExist());
469+
connect(networkController->proxyController(), &ProxyController::systemProxyExistChanged, this, &NetManagerThreadPrivate::onSystemProxyExistChanged);
470+
}
470471
connect(networkController->proxyController(), &ProxyController::proxyMethodChanged, this, &NetManagerThreadPrivate::onSystemProxyMethodChanged);
471472
connect(networkController->proxyController(), &ProxyController::autoProxyChanged, this, &NetManagerThreadPrivate::onSystemAutoProxyChanged);
472473
connect(networkController->proxyController(), &ProxyController::proxyChanged, this, &NetManagerThreadPrivate::onSystemManualProxyChanged);

0 commit comments

Comments
 (0)