From f803d07ba85e579776fb185f4878b6fcd6c17ddf Mon Sep 17 00:00:00 2001
From: luoqing <luoqing@kylinsec.com.cn>
Date: Thu, 21 Dec 2023 09:25:47 +0800
Subject: [PATCH 04/17] fix(network):fix compile issues,QString::SkipEmptyParts
 is used under Qt 5.14
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

- 修复编译问题，在Qt 5.14 以下使用QString::SkipEmptyParts
---
 plugins/network/src/plugin/setting-widget/ipv4-widget.cpp | 4 ++++
 plugins/network/src/plugin/setting-widget/ipv6-widget.cpp | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/plugins/network/src/plugin/setting-widget/ipv4-widget.cpp b/plugins/network/src/plugin/setting-widget/ipv4-widget.cpp
index da46dab..fa23708 100644
--- a/plugins/network/src/plugin/setting-widget/ipv4-widget.cpp
+++ b/plugins/network/src/plugin/setting-widget/ipv4-widget.cpp
@@ -131,7 +131,11 @@ void Ipv4Widget::saveSettings()
     {
         //多个DNS以分号分隔
         QString dnsString = ui->ipv4DNS->text();
+#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
+        QStringList dnsList = dnsString.split(";",QString::SkipEmptyParts);
+#else
         QStringList dnsList = dnsString.split(";",Qt::SkipEmptyParts);
+#endif
         for(auto dns : dnsList)
         {
             ipv4DNS << QHostAddress(dns);
diff --git a/plugins/network/src/plugin/setting-widget/ipv6-widget.cpp b/plugins/network/src/plugin/setting-widget/ipv6-widget.cpp
index feefdcf..d19a5e0 100644
--- a/plugins/network/src/plugin/setting-widget/ipv6-widget.cpp
+++ b/plugins/network/src/plugin/setting-widget/ipv6-widget.cpp
@@ -124,7 +124,11 @@ void Ipv6Widget::saveSettings()
     {
         //多个DNS以分号分隔
         QString dnsString = ui->ipv6DNS->text();
+#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
+        QStringList dnsList = dnsString.split(";",QString::SkipEmptyParts);
+#else
         QStringList dnsList = dnsString.split(";",Qt::SkipEmptyParts);
+#endif
         for(auto dns : dnsList)
         {
             ipv6DNS << QHostAddress(dns);
-- 
2.33.0

