!99 修复json中包含中文字符时的解析错误;当网关设置项为“0.0.0.0”时,网关设置项置空
From: @luoqing_kylinsec Reviewed-by: @liubuguiii Signed-off-by: @liubuguiii
This commit is contained in:
commit
f2de37cad1
@ -0,0 +1,39 @@
|
|||||||
|
From 51ade1eede326506f4814081ac4141a97082ff53 Mon Sep 17 00:00:00 2001
|
||||||
|
From: luoqing <luoqing@kylinsec.com.cn>
|
||||||
|
Date: Fri, 25 Aug 2023 14:15:36 +0800
|
||||||
|
Subject: [PATCH 1/2] feature(network):When the gateway setting item is
|
||||||
|
0.0.0.0, the gateway setting item is null
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
- 当网关设置项为“0.0.0.0”时,网关设置项置空
|
||||||
|
|
||||||
|
Related #13150
|
||||||
|
---
|
||||||
|
.../network/src/plugin/setting-widget/ipv4-widget.cpp | 9 ++++++++-
|
||||||
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/network/src/plugin/setting-widget/ipv4-widget.cpp b/plugins/network/src/plugin/setting-widget/ipv4-widget.cpp
|
||||||
|
index 63d029c..8c39794 100644
|
||||||
|
--- a/plugins/network/src/plugin/setting-widget/ipv4-widget.cpp
|
||||||
|
+++ b/plugins/network/src/plugin/setting-widget/ipv4-widget.cpp
|
||||||
|
@@ -162,7 +162,14 @@ void Ipv4Widget::showSettings()
|
||||||
|
|
||||||
|
ui->ipv4Address->setText(address);
|
||||||
|
ui->ipv4Netmask->setText(netmask);
|
||||||
|
- ui->ipv4Gateway->setText(gateway);
|
||||||
|
+ if(gateway != "0.0.0.0")
|
||||||
|
+ {
|
||||||
|
+ ui->ipv4Gateway->setText(gateway);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ ui->ipv4Gateway->clear();
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
QString preferredDNS = "";
|
||||||
|
QString alternateDNS = "";
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
From 6e8923c8712ce9875863408d3bd695375d8e8973 Mon Sep 17 00:00:00 2001
|
||||||
|
From: luoqing <luoqing@kylinsec.com.cn>
|
||||||
|
Date: Tue, 29 Aug 2023 15:21:50 +0800
|
||||||
|
Subject: [PATCH 2/2] fix(audio):Fix parsing error when json contains Chinese
|
||||||
|
characters
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
- 修复json中包含中文字符时的解析错误
|
||||||
|
|
||||||
|
Related #13261
|
||||||
|
---
|
||||||
|
plugins/audio/src/plugin/input-page.cpp | 2 +-
|
||||||
|
plugins/audio/src/plugin/output-page.cpp | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/audio/src/plugin/input-page.cpp b/plugins/audio/src/plugin/input-page.cpp
|
||||||
|
index 00826b4..8b0ecaa 100644
|
||||||
|
--- a/plugins/audio/src/plugin/input-page.cpp
|
||||||
|
+++ b/plugins/audio/src/plugin/input-page.cpp
|
||||||
|
@@ -202,7 +202,7 @@ void InputPage::initActivedPort()
|
||||||
|
KLOG_DEBUG() << "getPorts:" << getPorts;
|
||||||
|
//解析默认source的端口信息
|
||||||
|
QJsonParseError jsonParseError;
|
||||||
|
- QJsonDocument doc = QJsonDocument::fromJson(getPorts.value().toLatin1(), &jsonParseError);
|
||||||
|
+ QJsonDocument doc = QJsonDocument::fromJson(getPorts.value().toUtf8(), &jsonParseError);
|
||||||
|
if (!doc.isNull() && jsonParseError.error == QJsonParseError::NoError)
|
||||||
|
{
|
||||||
|
if (doc.isArray() && jsonParseError.error == QJsonParseError::NoError)
|
||||||
|
diff --git a/plugins/audio/src/plugin/output-page.cpp b/plugins/audio/src/plugin/output-page.cpp
|
||||||
|
index ef52165..420cf98 100644
|
||||||
|
--- a/plugins/audio/src/plugin/output-page.cpp
|
||||||
|
+++ b/plugins/audio/src/plugin/output-page.cpp
|
||||||
|
@@ -98,7 +98,7 @@ void OutputPage::initActivedPort()
|
||||||
|
|
||||||
|
//解析默认sink的端口信息
|
||||||
|
QJsonParseError jsonParseError;
|
||||||
|
- QJsonDocument doc = QJsonDocument::fromJson(getPorts.value().toLatin1(), &jsonParseError);
|
||||||
|
+ QJsonDocument doc = QJsonDocument::fromJson(getPorts.value().toUtf8(), &jsonParseError);
|
||||||
|
if (!doc.isNull() && jsonParseError.error == QJsonParseError::NoError)
|
||||||
|
{
|
||||||
|
if (doc.isArray() && jsonParseError.error == QJsonParseError::NoError)
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: kiran-control-panel
|
Name: kiran-control-panel
|
||||||
Version: 2.5.5
|
Version: 2.5.5
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: Kiran Control Panel
|
Summary: Kiran Control Panel
|
||||||
Summary(zh_CN): Kiran桌面控制面板
|
Summary(zh_CN): Kiran桌面控制面板
|
||||||
|
|
||||||
@ -12,6 +12,8 @@ Patch0002: 0002-feature-display-When-switching-resolutions-refresh-r.patch
|
|||||||
Patch0003: 0003-fix-wallpaper-change-system-wallpaper-xml-path-to-ki.patch
|
Patch0003: 0003-fix-wallpaper-change-system-wallpaper-xml-path-to-ki.patch
|
||||||
Patch0004: 0004-fix-wallpaper-don-t-call-xmlWriter-if-system-backgro.patch
|
Patch0004: 0004-fix-wallpaper-don-t-call-xmlWriter-if-system-backgro.patch
|
||||||
Patch0005: 0005-fix-account-Fixed-issues-related-to-creating-and-del.patch
|
Patch0005: 0005-fix-account-Fixed-issues-related-to-creating-and-del.patch
|
||||||
|
Patch0006: 0006-feature-network-When-the-gateway-setting-item-is-0.0.patch
|
||||||
|
Patch0007: 0007-fix-audio-Fix-parsing-error-when-json-contains-Chine.patch
|
||||||
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: cmake >= 3.2
|
BuildRequires: cmake >= 3.2
|
||||||
@ -169,6 +171,10 @@ make %{?_smp_mflags}
|
|||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 30 2023 luoqing <luoqing@kylinsec.com.cn> - 2.5.5-5
|
||||||
|
- KYOS-F: Fix parsing error when json contains Chinese character(#13261)
|
||||||
|
- KYOS-F: When the gateway setting item is 0.0.0.0, the gateway setting item is null(#13150)
|
||||||
|
|
||||||
* Mon Aug 28 2023 liuxinhao <liuxinhao@kylinsec.com.cn> - 2.5.5-4
|
* Mon Aug 28 2023 liuxinhao <liuxinhao@kylinsec.com.cn> - 2.5.5-4
|
||||||
- KYOS-F: Fixed issues related to creating and deleting users in account management(#13994,#13990)
|
- KYOS-F: Fixed issues related to creating and deleting users in account management(#13994,#13990)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user