fix wrong enumeration values used
Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
This commit is contained in:
parent
a73ac4c351
commit
7b34e43804
76
0001-fix-wrong-enum-values-used.patch
Normal file
76
0001-fix-wrong-enum-values-used.patch
Normal file
@ -0,0 +1,76 @@
|
||||
From c01cdf3d3df8ceba7968817e87f5ab79edc9b355 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=E4=BE=AF=E7=BA=A2=E5=8B=8B?= <houhongxun@kylinos.cn>
|
||||
Date: Mon, 29 Apr 2024 10:59:50 +0800
|
||||
Subject: [PATCH] fix wrong enum values used
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
|
||||
---
|
||||
src/backend/dbus-interface/kylinconnectresource.cpp | 2 +-
|
||||
src/frontend/list-items/lanlistitem.cpp | 12 ++++++------
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/backend/dbus-interface/kylinconnectresource.cpp b/src/backend/dbus-interface/kylinconnectresource.cpp
|
||||
index 00d0570..da4fc40 100644
|
||||
--- a/src/backend/dbus-interface/kylinconnectresource.cpp
|
||||
+++ b/src/backend/dbus-interface/kylinconnectresource.cpp
|
||||
@@ -313,7 +313,7 @@ void KyConnectResourse::getConnectIp(
|
||||
|
||||
NetworkManager::Ipv6Setting::Ptr ipv6Setting = settingPtr->setting(NetworkManager::Setting::Ipv6).dynamicCast<NetworkManager::Ipv6Setting>();
|
||||
if (nullptr !=ipv6Setting
|
||||
- && NetworkManager::Ipv4Setting::Manual == ipv6Setting->method()) {
|
||||
+ && NetworkManager::Ipv6Setting::Manual == ipv6Setting->method()) {
|
||||
QList<NetworkManager::IpAddress> ipv6AddressList = ipv6Setting->addresses();
|
||||
NetworkManager::IpAddress settingIpv6Address = ipv6AddressList.at(0);
|
||||
if (settingIpv6Address.isValid()) {
|
||||
diff --git a/src/frontend/list-items/lanlistitem.cpp b/src/frontend/list-items/lanlistitem.cpp
|
||||
index 18e8e4e..bfc8bf8 100644
|
||||
--- a/src/frontend/list-items/lanlistitem.cpp
|
||||
+++ b/src/frontend/list-items/lanlistitem.cpp
|
||||
@@ -19,9 +19,9 @@ LanListItem::LanListItem(const KyConnectItem *lanConnectItem,
|
||||
|
||||
qDebug() << "LanListItem init:" << m_lanConnectItem.m_connectName << m_lanConnectItem.m_connectState << m_lanConnectItem.m_ifaceName;
|
||||
|
||||
- if (Deactivated == m_lanConnectItem.m_connectState || Activated == m_lanConnectItem.m_connectState) {
|
||||
+ if (NetworkManager::ActiveConnection::Deactivated == m_lanConnectItem.m_connectState || NetworkManager::ActiveConnection::Activated == m_lanConnectItem.m_connectState) {
|
||||
m_netButton->stopLoading();
|
||||
- if (m_lanConnectItem.m_connectState == Activated) {
|
||||
+ if (m_lanConnectItem.m_connectState == NetworkManager::ActiveConnection::Activated) {
|
||||
setIcon(true);
|
||||
} else {
|
||||
setIcon(false);
|
||||
@@ -89,7 +89,7 @@ void LanListItem::onNetButtonClicked()
|
||||
return;
|
||||
}
|
||||
|
||||
- if (Deactivated == m_lanConnectItem.m_connectState) {
|
||||
+ if (NetworkManager::ActiveConnection::Deactivated == m_lanConnectItem.m_connectState) {
|
||||
//断开的连接,点击激活连接
|
||||
if (m_deviceResource->wiredDeviceIsCarriered(m_deviceName)) {
|
||||
m_connectOperation->activateWiredConnection(m_lanConnectItem.m_connectUuid, m_deviceName);
|
||||
@@ -118,9 +118,9 @@ void LanListItem::onRightButtonClicked()
|
||||
}
|
||||
|
||||
m_menu->clear();
|
||||
- if (Activated == m_lanConnectItem.m_connectState || Activating == m_lanConnectItem.m_connectState) {
|
||||
+ if (NetworkManager::ActiveConnection::Activated == m_lanConnectItem.m_connectState || NetworkManager::ActiveConnection::Activating == m_lanConnectItem.m_connectState) {
|
||||
m_menu->addAction(new QAction(tr("Disconnect"), this));
|
||||
- } else if (Deactivated == m_lanConnectItem.m_connectState) {
|
||||
+ } else if (NetworkManager::ActiveConnection::Deactivated == m_lanConnectItem.m_connectState) {
|
||||
m_menu->addAction(new QAction(tr("Connect"), this));
|
||||
} else {
|
||||
return;
|
||||
@@ -162,7 +162,7 @@ void LanListItem::onInfoButtonClicked()
|
||||
<< "." <<Q_FUNC_INFO << __LINE__;
|
||||
|
||||
bool isActivated = false;
|
||||
- if (Activated == m_lanConnectItem.m_connectState) {
|
||||
+ if (NetworkManager::ActiveConnection::Activated == m_lanConnectItem.m_connectState) {
|
||||
isActivated = true;
|
||||
}
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
Name: kylin-nm
|
||||
Version: 3.1.1
|
||||
Release: 4
|
||||
Release: 5
|
||||
Summary: Gui Applet tool for display and edit network simply
|
||||
License: GPL-3+
|
||||
URL: http://www.ukui.org
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Patch01: 0001-fix-coredump-of-kylin-nm.patch
|
||||
Patch02: 0002-fix-coredump-of-kylin-nm.patch
|
||||
Patch03: 0001-fix-wrong-enum-values-used.patch
|
||||
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
BuildRequires: qtchooser
|
||||
@ -30,6 +31,7 @@ Requires: libukcc-devel
|
||||
%setup -q
|
||||
%patch01 -p1
|
||||
%patch02 -p1
|
||||
%patch03 -p1
|
||||
|
||||
%build
|
||||
%{qmake_qt5} %{_qt5_qmake_flags} CONFIG+=enable-by-default kylin-nm.pro
|
||||
@ -62,6 +64,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Apr 29 2024 houhongxun <houhongxun@kylinos.cn> - 3.1.1-5
|
||||
- fix wrong enumeration values used
|
||||
|
||||
* Mon Jul 17 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.1-4
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user