Upstream tag: 5.11.0.13 Upstream commit: 5d834e99 Signed-off-by: Robin Lee <cheeselee@fedoraproject.org>
152 lines
5.6 KiB
Diff
152 lines
5.6 KiB
Diff
From f61f8a701fc3b6f02ff6bca0b22b4044e056246b Mon Sep 17 00:00:00 2001
|
|
From: "Zhang, DingYuan" <justforlxz@gmail.com>
|
|
Date: Fri, 7 Aug 2020 18:18:16 +0800
|
|
Subject: [PATCH 1/2] fix: build failed cause dde-network-utils update unknown
|
|
enum
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
dde-network-utils update enum unknown
|
|
|
|
Log: 修复编译失败
|
|
Change-Id: Ifbdd1e7920dd2fdd77f705876727fe8d0733936d
|
|
Reviewed-on: http://gerrit.uniontech.com/c/dde-dock/+/3689
|
|
Reviewed-by: <mailman@uniontech.com>
|
|
Reviewed-by: zhangdingyuan <justforlxz@gmail.com>
|
|
Tested-by: <mailman@uniontech.com>
|
|
---
|
|
plugins/network/item/applet/accesspointwidget.cpp | 6 +++---
|
|
plugins/network/item/wireditem.cpp | 6 +++---
|
|
plugins/network/item/wireditem.h | 2 +-
|
|
plugins/network/item/wirelessitem.cpp | 2 +-
|
|
plugins/network/item/wirelessitem.h | 2 +-
|
|
plugins/network/networkitem.cpp | 4 ++--
|
|
6 files changed, 11 insertions(+), 11 deletions(-)
|
|
|
|
diff --git a/plugins/network/item/applet/accesspointwidget.cpp b/plugins/network/item/applet/accesspointwidget.cpp
|
|
index 21f79ac2..c123b145 100644
|
|
--- a/plugins/network/item/applet/accesspointwidget.cpp
|
|
+++ b/plugins/network/item/applet/accesspointwidget.cpp
|
|
@@ -46,7 +46,7 @@ extern void initFontColor(QWidget *widget);
|
|
|
|
AccessPointWidget::AccessPointWidget()
|
|
: QFrame(nullptr)
|
|
- , m_activeState(NetworkDevice::Unknow)
|
|
+ , m_activeState(NetworkDevice::Unknown)
|
|
, m_ssidBtn(new SsidButton(this))
|
|
, m_securityLabel(new QLabel)
|
|
, m_strengthLabel(new QLabel)
|
|
@@ -127,7 +127,7 @@ void AccessPointWidget::updateAP(const AccessPoint &ap)
|
|
}
|
|
|
|
// reset state
|
|
- setActiveState(NetworkDevice::Unknow);
|
|
+ setActiveState(NetworkDevice::Unknown);
|
|
}
|
|
|
|
bool AccessPointWidget::active() const
|
|
@@ -200,6 +200,6 @@ void AccessPointWidget::ssidClicked()
|
|
|
|
void AccessPointWidget::disconnectBtnClicked()
|
|
{
|
|
- setActiveState(NetworkDevice::Unknow);
|
|
+ setActiveState(NetworkDevice::Unknown);
|
|
emit requestDeactiveAP(m_ap);
|
|
}
|
|
diff --git a/plugins/network/item/wireditem.cpp b/plugins/network/item/wireditem.cpp
|
|
index 31d86ff3..5eb056da 100644
|
|
--- a/plugins/network/item/wireditem.cpp
|
|
+++ b/plugins/network/item/wireditem.cpp
|
|
@@ -133,7 +133,7 @@ WiredItem::WiredStatus WiredItem::getDeviceState()
|
|
}
|
|
|
|
switch (m_device->status()) {
|
|
- case NetworkDevice::Unknow: return Unknow;
|
|
+ case NetworkDevice::Unknown: return Unknown;
|
|
case NetworkDevice::Unmanaged:
|
|
case NetworkDevice::Unavailable: return Nocable;
|
|
case NetworkDevice::Disconnected: return Disconnected;
|
|
@@ -174,7 +174,7 @@ void WiredItem::setWiredStateIcon()
|
|
auto ratio = devicePixelRatioF();
|
|
|
|
switch (m_deviceState) {
|
|
- case NetworkDevice::Unknow:
|
|
+ case NetworkDevice::Unknown:
|
|
case NetworkDevice::Unmanaged:
|
|
case NetworkDevice::Unavailable: {
|
|
stateString = "error";
|
|
@@ -246,7 +246,7 @@ void WiredItem::deviceStateChanged(NetworkDevice::DeviceStatus state)
|
|
{
|
|
m_deviceState = state;
|
|
switch (state) {
|
|
- case NetworkDevice::Unknow:
|
|
+ case NetworkDevice::Unknown:
|
|
case NetworkDevice::Unmanaged:
|
|
case NetworkDevice::Unavailable:
|
|
case NetworkDevice::Disconnected:
|
|
diff --git a/plugins/network/item/wireditem.h b/plugins/network/item/wireditem.h
|
|
index 8bb81c0d..4c4b5751 100644
|
|
--- a/plugins/network/item/wireditem.h
|
|
+++ b/plugins/network/item/wireditem.h
|
|
@@ -43,7 +43,7 @@ class WiredItem : public DeviceItem
|
|
|
|
public:
|
|
enum WiredStatus {
|
|
- Unknow = 0,
|
|
+ Unknown = 0,
|
|
Enabled = 0x00000001,
|
|
Disabled = 0x00000002,
|
|
Connected = 0x00000004,
|
|
diff --git a/plugins/network/item/wirelessitem.cpp b/plugins/network/item/wirelessitem.cpp
|
|
index 858fc1b1..24396427 100644
|
|
--- a/plugins/network/item/wirelessitem.cpp
|
|
+++ b/plugins/network/item/wirelessitem.cpp
|
|
@@ -117,7 +117,7 @@ WirelessItem::WirelessStatus WirelessItem::getDeviceState()
|
|
}
|
|
|
|
switch (m_device->status()) {
|
|
- case NetworkDevice::Unknow: return Unknow;
|
|
+ case NetworkDevice::Unknown: return Unknown;
|
|
case NetworkDevice::Unmanaged:
|
|
case NetworkDevice::Unavailable:
|
|
case NetworkDevice::Disconnected: return Disconnected;
|
|
diff --git a/plugins/network/item/wirelessitem.h b/plugins/network/item/wirelessitem.h
|
|
index d4d7d5ca..43d535c9 100644
|
|
--- a/plugins/network/item/wirelessitem.h
|
|
+++ b/plugins/network/item/wirelessitem.h
|
|
@@ -38,7 +38,7 @@ class WirelessItem : public DeviceItem
|
|
|
|
public:
|
|
enum WirelessStatus {
|
|
- Unknow = 0,
|
|
+ Unknown = 0,
|
|
Enabled = 0x00010000,
|
|
Disabled = 0x00020000,
|
|
Connected = 0x00040000,
|
|
diff --git a/plugins/network/networkitem.cpp b/plugins/network/networkitem.cpp
|
|
index 0c7211b7..c6bdc2ca 100644
|
|
--- a/plugins/network/networkitem.cpp
|
|
+++ b/plugins/network/networkitem.cpp
|
|
@@ -525,7 +525,7 @@ void NetworkItem::getPluginState()
|
|
// 按如下顺序得到当前无线设备状态
|
|
temp = state;
|
|
if (!temp)
|
|
- wirelessState = WirelessItem::Unknow;
|
|
+ wirelessState = WirelessItem::Unknown;
|
|
temp = state;
|
|
if ((temp & WirelessItem::Disabled) >> 17)
|
|
wirelessState = WirelessItem::Disabled;
|
|
@@ -569,7 +569,7 @@ void NetworkItem::getPluginState()
|
|
}
|
|
temp = state;
|
|
if (!temp)
|
|
- wiredState = WiredItem::Unknow;
|
|
+ wiredState = WiredItem::Unknown;
|
|
temp = state;
|
|
if ((temp & WiredItem::Nocable) >> 9)
|
|
wiredState = WiredItem::Nocable;
|
|
--
|
|
2.26.2
|
|
|