fix(network):fix the network defect in the third round of kiranui-2.3 test
- 修复kiranUI-2.3第三轮测试中网络缺陷
This commit is contained in:
parent
e21037a3b8
commit
3f78ec2f79
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,59 +0,0 @@
|
||||
From ebd20e32e3f0c0944aebdad0cd5a347694b033e4 Mon Sep 17 00:00:00 2001
|
||||
From: luoqing <luoqing@kylinsec.com.cn>
|
||||
Date: Fri, 12 Aug 2022 17:27:50 +0800
|
||||
Subject: [PATCH 1/7] feature(network):Add the conf file to overwrite the
|
||||
original configuration of NetworkManager
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 添加conf文件以覆盖NetworkManager原先的配置
|
||||
---
|
||||
plugins/network/CMakeLists.txt | 4 ++++
|
||||
plugins/network/data/00-server.conf.in | 18 ++++++++++++++++++
|
||||
2 files changed, 22 insertions(+)
|
||||
create mode 100644 plugins/network/data/00-server.conf.in
|
||||
|
||||
diff --git a/plugins/network/CMakeLists.txt b/plugins/network/CMakeLists.txt
|
||||
index 0bdf4f8..02dbe3a 100644
|
||||
--- a/plugins/network/CMakeLists.txt
|
||||
+++ b/plugins/network/CMakeLists.txt
|
||||
@@ -115,6 +115,10 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kiran-network-status-icon.desktop DEST
|
||||
SET(link_source ${PLUGIN_DESKTOP_INSTALL_DIR}/${TARGET_NAME}.desktop)
|
||||
SET(link_target ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}-link.desktop)
|
||||
|
||||
+set(NETWORK_SERVER_CONF /etc/NetworkManager/conf.d)
|
||||
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/00-server.conf.in ${CMAKE_CURRENT_BINARY_DIR}/00-server.conf @ONLY)
|
||||
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/00-server.conf DESTINATION ${NETWORK_SERVER_CONF}/)
|
||||
+
|
||||
#安装插件和二进制文件
|
||||
install(TARGETS ${TARGET_NAME} DESTINATION ${PLUGIN_LIBS_INSTALL_DIR}/)
|
||||
install(TARGETS ${TRAY_PROCESS} DESTINATION ${INSTALL_BINDIR})
|
||||
diff --git a/plugins/network/data/00-server.conf.in b/plugins/network/data/00-server.conf.in
|
||||
new file mode 100644
|
||||
index 0000000..e3202b8
|
||||
--- /dev/null
|
||||
+++ b/plugins/network/data/00-server.conf.in
|
||||
@@ -0,0 +1,18 @@
|
||||
+# This configuration file changes NetworkManager's behavior to
|
||||
+# what's expected on "traditional UNIX server" type deployments.
|
||||
+#
|
||||
+# See "man NetworkManager.conf" for more information about these
|
||||
+# and other keys.
|
||||
+
|
||||
+#NetworkManager会先读取/etc/NetworkManager/NetworkManager.conf,然后是/usr/lib/NetworkManager/conf.d/下的配置
|
||||
+#最后读取/etc/NetworkManager/conf.d,后读取的文件将覆盖先读取的同名文件配置
|
||||
+#在/etc/NetworkManager/conf.d目录添加该文件,用以覆盖/usr/lib/NetworkManager/conf.d下的同名文件的配置
|
||||
+#https://gitee.com/src-openeuler/kiran-desktop/issues/I5I0AA
|
||||
+[main]
|
||||
+# Do not do automatic (DHCP/SLAAC) configuration on ethernet devices
|
||||
+# with no other matching connections.
|
||||
+no-auto-default=*
|
||||
+
|
||||
+# Ignore the carrier (cable plugged in) state when attempting to
|
||||
+# activate static-IP connections.
|
||||
+#ignore-carrier=*
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
From bbc782ebca691f8a93d2f17c3fb8b2f0bf87ae9d Mon Sep 17 00:00:00 2001
|
||||
From: liuxinhao <liuxinhao@kylinsec.com.cn>
|
||||
Date: Thu, 18 Aug 2022 20:31:25 +0800
|
||||
Subject: [PATCH 1/2] fix(battery idle): remove invalid idle shutdown display
|
||||
option
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 移除掉无效的空闲关闭显示器选项
|
||||
Closes #I5M336
|
||||
---
|
||||
.../power/src/pages/battery-settings/battery-settings-page.cpp | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/plugins/power/src/pages/battery-settings/battery-settings-page.cpp b/plugins/power/src/pages/battery-settings/battery-settings-page.cpp
|
||||
index 3dd50af..222d9bb 100644
|
||||
--- a/plugins/power/src/pages/battery-settings/battery-settings-page.cpp
|
||||
+++ b/plugins/power/src/pages/battery-settings/battery-settings-page.cpp
|
||||
@@ -65,7 +65,6 @@ void BatterySettingsPage::initUI()
|
||||
///计算机空闲进行的操作
|
||||
// clang-format off
|
||||
QMap<QString, int> computerIdleActionsMap = {
|
||||
- {tr("Display Off"), POWER_ACTION_DISPLAY_OFF},
|
||||
{tr("Suspend"), POWER_ACTION_COMPUTER_SUSPEND},
|
||||
{tr("Shutdown"), POWER_ACTION_COMPUTER_SHUTDOWN},
|
||||
{tr("Hibernate"), POWER_ACTION_COMPUTER_HIBERNATE},
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,240 +0,0 @@
|
||||
From 5f9c85d57d40c7aa9e045c0ba796c29069c525a1 Mon Sep 17 00:00:00 2001
|
||||
From: luoqing <luoqing@kylinsec.com.cn>
|
||||
Date: Mon, 1 Aug 2022 16:48:00 +0800
|
||||
Subject: [PATCH] fix(netwowrk):fix not searching the wireless network for a
|
||||
long time after the WiFi connection is successful
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 修复wifi连接成功后长时间不搜索无线网络
|
||||
|
||||
Close #I5IPVO
|
||||
---
|
||||
.../src/plugin/cpanel-network-widget.cpp | 34 ++++++++++++++++---
|
||||
.../src/plugin/cpanel-network-widget.h | 1 +
|
||||
.../src/plugin/manager/wireless-manager.cpp | 2 +-
|
||||
.../disconnect-and-delete-button.cpp | 12 ++++---
|
||||
.../plugin/setting-widget/wireless-widget.cpp | 2 --
|
||||
plugins/network/src/tray/network-tray.cpp | 17 ++++++++++
|
||||
.../network/src/tray/wireless-tray-widget.cpp | 29 ++++++++++++++--
|
||||
7 files changed, 83 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/plugins/network/src/plugin/cpanel-network-widget.cpp b/plugins/network/src/plugin/cpanel-network-widget.cpp
|
||||
index cf0f147..daf3c33 100644
|
||||
--- a/plugins/network/src/plugin/cpanel-network-widget.cpp
|
||||
+++ b/plugins/network/src/plugin/cpanel-network-widget.cpp
|
||||
@@ -46,9 +46,9 @@ void CPanelNetworkWidget::init()
|
||||
{
|
||||
initPage();
|
||||
initConnect();
|
||||
-
|
||||
}
|
||||
|
||||
+//TODO:增加sidebarItem与设备的对应关系
|
||||
void CPanelNetworkWidget::initPage()
|
||||
{
|
||||
getAvailableDeviceList();
|
||||
@@ -218,10 +218,7 @@ void CPanelNetworkWidget::initConnect()
|
||||
|
||||
connect(notifier(), &Notifier::deviceRemoved, this, &CPanelNetworkWidget::handleDeviceRemoved);
|
||||
|
||||
- connect(ui->sidebar, &QListWidget::itemClicked, [this](QListWidgetItem *item)
|
||||
- {
|
||||
- ui->stackedWidget->setCurrentIndex(item->data(Qt::UserRole).toInt());
|
||||
- });
|
||||
+ connect(ui->sidebar, &QListWidget::itemClicked, this,&CPanelNetworkWidget::handleSideBarItemClicked);
|
||||
|
||||
connect(Kiran::StylePalette::instance(), &Kiran::StylePalette::themeChanged, this, &CPanelNetworkWidget::handleThemeChanged);
|
||||
}
|
||||
@@ -282,3 +279,30 @@ void CPanelNetworkWidget::handleThemeChanged(Kiran::PaletteType paletteType)
|
||||
ui->sidebar->item(i)->setIcon(pixmap);
|
||||
}
|
||||
}
|
||||
+
|
||||
+void CPanelNetworkWidget::handleSideBarItemClicked(QListWidgetItem *item)
|
||||
+{
|
||||
+ ui->stackedWidget->setCurrentIndex(item->data(Qt::UserRole).toInt());
|
||||
+
|
||||
+ QString itemText = item->text();
|
||||
+ KLOG_DEBUG() << "item clicked:" << item->text();
|
||||
+ if(itemText.contains(tr("Wireless Network")))
|
||||
+ {
|
||||
+ KLOG_DEBUG() << "item clicked wireless";
|
||||
+ for (auto device : m_wirelessDeviceList)
|
||||
+ {
|
||||
+ WirelessDevice::Ptr wirelessDevice = qobject_cast<WirelessDevice *>(device);
|
||||
+ QDBusPendingReply<> replyRequestScan = wirelessDevice->requestScan();
|
||||
+
|
||||
+ replyRequestScan.waitForFinished();
|
||||
+ if (replyRequestScan.isError())
|
||||
+ {
|
||||
+ KLOG_DEBUG() << "wireless Device name:" << wirelessDevice->interfaceName() << " requestScan error:" << replyRequestScan.error();
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ KLOG_DEBUG() << "wireless Device name:" << wirelessDevice->interfaceName() << " requestScan reply:" << replyRequestScan.reply();
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/plugins/network/src/plugin/cpanel-network-widget.h b/plugins/network/src/plugin/cpanel-network-widget.h
|
||||
index bb7d74e..112cab8 100644
|
||||
--- a/plugins/network/src/plugin/cpanel-network-widget.h
|
||||
+++ b/plugins/network/src/plugin/cpanel-network-widget.h
|
||||
@@ -50,6 +50,7 @@ public slots:
|
||||
void handleDeviceAdded(const QString &devicePath);
|
||||
void handleDeviceRemoved(const QString &devicePath);
|
||||
void handleThemeChanged(Kiran::PaletteType paletteType);
|
||||
+ void handleSideBarItemClicked(QListWidgetItem *item);
|
||||
|
||||
signals:
|
||||
void subItemsChanged();
|
||||
diff --git a/plugins/network/src/plugin/manager/wireless-manager.cpp b/plugins/network/src/plugin/manager/wireless-manager.cpp
|
||||
index 9f004d3..7c2eabb 100644
|
||||
--- a/plugins/network/src/plugin/manager/wireless-manager.cpp
|
||||
+++ b/plugins/network/src/plugin/manager/wireless-manager.cpp
|
||||
@@ -207,7 +207,7 @@ void WirelessManager::handleActiveConnectionAdded(const QString &path)
|
||||
}
|
||||
}
|
||||
|
||||
-//断开网络时,会自动rescan搜索无线网络
|
||||
+//断开网络时,会自动触发rescan搜索无线网络
|
||||
void WirelessManager::handleActiveConnectionRemoved(const QString &path)
|
||||
{
|
||||
ui->connectionShowPage->handleActiveStateDeactivated(path);
|
||||
diff --git a/plugins/network/src/plugin/setting-widget/disconnect-and-delete-button.cpp b/plugins/network/src/plugin/setting-widget/disconnect-and-delete-button.cpp
|
||||
index 75719a5..0833e9b 100644
|
||||
--- a/plugins/network/src/plugin/setting-widget/disconnect-and-delete-button.cpp
|
||||
+++ b/plugins/network/src/plugin/setting-widget/disconnect-and-delete-button.cpp
|
||||
@@ -59,12 +59,16 @@ void DisconnectAndDeleteButton::initButton(SettingConnectionStatus connectionSta
|
||||
break;
|
||||
}
|
||||
m_activeConnectionPath = activeConnectionPath;
|
||||
+
|
||||
auto activeConnectionPtr = NetworkManager::findActiveConnection(m_activeConnectionPath);
|
||||
- ConnectionSettings::ConnectionType connectionType = activeConnectionPtr->connection()->settings()->connectionType();
|
||||
- if (connectionType == ConnectionSettings::Wireless)
|
||||
+ if(activeConnectionPtr != nullptr)
|
||||
{
|
||||
- ui->deleteButton->setVisible(false);
|
||||
- ui->ignoreButton->setVisible(true);
|
||||
+ ConnectionSettings::ConnectionType connectionType = activeConnectionPtr->connection()->settings()->connectionType();
|
||||
+ if (connectionType == ConnectionSettings::Wireless)
|
||||
+ {
|
||||
+ ui->deleteButton->setVisible(false);
|
||||
+ ui->ignoreButton->setVisible(true);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/plugins/network/src/plugin/setting-widget/wireless-widget.cpp b/plugins/network/src/plugin/setting-widget/wireless-widget.cpp
|
||||
index d04cf51..dac2faa 100644
|
||||
--- a/plugins/network/src/plugin/setting-widget/wireless-widget.cpp
|
||||
+++ b/plugins/network/src/plugin/setting-widget/wireless-widget.cpp
|
||||
@@ -49,8 +49,6 @@ void WirelessWidget::initUI()
|
||||
void WirelessWidget::initConnection()
|
||||
{
|
||||
connect(m_mtuButton, &QAbstractButton::toggled, this, &WirelessWidget::handleCustomMTUChanged);
|
||||
- connect(notifier(),&Notifier::deviceAdded,[=](){initMacComboBox();});
|
||||
- connect(notifier(),&Notifier::deviceRemoved,[=](){initMacComboBox();});
|
||||
}
|
||||
|
||||
void WirelessWidget::setWirelessSetting(const WirelessSetting::Ptr &wirelessSetting)
|
||||
diff --git a/plugins/network/src/tray/network-tray.cpp b/plugins/network/src/tray/network-tray.cpp
|
||||
index 800c819..5aeb35d 100644
|
||||
--- a/plugins/network/src/tray/network-tray.cpp
|
||||
+++ b/plugins/network/src/tray/network-tray.cpp
|
||||
@@ -206,6 +206,7 @@ void NetworkTray::getAvailableDeviceList()
|
||||
}
|
||||
}
|
||||
|
||||
+// Note:点击托盘显示页面的同时,让所有无线设备扫描一次网络
|
||||
void NetworkTray::handleTrayClicked(QSystemTrayIcon::ActivationReason reason)
|
||||
{
|
||||
switch (reason)
|
||||
@@ -216,6 +217,22 @@ void NetworkTray::handleTrayClicked(QSystemTrayIcon::ActivationReason reason)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
+
|
||||
+ for (auto device : m_wirelessDeviceList)
|
||||
+ {
|
||||
+ WirelessDevice::Ptr wirelessDevice = qobject_cast<WirelessDevice *>(device);
|
||||
+ QDBusPendingReply<> replyRequestScan = wirelessDevice->requestScan();
|
||||
+
|
||||
+ replyRequestScan.waitForFinished();
|
||||
+ if (replyRequestScan.isError())
|
||||
+ {
|
||||
+ KLOG_DEBUG() << "wireless Device name:" << wirelessDevice->interfaceName() << " requestScan error:" << replyRequestScan.error();
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ KLOG_DEBUG() << "wireless Device name:" << wirelessDevice->interfaceName() << " requestScan reply:" << replyRequestScan.reply();
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
void NetworkTray::handleNetworkSettingClicked()
|
||||
diff --git a/plugins/network/src/tray/wireless-tray-widget.cpp b/plugins/network/src/tray/wireless-tray-widget.cpp
|
||||
index a9dd141..2a480b1 100644
|
||||
--- a/plugins/network/src/tray/wireless-tray-widget.cpp
|
||||
+++ b/plugins/network/src/tray/wireless-tray-widget.cpp
|
||||
@@ -164,7 +164,7 @@ void WirelessTrayWidget::activateWirelessConnection(const QString &connectionPat
|
||||
StatusNotification::connectitonFailedNotify(connectionPath);
|
||||
}
|
||||
else
|
||||
- KLOG_DEBUG() << "reply.reply():" << reply.reply();
|
||||
+ KLOG_DEBUG() << "reply.reply():" << reply.reply();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,11 +322,23 @@ void WirelessTrayWidget::handleStateActivating(const QString &activatedPath)
|
||||
if (item != nullptr)
|
||||
m_connectionLists->updateItemActivatingStatus(item);
|
||||
}
|
||||
+
|
||||
+ QDBusPendingReply<> replyRequestScan = m_wirelessDevice->requestScan();
|
||||
+ replyRequestScan.waitForFinished();
|
||||
+ KLOG_DEBUG() << "State Activating requestScan";
|
||||
+ if (replyRequestScan.isError())
|
||||
+ {
|
||||
+ KLOG_DEBUG() << "State Activating requestScan error:" << replyRequestScan.error();
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ KLOG_DEBUG() << "State Activating requestScan reply:" << replyRequestScan.reply();
|
||||
+ }
|
||||
}
|
||||
|
||||
void WirelessTrayWidget::handleStateActivated(const QString &activatedPath)
|
||||
{
|
||||
- KLOG_DEBUG() << "Wireless handleStateActivated";
|
||||
+ KLOG_DEBUG() << "Wireless State: Activated";
|
||||
ActiveConnection::Ptr activeConnection = findActiveConnection(activatedPath);
|
||||
if (activeConnection.isNull())
|
||||
return;
|
||||
@@ -341,6 +353,19 @@ void WirelessTrayWidget::handleStateActivated(const QString &activatedPath)
|
||||
StatusNotification::ActiveConnectionActivatedNotify(connectionInfo);
|
||||
m_connectionLists->sortItems();
|
||||
m_connectionLists->update();
|
||||
+
|
||||
+ //连接成功后手动rescan
|
||||
+ QDBusPendingReply<> replyRequestScan = m_wirelessDevice->requestScan();
|
||||
+ replyRequestScan.waitForFinished();
|
||||
+ KLOG_DEBUG() << "--------------------------StateActivated requestScan";
|
||||
+ if (replyRequestScan.isError())
|
||||
+ {
|
||||
+ KLOG_DEBUG() << "StateActivated requestScan error:" << replyRequestScan.error();
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ KLOG_DEBUG() << "StateActivated requestScan reply:" << replyRequestScan.reply();
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,106 +0,0 @@
|
||||
From fb79eb15820419ee346148abd7ce1a52d83becaf Mon Sep 17 00:00:00 2001
|
||||
From: liuxinhao <liuxinhao@kylinsec.com.cn>
|
||||
Date: Wed, 10 Aug 2022 14:42:05 +0800
|
||||
Subject: [PATCH 1/2] fix(search): when the relevant setting interface cannot
|
||||
be searched, a prompt will be added
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 当未能搜索到相关设置界面时加入提示。修改跳转逻辑,不通过补全直接输入并回车也可以触发跳转功能
|
||||
|
||||
Closes #I5H192
|
||||
---
|
||||
src/search-edit/search-edit.cpp | 30 +++++++++++++++++++++--
|
||||
translations/kiran-control-panel.zh_CN.ts | 13 ++++++++++
|
||||
2 files changed, 41 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/search-edit/search-edit.cpp b/src/search-edit/search-edit.cpp
|
||||
index a4b9d9e..5ffcfb6 100644
|
||||
--- a/src/search-edit/search-edit.cpp
|
||||
+++ b/src/search-edit/search-edit.cpp
|
||||
@@ -21,12 +21,14 @@
|
||||
#include <QApplication>
|
||||
#include <QCompleter>
|
||||
#include <QEvent>
|
||||
+#include <QTimer>
|
||||
#include <QKeyEvent>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QListView>
|
||||
#include <QSpacerItem>
|
||||
#include <QStandardItemModel>
|
||||
+#include <kiran-message-box.h>
|
||||
|
||||
SearchEdit::SearchEdit(QWidget *parent)
|
||||
: KiranSearchBox(parent)
|
||||
@@ -53,17 +55,41 @@ void SearchEdit::init()
|
||||
m_completer->installEventFilter(this);
|
||||
|
||||
setCompleter(m_completer);
|
||||
-
|
||||
// clang-format off
|
||||
connect(m_completer, QOverload<const QModelIndex &>::of(&QCompleter::activated), [this](const QModelIndex &index) {
|
||||
if( !index.isValid() )
|
||||
+ {
|
||||
return ;
|
||||
-
|
||||
+ }
|
||||
QString categoryID,subItemID;
|
||||
auto filterModel = m_completer->completionModel();
|
||||
categoryID = filterModel->data(index,SearchModel::roleCategoryID).toString();
|
||||
subItemID = filterModel->data(index,SearchModel::roleSubItemID).toString();
|
||||
emit requestJumpTo(categoryID,subItemID);
|
||||
+ QTimer::singleShot(0,this,&QLineEdit::clear);
|
||||
+ });
|
||||
+ connect(this,&QLineEdit::returnPressed,[this](){
|
||||
+ QString searchkey = text();
|
||||
+ if( searchkey.isEmpty() )
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ auto items = m_searchModel->findItems(searchkey);
|
||||
+ if( items.isEmpty() )
|
||||
+ {
|
||||
+ auto clickedButton = KiranMessageBox::message(this,tr("Info"),tr("Failed to find related items, please re-enter!"),KiranMessageBox::Ok|KiranMessageBox::No);
|
||||
+ if( clickedButton == KiranMessageBox::Ok )
|
||||
+ clear();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ auto item = items.at(0);
|
||||
+ auto categoryID = item->data(SearchModel::roleCategoryID).toString();
|
||||
+ auto subItemID = item->data(SearchModel::roleSubItemID).toString();
|
||||
+ clear();
|
||||
+
|
||||
+ emit requestJumpTo(categoryID,subItemID);
|
||||
});
|
||||
// clang-format on
|
||||
}
|
||||
\ No newline at end of file
|
||||
diff --git a/translations/kiran-control-panel.zh_CN.ts b/translations/kiran-control-panel.zh_CN.ts
|
||||
index 4da29a1..8e4a4a0 100644
|
||||
--- a/translations/kiran-control-panel.zh_CN.ts
|
||||
+++ b/translations/kiran-control-panel.zh_CN.ts
|
||||
@@ -30,4 +30,17 @@
|
||||
<translation>控制面板</translation>
|
||||
</message>
|
||||
</context>
|
||||
+<context>
|
||||
+ <name>SearchEdit</name>
|
||||
+ <message>
|
||||
+ <location filename="../src/search-edit/search-edit.cpp" line="81"/>
|
||||
+ <source>Info</source>
|
||||
+ <translation>提示</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/search-edit/search-edit.cpp" line="81"/>
|
||||
+ <source>Failed to find related items, please re-enter!</source>
|
||||
+ <translation>未能搜索到相关项,请重新输入!</translation>
|
||||
+ </message>
|
||||
+</context>
|
||||
</TS>
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,71 +0,0 @@
|
||||
From 7dda81e40d5e5e18b0138d93b8b5c1785e45040b Mon Sep 17 00:00:00 2001
|
||||
From: liuxinhao <liuxinhao@kylinsec.com.cn>
|
||||
Date: Wed, 3 Aug 2022 11:36:32 +0800
|
||||
Subject: [PATCH 1/2] fix(system): buttons on the system information page are
|
||||
not fully displayed
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 系统信息页面按钮为了避免显示不全恢复之前的大小
|
||||
|
||||
Closes #I5H229
|
||||
---
|
||||
.../pages/system-information/system-information.ui | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/plugins/system/src/pages/system-information/system-information.ui b/plugins/system/src/pages/system-information/system-information.ui
|
||||
index a930da2..5beafd2 100644
|
||||
--- a/plugins/system/src/pages/system-information/system-information.ui
|
||||
+++ b/plugins/system/src/pages/system-information/system-information.ui
|
||||
@@ -187,13 +187,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>56</width>
|
||||
- <height>24</height>
|
||||
+ <height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>56</width>
|
||||
- <height>24</height>
|
||||
+ <height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
@@ -460,13 +460,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>56</width>
|
||||
- <height>24</height>
|
||||
+ <height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>56</width>
|
||||
- <height>24</height>
|
||||
+ <height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
@@ -532,13 +532,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>56</width>
|
||||
- <height>24</height>
|
||||
+ <height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>56</width>
|
||||
- <height>24</height>
|
||||
+ <height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,212 +0,0 @@
|
||||
From 029565d290011d2e4593ff5b5dd4c0c705c964ef Mon Sep 17 00:00:00 2001
|
||||
From: liuxinhao <liuxinhao@kylinsec.com.cn>
|
||||
Date: Fri, 2 Sep 2022 09:43:37 +0800
|
||||
Subject: [PATCH] refactor(account): move some account management controls to
|
||||
common component library
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 移动部分账户管理组件库至共用组件库
|
||||
---
|
||||
lib/common-widgets/CMakeLists.txt | 3 ++-
|
||||
.../widgets => lib/common-widgets/hover-tips}/hover-tips.cpp | 0
|
||||
.../widgets => lib/common-widgets/hover-tips}/hover-tips.h | 0
|
||||
.../widgets => lib/common-widgets/kiran-tips}/kiran-tips.cpp | 0
|
||||
.../widgets => lib/common-widgets/kiran-tips}/kiran-tips.h | 0
|
||||
.../widgets => lib/common-widgets/kiran-tips}/kiran-tips.ui | 0
|
||||
.../lineedit-with-checkicon}/lineedit-with-checkicon.cpp | 2 +-
|
||||
.../lineedit-with-checkicon}/lineedit-with-checkicon.h | 0
|
||||
plugins/account/CMakeLists.txt | 1 +
|
||||
.../src/pages/advance-settings-page/advance-settings.cpp | 2 +-
|
||||
.../account/src/pages/create-user-page/create-user-page.cpp | 2 +-
|
||||
.../account/src/pages/create-user-page/create-user-page.ui | 2 +-
|
||||
plugins/account/src/pages/user-info-page/user-info-page.cpp | 2 +-
|
||||
plugins/account/src/pages/user-info-page/user-info-page.h | 2 +-
|
||||
plugins/account/src/pages/user-info-page/user-info-page.ui | 2 +-
|
||||
resources/control-panel-resources.qrc | 4 ++--
|
||||
16 files changed, 12 insertions(+), 10 deletions(-)
|
||||
rename {plugins/account/src/widgets => lib/common-widgets/hover-tips}/hover-tips.cpp (100%)
|
||||
rename {plugins/account/src/widgets => lib/common-widgets/hover-tips}/hover-tips.h (100%)
|
||||
rename {plugins/account/src/widgets => lib/common-widgets/kiran-tips}/kiran-tips.cpp (100%)
|
||||
rename {plugins/account/src/widgets => lib/common-widgets/kiran-tips}/kiran-tips.h (100%)
|
||||
rename {plugins/account/src/widgets => lib/common-widgets/kiran-tips}/kiran-tips.ui (100%)
|
||||
rename {plugins/account/src/widgets => lib/common-widgets/lineedit-with-checkicon}/lineedit-with-checkicon.cpp (95%)
|
||||
rename {plugins/account/src/widgets => lib/common-widgets/lineedit-with-checkicon}/lineedit-with-checkicon.h (100%)
|
||||
|
||||
diff --git a/lib/common-widgets/CMakeLists.txt b/lib/common-widgets/CMakeLists.txt
|
||||
index b713ea1..2b92f1f 100644
|
||||
--- a/lib/common-widgets/CMakeLists.txt
|
||||
+++ b/lib/common-widgets/CMakeLists.txt
|
||||
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
set (TARGET_NAME common-widgets)
|
||||
|
||||
-find_package(Qt5 COMPONENTS Core Widgets LinguistTools)
|
||||
+find_package(Qt5 COMPONENTS Core Widgets LinguistTools Svg)
|
||||
pkg_search_module(KLOG_QT5 REQUIRED klog-qt5)
|
||||
pkg_search_module(KIRAN_WIDGETS_QT5 REQUIRED kiranwidgets-qt5)
|
||||
pkg_search_module(KIRAN_STYLE_HELPER REQUIRED kiran-style-helper)
|
||||
@@ -27,6 +27,7 @@ target_include_directories(${TARGET_NAME} PRIVATE
|
||||
target_link_libraries(${TARGET_NAME}
|
||||
Qt5::Core
|
||||
Qt5::Widgets
|
||||
+ Qt5::Svg
|
||||
plugin-info
|
||||
${KIRAN_WIDGETS_QT5_LIBRARIES}
|
||||
${KIRAN_STYLE_HELPER_LIBRARIES})
|
||||
\ No newline at end of file
|
||||
diff --git a/plugins/account/src/widgets/hover-tips.cpp b/lib/common-widgets/hover-tips/hover-tips.cpp
|
||||
similarity index 100%
|
||||
rename from plugins/account/src/widgets/hover-tips.cpp
|
||||
rename to lib/common-widgets/hover-tips/hover-tips.cpp
|
||||
diff --git a/plugins/account/src/widgets/hover-tips.h b/lib/common-widgets/hover-tips/hover-tips.h
|
||||
similarity index 100%
|
||||
rename from plugins/account/src/widgets/hover-tips.h
|
||||
rename to lib/common-widgets/hover-tips/hover-tips.h
|
||||
diff --git a/plugins/account/src/widgets/kiran-tips.cpp b/lib/common-widgets/kiran-tips/kiran-tips.cpp
|
||||
similarity index 100%
|
||||
rename from plugins/account/src/widgets/kiran-tips.cpp
|
||||
rename to lib/common-widgets/kiran-tips/kiran-tips.cpp
|
||||
diff --git a/plugins/account/src/widgets/kiran-tips.h b/lib/common-widgets/kiran-tips/kiran-tips.h
|
||||
similarity index 100%
|
||||
rename from plugins/account/src/widgets/kiran-tips.h
|
||||
rename to lib/common-widgets/kiran-tips/kiran-tips.h
|
||||
diff --git a/plugins/account/src/widgets/kiran-tips.ui b/lib/common-widgets/kiran-tips/kiran-tips.ui
|
||||
similarity index 100%
|
||||
rename from plugins/account/src/widgets/kiran-tips.ui
|
||||
rename to lib/common-widgets/kiran-tips/kiran-tips.ui
|
||||
diff --git a/plugins/account/src/widgets/lineedit-with-checkicon.cpp b/lib/common-widgets/lineedit-with-checkicon/lineedit-with-checkicon.cpp
|
||||
similarity index 95%
|
||||
rename from plugins/account/src/widgets/lineedit-with-checkicon.cpp
|
||||
rename to lib/common-widgets/lineedit-with-checkicon/lineedit-with-checkicon.cpp
|
||||
index 1482d5b..2f2fef1 100644
|
||||
--- a/plugins/account/src/widgets/lineedit-with-checkicon.cpp
|
||||
+++ b/lib/common-widgets/lineedit-with-checkicon/lineedit-with-checkicon.cpp
|
||||
@@ -38,7 +38,7 @@ LineEditWithCheckIcon::~LineEditWithCheckIcon()
|
||||
|
||||
void LineEditWithCheckIcon::setVerificationStatus(bool isPassed)
|
||||
{
|
||||
- QString iconPath = isPassed ? ":/kcp-account/images/success-indicator.svg" : ":/kcp-account/images/error-indicator.svg";
|
||||
+ QString iconPath = isPassed ? ":/kiran-control-panel/images/success-indicator.svg" : ":/kiran-control-panel/images/error-indicator.svg";
|
||||
m_verificationStatus = isPassed ? VERIFICATION_PASSED : VERIFICATION_ERROR;
|
||||
setIcon(QIcon(iconPath));
|
||||
}
|
||||
diff --git a/plugins/account/src/widgets/lineedit-with-checkicon.h b/lib/common-widgets/lineedit-with-checkicon/lineedit-with-checkicon.h
|
||||
similarity index 100%
|
||||
rename from plugins/account/src/widgets/lineedit-with-checkicon.h
|
||||
rename to lib/common-widgets/lineedit-with-checkicon/lineedit-with-checkicon.h
|
||||
diff --git a/plugins/account/CMakeLists.txt b/plugins/account/CMakeLists.txt
|
||||
index 4dd6107..dfb4e01 100644
|
||||
--- a/plugins/account/CMakeLists.txt
|
||||
+++ b/plugins/account/CMakeLists.txt
|
||||
@@ -77,6 +77,7 @@ target_include_directories(${TARGET_NAME} PRIVATE
|
||||
${KIRAN_STYLE_HELPER_INCLUDE_DIRS})
|
||||
|
||||
target_link_libraries(${TARGET_NAME}
|
||||
+ common-widgets
|
||||
Qt5::Widgets
|
||||
Qt5::DBus
|
||||
Qt5::Svg
|
||||
diff --git a/plugins/account/src/pages/advance-settings-page/advance-settings.cpp b/plugins/account/src/pages/advance-settings-page/advance-settings.cpp
|
||||
index 77f714a..9e58fc2 100644
|
||||
--- a/plugins/account/src/pages/advance-settings-page/advance-settings.cpp
|
||||
+++ b/plugins/account/src/pages/advance-settings-page/advance-settings.cpp
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "global-defines.h"
|
||||
#include "ui_advance-settings.h"
|
||||
#include "uid-validator.h"
|
||||
-#include "kiran-tips.h"
|
||||
+#include "kiran-tips/kiran-tips.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
diff --git a/plugins/account/src/pages/create-user-page/create-user-page.cpp b/plugins/account/src/pages/create-user-page/create-user-page.cpp
|
||||
index 22555d1..51197cb 100644
|
||||
--- a/plugins/account/src/pages/create-user-page/create-user-page.cpp
|
||||
+++ b/plugins/account/src/pages/create-user-page/create-user-page.cpp
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "create-user-page.h"
|
||||
#include "accounts-global-info.h"
|
||||
-#include "kiran-tips.h"
|
||||
+#include "kiran-tips/kiran-tips.h"
|
||||
#include "passwd-helper.h"
|
||||
#include "src/pages/advance-settings-page/advance-settings.h"
|
||||
#include "ui_create-user-page.h"
|
||||
diff --git a/plugins/account/src/pages/create-user-page/create-user-page.ui b/plugins/account/src/pages/create-user-page/create-user-page.ui
|
||||
index 7e6024f..8894d01 100644
|
||||
--- a/plugins/account/src/pages/create-user-page/create-user-page.ui
|
||||
+++ b/plugins/account/src/pages/create-user-page/create-user-page.ui
|
||||
@@ -488,7 +488,7 @@
|
||||
<customwidget>
|
||||
<class>LineEditWithCheckIcon</class>
|
||||
<extends>QWidget</extends>
|
||||
- <header location="global">lineedit-with-checkicon.h</header>
|
||||
+ <header location="global">lineedit-with-checkicon/lineedit-with-checkicon.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
diff --git a/plugins/account/src/pages/user-info-page/user-info-page.cpp b/plugins/account/src/pages/user-info-page/user-info-page.cpp
|
||||
index b4d9b4b..5ddb940 100644
|
||||
--- a/plugins/account/src/pages/user-info-page/user-info-page.cpp
|
||||
+++ b/plugins/account/src/pages/user-info-page/user-info-page.cpp
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "user-info-page.h"
|
||||
#include "accounts-global-info.h"
|
||||
-#include "hover-tips.h"
|
||||
+#include "hover-tips/hover-tips.h"
|
||||
#include "ksd_accounts_user_proxy.h"
|
||||
#include "passwd-helper.h"
|
||||
#include "ui_user-info-page.h"
|
||||
diff --git a/plugins/account/src/pages/user-info-page/user-info-page.h b/plugins/account/src/pages/user-info-page/user-info-page.h
|
||||
index 5cba81e..99d59ba 100644
|
||||
--- a/plugins/account/src/pages/user-info-page/user-info-page.h
|
||||
+++ b/plugins/account/src/pages/user-info-page/user-info-page.h
|
||||
@@ -15,7 +15,7 @@
|
||||
#ifndef USERINFOPAGE_H
|
||||
#define USERINFOPAGE_H
|
||||
|
||||
-#include "kiran-tips.h"
|
||||
+#include "kiran-tips/kiran-tips.h"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
diff --git a/plugins/account/src/pages/user-info-page/user-info-page.ui b/plugins/account/src/pages/user-info-page/user-info-page.ui
|
||||
index b0c9cbe..a452b75 100644
|
||||
--- a/plugins/account/src/pages/user-info-page/user-info-page.ui
|
||||
+++ b/plugins/account/src/pages/user-info-page/user-info-page.ui
|
||||
@@ -868,7 +868,7 @@
|
||||
<customwidget>
|
||||
<class>LineEditWithCheckIcon</class>
|
||||
<extends>QWidget</extends>
|
||||
- <header location="global">lineedit-with-checkicon.h</header>
|
||||
+ <header location="global">lineedit-with-checkicon/lineedit-with-checkicon.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
diff --git a/resources/control-panel-resources.qrc b/resources/control-panel-resources.qrc
|
||||
index c478dd5..b4452e7 100644
|
||||
--- a/resources/control-panel-resources.qrc
|
||||
+++ b/resources/control-panel-resources.qrc
|
||||
@@ -12,14 +12,14 @@
|
||||
<file>images/trash-hover.svg</file>
|
||||
<file>images/trash-pressed.svg</file>
|
||||
<file>images/indicator-selected.png</file>
|
||||
+ <file alias="images/success-indicator.svg">images/current-avatar-indicator.svg</file>
|
||||
+ <file>images/error-indicator.svg</file>
|
||||
</qresource>
|
||||
|
||||
<qresource prefix="/kcp-account">
|
||||
<file>images/create-user-avatar.png</file>
|
||||
<file>images/change-user-avatar.png</file>
|
||||
<file>images/current-avatar-indicator.svg</file>
|
||||
- <file alias="images/success-indicator.svg">images/current-avatar-indicator.svg</file>
|
||||
- <file>images/error-indicator.svg</file>
|
||||
<file>images/finger-0.svg</file>
|
||||
<file>images/finger-25.svg</file>
|
||||
<file>images/finger-50.svg</file>
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
From cd389d7ded1fa975efe2082d1f5921f1fd00e809 Mon Sep 17 00:00:00 2001
|
||||
From: liuxinhao <liuxinhao@kylinsec.com.cn>
|
||||
Date: Tue, 9 Aug 2022 09:38:42 +0800
|
||||
Subject: [PATCH] refactor(panel): set panel creategory widget auto fill
|
||||
background
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 适配KiranStyle 滚动区域绘制调整,手动打开滚动区域autofillbackground
|
||||
---
|
||||
src/category-widget.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/category-widget.cpp b/src/category-widget.cpp
|
||||
index 83c3b26..4a0580e 100644
|
||||
--- a/src/category-widget.cpp
|
||||
+++ b/src/category-widget.cpp
|
||||
@@ -56,6 +56,7 @@ void CategoryWidget::init()
|
||||
|
||||
//滚动区域
|
||||
auto pScrollArea = new QScrollArea(this);
|
||||
+ pScrollArea->setAutoFillBackground(true);
|
||||
pScrollArea->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
pScrollArea->setFrameStyle(QFrame::NoFrame);
|
||||
layout->addWidget(pScrollArea);
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,58 +0,0 @@
|
||||
From f8ddcc8b9d0a53e9105bc42feb6f5d02561e207e Mon Sep 17 00:00:00 2001
|
||||
From: liuxinhao <liuxinhao@kylinsec.com.cn>
|
||||
Date: Thu, 18 Aug 2022 20:39:14 +0800
|
||||
Subject: [PATCH 2/2] fix(account): The connection singleton in the signal slot
|
||||
is not automatically disconnected because the receiver parameter is not
|
||||
added, resulting in a crash
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 修复账户管理中信号槽中连接单例未加入接受者参数导致未自动断开,崩溃问题
|
||||
|
||||
Closes #I5HRYF
|
||||
---
|
||||
plugins/account/src/kiran-account-manager.cpp | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/plugins/account/src/kiran-account-manager.cpp b/plugins/account/src/kiran-account-manager.cpp
|
||||
index 8602456..c21b8b9 100644
|
||||
--- a/plugins/account/src/kiran-account-manager.cpp
|
||||
+++ b/plugins/account/src/kiran-account-manager.cpp
|
||||
@@ -359,7 +359,7 @@ void KiranAccountManager::initPageSelectAvatar()
|
||||
void KiranAccountManager::initPageAuthManager()
|
||||
{
|
||||
//TODO:init auth manager page
|
||||
- connect(m_page_authManager, &AuthManagerPage::sigReturn, [this]() {
|
||||
+ connect(m_page_authManager, &AuthManagerPage::sigReturn, this,[this]() {
|
||||
m_stackWidget->setCurrentIndex(PAGE_USER_INFO);
|
||||
});
|
||||
}
|
||||
@@ -367,13 +367,13 @@ void KiranAccountManager::initPageAuthManager()
|
||||
void KiranAccountManager::connectToInfoChanged()
|
||||
{
|
||||
//处理用户新增、删除
|
||||
- connect(AccountsGlobalInfo::instance(), &AccountsGlobalInfo::UserAdded,
|
||||
+ connect(AccountsGlobalInfo::instance(), &AccountsGlobalInfo::UserAdded,this,
|
||||
[this](const QDBusObjectPath &obj) {
|
||||
KLOG_INFO() << "siderbar add item:" << obj.path();
|
||||
appendSiderbarItem(obj.path());
|
||||
});
|
||||
|
||||
- connect(AccountsGlobalInfo::instance(), &AccountsGlobalInfo::UserDeleted,
|
||||
+ connect(AccountsGlobalInfo::instance(), &AccountsGlobalInfo::UserDeleted,this,
|
||||
[this](const QDBusObjectPath &obj) {
|
||||
KLOG_INFO() << "siderbar delete item:" << obj.path();
|
||||
int findIdx = -1;
|
||||
@@ -402,7 +402,7 @@ void KiranAccountManager::connectToInfoChanged()
|
||||
});
|
||||
|
||||
//处理用户属性变更
|
||||
- connect(AccountsGlobalInfo::instance(), &AccountsGlobalInfo::UserPropertyChanged,
|
||||
+ connect(AccountsGlobalInfo::instance(), &AccountsGlobalInfo::UserPropertyChanged,this,
|
||||
[this](QString userPath, QString propertyName, QVariant value) {
|
||||
//侧边栏
|
||||
if ((propertyName == "locked") || (propertyName == "icon_file"))
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,31 +0,0 @@
|
||||
From 0ea6996cf22fa8cece850bd8ba8aaa21ad1ff845 Mon Sep 17 00:00:00 2001
|
||||
From: liuxinhao <liuxinhao@kylinsec.com.cn>
|
||||
Date: Wed, 10 Aug 2022 14:59:37 +0800
|
||||
Subject: [PATCH 2/2] fix(account): error prompt box is added with the default
|
||||
disappearance time
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 错误提示框在点击消失的基础之上,加入默认消失时间
|
||||
|
||||
Closes #I5HR61
|
||||
---
|
||||
plugins/account/src/widgets/kiran-tips.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/plugins/account/src/widgets/kiran-tips.cpp b/plugins/account/src/widgets/kiran-tips.cpp
|
||||
index 294671d..622be54 100644
|
||||
--- a/plugins/account/src/widgets/kiran-tips.cpp
|
||||
+++ b/plugins/account/src/widgets/kiran-tips.cpp
|
||||
@@ -82,6 +82,7 @@ KiranTips::KiranTips(QWidget *parent) : QWidget(parent),
|
||||
}
|
||||
});
|
||||
setVisible(false);
|
||||
+ setHideTimeout(3000);
|
||||
}
|
||||
|
||||
KiranTips::~KiranTips()
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,246 +0,0 @@
|
||||
From a06103989392882b5693a310b1e1540b5a998af0 Mon Sep 17 00:00:00 2001
|
||||
From: luoqing <luoqing@kylinsec.com.cn>
|
||||
Date: Thu, 25 Aug 2022 19:28:58 +0800
|
||||
Subject: [PATCH 2/2] fix(network):Temporarily do not overwrite the
|
||||
NetworkManager configuration and optimize the code
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 暂时不覆盖NetworkManager配置,优化代码
|
||||
---
|
||||
plugins/network/CMakeLists.txt | 2 +-
|
||||
plugins/network/src/tray/network-tray.cpp | 25 ++++++++++++++---------
|
||||
plugins/network/src/tray/tray-page.cpp | 25 +++++++++++++++--------
|
||||
plugins/network/src/tray/tray-page.h | 7 +++----
|
||||
plugins/network/src/tray/tray-page.ui | 3 +++
|
||||
plugins/network/src/utils.cpp | 0
|
||||
plugins/network/src/utils.h | 0
|
||||
7 files changed, 38 insertions(+), 24 deletions(-)
|
||||
create mode 100644 plugins/network/src/utils.cpp
|
||||
create mode 100644 plugins/network/src/utils.h
|
||||
|
||||
diff --git a/plugins/network/CMakeLists.txt b/plugins/network/CMakeLists.txt
|
||||
index 02dbe3a..802c52f 100644
|
||||
--- a/plugins/network/CMakeLists.txt
|
||||
+++ b/plugins/network/CMakeLists.txt
|
||||
@@ -117,7 +117,7 @@ SET(link_target ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}-link.desktop)
|
||||
|
||||
set(NETWORK_SERVER_CONF /etc/NetworkManager/conf.d)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/00-server.conf.in ${CMAKE_CURRENT_BINARY_DIR}/00-server.conf @ONLY)
|
||||
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/00-server.conf DESTINATION ${NETWORK_SERVER_CONF}/)
|
||||
+# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/00-server.conf DESTINATION ${NETWORK_SERVER_CONF}/)
|
||||
|
||||
#安装插件和二进制文件
|
||||
install(TARGETS ${TARGET_NAME} DESTINATION ${PLUGIN_LIBS_INSTALL_DIR}/)
|
||||
diff --git a/plugins/network/src/tray/network-tray.cpp b/plugins/network/src/tray/network-tray.cpp
|
||||
index 232882b..a282cf9 100644
|
||||
--- a/plugins/network/src/tray/network-tray.cpp
|
||||
+++ b/plugins/network/src/tray/network-tray.cpp
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "network-tray.h"
|
||||
#include <qt5-log-i.h>
|
||||
#include <style-palette.h>
|
||||
+#include <NetworkManagerQt/Settings>
|
||||
#include <QMenu>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
@@ -47,6 +48,8 @@ void NetworkTray::init()
|
||||
initUI();
|
||||
initMenu();
|
||||
initConnect();
|
||||
+
|
||||
+ NetworkManager::Connection::List listConnections();
|
||||
}
|
||||
|
||||
void NetworkTray::initUI()
|
||||
@@ -127,6 +130,7 @@ void NetworkTray::initConnect()
|
||||
} });
|
||||
|
||||
connect(notifier(), &Notifier::deviceRemoved, this, &NetworkTray::handleDeviceRemoved);
|
||||
+
|
||||
connect(notifier(), &Notifier::statusChanged, this, &NetworkTray::handleNetworkManagerStatusChanged);
|
||||
|
||||
connect(notifier(), &Notifier::primaryConnectionChanged, this, &NetworkTray::handlePrimaryConnectionChanged);
|
||||
@@ -152,6 +156,7 @@ void NetworkTray::initTrayIcon()
|
||||
{
|
||||
m_systemTray = new QSystemTrayIcon();
|
||||
setTrayIcon(NetworkManager::status());
|
||||
+ KLOG_DEBUG() << " NetworkManager::status():" << NetworkManager::status();
|
||||
m_systemTray->show();
|
||||
}
|
||||
|
||||
@@ -187,9 +192,8 @@ void NetworkTray::getAvailableDeviceList()
|
||||
KLOG_DEBUG() << "dev->interfaceName():" << dev->interfaceName();
|
||||
KLOG_DEBUG() << "dev->state():" << dev->state();
|
||||
KLOG_DEBUG() << "dev->isValid():" << dev->isValid();
|
||||
+ KLOG_DEBUG() << "dev->managed():" << dev->managed();
|
||||
|
||||
- if (dev->state() == Device::Unavailable)
|
||||
- continue;
|
||||
if (dev->state() == Device::Unmanaged)
|
||||
continue;
|
||||
|
||||
@@ -317,21 +321,24 @@ void NetworkTray::setTrayIcon(NetworkManager::Status status)
|
||||
// int signalStrength = wirelessNetwork->signalStrength();
|
||||
|
||||
m_systemTray->setIcon(trayIconColorSwitch(":/kcp-network-images/wireless-4.svg"));
|
||||
+ KLOG_DEBUG() << "setIcon kcp-network-images/wireless-4.svg";
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ m_systemTray->setIcon(trayIconColorSwitch(":/kcp-network-images/wired-connection.svg"));
|
||||
+ KLOG_DEBUG() << "setIcon kcp-network-images/wireless-connection.svg";
|
||||
}
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- // 可用
|
||||
- m_systemTray->setIcon(trayIconColorSwitch(":/kcp-network-images/wired-connection.svg"));
|
||||
}
|
||||
}
|
||||
- else if (status == NetworkManager::Status::Disconnecting || NetworkManager::Status::Connecting)
|
||||
+ else if ((status == NetworkManager::Status::Disconnecting) || (status == NetworkManager::Status::Connecting))
|
||||
{
|
||||
// TODO:加载动画
|
||||
+ KLOG_DEBUG() << "setIcon null";
|
||||
}
|
||||
else
|
||||
{
|
||||
m_systemTray->setIcon(trayIconColorSwitch(":/kcp-network-images/wired-disconnected.svg"));
|
||||
+ KLOG_DEBUG() << "setIcon kcp-network-images/wireless-disconnected.svg";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,8 +403,6 @@ void NetworkTray::handleDeviceManagedChanged()
|
||||
* XXX:由于在禁用和开启wifi时,并没有发出Wireless设备的deviceRemoved和deviceAdded信号
|
||||
* 并且当WirelessEnabledChanged信号发送时,device state 还处在unavailbel 不可用状态,需要处理
|
||||
*/
|
||||
-
|
||||
-// TODO:托盘对不可用状态进行提示
|
||||
void NetworkTray::handleWirelessEnabledChanged(bool enable)
|
||||
{
|
||||
KLOG_DEBUG() << "-----------------------handleWirelessEnabledChanged:" << enable;
|
||||
diff --git a/plugins/network/src/tray/tray-page.cpp b/plugins/network/src/tray/tray-page.cpp
|
||||
index c854d36..fd986fd 100644
|
||||
--- a/plugins/network/src/tray/tray-page.cpp
|
||||
+++ b/plugins/network/src/tray/tray-page.cpp
|
||||
@@ -35,28 +35,33 @@ void TrayPage::init()
|
||||
{
|
||||
if (m_deviceList.count() != 0)
|
||||
{
|
||||
- Device::Type deviceType = m_deviceList.value(0)->type();
|
||||
- initUI(deviceType);
|
||||
+ initUI();
|
||||
initConnection();
|
||||
}
|
||||
}
|
||||
|
||||
// XXX:修改初始化
|
||||
-void TrayPage::initUI(Device::Type deviceType)
|
||||
+void TrayPage::initUI()
|
||||
{
|
||||
setFixedWidth(240);
|
||||
setMaximumHeight(434);
|
||||
ui->stackedWidget->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
// if (m_deviceList.count() > 1)
|
||||
- // setMultiDeviceWidget(deviceType);
|
||||
+ // setMultiDeviceWidget();
|
||||
// else if (m_deviceList.count() == 1)
|
||||
// {
|
||||
- // setSingleDeviceWidget(deviceType);
|
||||
+ // setSingleDeviceWidget();
|
||||
// }
|
||||
+ // else
|
||||
+ // {
|
||||
+ // // m_deviceeList.count == 0
|
||||
+ // return;
|
||||
+ // }
|
||||
+
|
||||
if (m_deviceList.count() != 0)
|
||||
{
|
||||
- setMultiDeviceWidget(deviceType);
|
||||
+ setMultiDeviceWidget();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -69,12 +74,13 @@ void TrayPage::initConnection()
|
||||
{
|
||||
}
|
||||
|
||||
-void TrayPage::setMultiDeviceWidget(Device::Type deviceType)
|
||||
+void TrayPage::setMultiDeviceWidget()
|
||||
{
|
||||
for (Device::Ptr dev : m_deviceList)
|
||||
{
|
||||
QString devicePath = dev->uni();
|
||||
QString deviceName = dev->interfaceName();
|
||||
+ Device::Type deviceType = dev->type();
|
||||
ui->deviceComboBox->addItem(deviceName, devicePath);
|
||||
|
||||
if (deviceType == Device::Ethernet)
|
||||
@@ -111,10 +117,11 @@ void TrayPage::setMultiDeviceWidget(Device::Type deviceType)
|
||||
ui->selectDevicewidget->setVisible(true);
|
||||
}
|
||||
|
||||
-void TrayPage::setSingleDeviceWidget(Device::Type deviceType)
|
||||
+void TrayPage::setSingleDeviceWidget()
|
||||
{
|
||||
ui->selectDevicewidget->setVisible(false);
|
||||
- QString devicePath = m_deviceList.at(0)->uni();
|
||||
+ QString devicePath = m_deviceList.value(0)->uni();
|
||||
+ Device::Type deviceType = m_deviceList.value(0)->type();
|
||||
if (deviceType == Device::Ethernet)
|
||||
{
|
||||
WiredTrayWidget *wiredTrayWidget = new WiredTrayWidget(devicePath, this);
|
||||
diff --git a/plugins/network/src/tray/tray-page.h b/plugins/network/src/tray/tray-page.h
|
||||
index 20cacd0..d49e670 100644
|
||||
--- a/plugins/network/src/tray/tray-page.h
|
||||
+++ b/plugins/network/src/tray/tray-page.h
|
||||
@@ -24,7 +24,6 @@ class TrayPage;
|
||||
}
|
||||
QT_END_NAMESPACE
|
||||
|
||||
-
|
||||
class TrayPage : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -34,11 +33,11 @@ public:
|
||||
~TrayPage() override;
|
||||
|
||||
void init();
|
||||
- void initUI(NetworkManager::Device::Type deviceType);
|
||||
+ void initUI();
|
||||
void initConnection();
|
||||
|
||||
- void setMultiDeviceWidget(NetworkManager::Device::Type deviceType);
|
||||
- void setSingleDeviceWidget(NetworkManager::Device::Type deviceType);
|
||||
+ void setMultiDeviceWidget();
|
||||
+ void setSingleDeviceWidget();
|
||||
QStringList devicePathList();
|
||||
|
||||
public slots:
|
||||
diff --git a/plugins/network/src/tray/tray-page.ui b/plugins/network/src/tray/tray-page.ui
|
||||
index f922c84..7a089ca 100644
|
||||
--- a/plugins/network/src/tray/tray-page.ui
|
||||
+++ b/plugins/network/src/tray/tray-page.ui
|
||||
@@ -31,6 +31,9 @@
|
||||
<property name="windowTitle">
|
||||
<string>TrayPage</string>
|
||||
</property>
|
||||
+ <property name="styleSheet">
|
||||
+ <string notr="true"/>
|
||||
+ </property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
diff --git a/plugins/network/src/utils.cpp b/plugins/network/src/utils.cpp
|
||||
new file mode 100644
|
||||
index 0000000..e69de29
|
||||
diff --git a/plugins/network/src/utils.h b/plugins/network/src/utils.h
|
||||
new file mode 100644
|
||||
index 0000000..e69de29
|
||||
--
|
||||
2.33.0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,236 +0,0 @@
|
||||
From 01ff81b4cfe1749f685f33798c3394f62180353f Mon Sep 17 00:00:00 2001
|
||||
From: liuxinhao <liuxinhao@kylinsec.com.cn>
|
||||
Date: Wed, 3 Aug 2022 17:15:21 +0800
|
||||
Subject: [PATCH 2/2] refactor(systeminfo): update systeminfo plugin dialog
|
||||
style
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 更新统一系统信息页面插件弹窗风格样式
|
||||
|
||||
Closes #I5H3YX
|
||||
---
|
||||
.../change-host-name-widget.ui | 60 ++++++++++++++++---
|
||||
.../system-information/license-agreement.ui | 51 ++++++++++++----
|
||||
2 files changed, 91 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/plugins/system/src/pages/system-information/change-host-name-widget.ui b/plugins/system/src/pages/system-information/change-host-name-widget.ui
|
||||
index f56bb94..a677bbc 100644
|
||||
--- a/plugins/system/src/pages/system-information/change-host-name-widget.ui
|
||||
+++ b/plugins/system/src/pages/system-information/change-host-name-widget.ui
|
||||
@@ -122,7 +122,7 @@
|
||||
<widget class="QWidget" name="widget_2" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
- <number>58</number>
|
||||
+ <number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
@@ -136,18 +136,31 @@
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
+ <item>
|
||||
+ <spacer name="horizontalSpacer_2">
|
||||
+ <property name="orientation">
|
||||
+ <enum>Qt::Horizontal</enum>
|
||||
+ </property>
|
||||
+ <property name="sizeHint" stdset="0">
|
||||
+ <size>
|
||||
+ <width>40</width>
|
||||
+ <height>20</height>
|
||||
+ </size>
|
||||
+ </property>
|
||||
+ </spacer>
|
||||
+ </item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_save">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
- <width>192</width>
|
||||
- <height>60</height>
|
||||
+ <width>110</width>
|
||||
+ <height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
- <width>192</width>
|
||||
- <height>60</height>
|
||||
+ <width>110</width>
|
||||
+ <height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
@@ -155,18 +168,34 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
+ <item>
|
||||
+ <spacer name="horizontalSpacer">
|
||||
+ <property name="orientation">
|
||||
+ <enum>Qt::Horizontal</enum>
|
||||
+ </property>
|
||||
+ <property name="sizeType">
|
||||
+ <enum>QSizePolicy::Fixed</enum>
|
||||
+ </property>
|
||||
+ <property name="sizeHint" stdset="0">
|
||||
+ <size>
|
||||
+ <width>40</width>
|
||||
+ <height>20</height>
|
||||
+ </size>
|
||||
+ </property>
|
||||
+ </spacer>
|
||||
+ </item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_cancel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
- <width>192</width>
|
||||
- <height>60</height>
|
||||
+ <width>110</width>
|
||||
+ <height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
- <width>192</width>
|
||||
- <height>60</height>
|
||||
+ <width>110</width>
|
||||
+ <height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
@@ -174,6 +203,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
+ <item>
|
||||
+ <spacer name="horizontalSpacer_3">
|
||||
+ <property name="orientation">
|
||||
+ <enum>Qt::Horizontal</enum>
|
||||
+ </property>
|
||||
+ <property name="sizeHint" stdset="0">
|
||||
+ <size>
|
||||
+ <width>40</width>
|
||||
+ <height>20</height>
|
||||
+ </size>
|
||||
+ </property>
|
||||
+ </spacer>
|
||||
+ </item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
diff --git a/plugins/system/src/pages/system-information/license-agreement.ui b/plugins/system/src/pages/system-information/license-agreement.ui
|
||||
index 83f20d2..727cc85 100644
|
||||
--- a/plugins/system/src/pages/system-information/license-agreement.ui
|
||||
+++ b/plugins/system/src/pages/system-information/license-agreement.ui
|
||||
@@ -76,15 +76,15 @@
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
-</style></head><body style=" font-family:'Noto Sans CJK SC'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
|
||||
+</style></head><body style=" font-family:'Noto Sans CJK SC'; font-size:10pt; font-weight:400; font-style:normal;">
|
||||
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;"><br /></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
- <number>24</number>
|
||||
+ <number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>24</number>
|
||||
@@ -92,18 +92,31 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="rightMargin">
|
||||
<number>24</number>
|
||||
</property>
|
||||
+ <item>
|
||||
+ <spacer name="horizontalSpacer_2">
|
||||
+ <property name="orientation">
|
||||
+ <enum>Qt::Horizontal</enum>
|
||||
+ </property>
|
||||
+ <property name="sizeHint" stdset="0">
|
||||
+ <size>
|
||||
+ <width>40</width>
|
||||
+ <height>20</height>
|
||||
+ </size>
|
||||
+ </property>
|
||||
+ </spacer>
|
||||
+ </item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_license_export">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
- <width>252</width>
|
||||
- <height>60</height>
|
||||
+ <width>110</width>
|
||||
+ <height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
- <width>252</width>
|
||||
- <height>60</height>
|
||||
+ <width>110</width>
|
||||
+ <height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
@@ -116,6 +129,9 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
+ <property name="sizeType">
|
||||
+ <enum>QSizePolicy::Fixed</enum>
|
||||
+ </property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
@@ -134,14 +150,14 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
- <width>252</width>
|
||||
- <height>60</height>
|
||||
+ <width>110</width>
|
||||
+ <height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
- <width>252</width>
|
||||
- <height>60</height>
|
||||
+ <width>110</width>
|
||||
+ <height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
@@ -149,6 +165,19 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
+ <item>
|
||||
+ <spacer name="horizontalSpacer_3">
|
||||
+ <property name="orientation">
|
||||
+ <enum>Qt::Horizontal</enum>
|
||||
+ </property>
|
||||
+ <property name="sizeHint" stdset="0">
|
||||
+ <size>
|
||||
+ <width>40</width>
|
||||
+ <height>20</height>
|
||||
+ </size>
|
||||
+ </property>
|
||||
+ </spacer>
|
||||
+ </item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
From 50c2ccba7af88dfe335a5dfdeff54e4371238316 Mon Sep 17 00:00:00 2001
|
||||
From: luoqing <luoqing@kylinsec.com.cn>
|
||||
Date: Fri, 19 Aug 2022 15:24:13 +0800
|
||||
Subject: [PATCH 3/7] fix(network):fix the problem of network and details
|
||||
corresponding error
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 修复网络详情页面中网络与详情对应错误
|
||||
|
||||
Close #I5M0L9
|
||||
---
|
||||
plugins/network/src/plugin/details-page.cpp | 10 ++++++----
|
||||
plugins/network/src/plugin/details-page.h | 2 +-
|
||||
2 files changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/plugins/network/src/plugin/details-page.cpp b/plugins/network/src/plugin/details-page.cpp
|
||||
index dfee3f6..5ba4d12 100644
|
||||
--- a/plugins/network/src/plugin/details-page.cpp
|
||||
+++ b/plugins/network/src/plugin/details-page.cpp
|
||||
@@ -75,11 +75,11 @@ void DetailsPage::initMultiConnectionDetailsWidget()
|
||||
QWidget *widget = new ConnectionDetailsWidget(device, this);
|
||||
ui->stackedWidget->addWidget(widget);
|
||||
}
|
||||
- connect(ui->activatedConnectionComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
- &DetailsPage::handleActivatedConnectionComboBoxChanged);
|
||||
+ connect(ui->activatedConnectionComboBox, QOverload<int>::of(&QComboBox::activated), this,
|
||||
+ &DetailsPage::handleActivatedConnectionComboBoxActivated, Qt::UniqueConnection);
|
||||
}
|
||||
|
||||
-void DetailsPage::handleActivatedConnectionComboBoxChanged(int index)
|
||||
+void DetailsPage::handleActivatedConnectionComboBoxActivated(int index)
|
||||
{
|
||||
ui->stackedWidget->setCurrentIndex(index);
|
||||
}
|
||||
@@ -131,10 +131,12 @@ void DetailsPage::clear()
|
||||
{
|
||||
m_deviceList.clear();
|
||||
ui->activatedConnectionComboBox->clear();
|
||||
- for (int i = 0; i < ui->stackedWidget->count(); ++i)
|
||||
+ int count = ui->stackedWidget->count();
|
||||
+ for (int i = 0; i < count; i++)
|
||||
{
|
||||
QWidget *widget = ui->stackedWidget->currentWidget();
|
||||
ui->stackedWidget->removeWidget(widget);
|
||||
+ widget->deleteLater();
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/plugins/network/src/plugin/details-page.h b/plugins/network/src/plugin/details-page.h
|
||||
index e7cb744..f0cceb1 100644
|
||||
--- a/plugins/network/src/plugin/details-page.h
|
||||
+++ b/plugins/network/src/plugin/details-page.h
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
void reload();
|
||||
|
||||
public slots:
|
||||
- void handleActivatedConnectionComboBoxChanged(int index);
|
||||
+ void handleActivatedConnectionComboBoxActivated(int index);
|
||||
void handleDeviceAdded(const QString &devicePath);
|
||||
void handleDeviceRemoved(const QString &devicePath);
|
||||
void handleActiveConnectionAdded(const QString &activeConnectionPath);
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,532 +0,0 @@
|
||||
From 4b63a44d04c18418076fe7570887e601b499671c Mon Sep 17 00:00:00 2001
|
||||
From: luoqing <luoqing@kylinsec.com.cn>
|
||||
Date: Tue, 23 Aug 2022 09:19:05 +0800
|
||||
Subject: [PATCH 4/7] fix(network):Add error prompt box when saving
|
||||
configuration
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 保存配置时,增加错误提示框
|
||||
|
||||
Close #I5GYQD
|
||||
---
|
||||
.../src/plugin/manager/wired-manager.cpp | 2 +
|
||||
.../setting-widget/connection-name-widget.cpp | 16 ++-
|
||||
.../plugin/setting-widget/ethernet-widget.cpp | 27 +++--
|
||||
.../src/plugin/setting-widget/ipv4-widget.cpp | 105 ++++++++++++++----
|
||||
.../src/plugin/setting-widget/ipv6-widget.cpp | 62 +++++++++--
|
||||
.../src/plugin/settings/setting-page.cpp | 10 +-
|
||||
.../plugin/settings/wired-setting-page.cpp | 7 +-
|
||||
7 files changed, 180 insertions(+), 49 deletions(-)
|
||||
|
||||
diff --git a/plugins/network/src/plugin/manager/wired-manager.cpp b/plugins/network/src/plugin/manager/wired-manager.cpp
|
||||
index cfd11b2..9ceeb89 100644
|
||||
--- a/plugins/network/src/plugin/manager/wired-manager.cpp
|
||||
+++ b/plugins/network/src/plugin/manager/wired-manager.cpp
|
||||
@@ -180,7 +180,9 @@ void WiredManager::handleSaveButtonClicked()
|
||||
handleReturnPreviousPage();
|
||||
}
|
||||
else
|
||||
+ {
|
||||
KLOG_DEBUG() << "Invalid input exists";
|
||||
+ }
|
||||
}
|
||||
|
||||
void WiredManager::handleConnectionUpdated(const QString &path)
|
||||
diff --git a/plugins/network/src/plugin/setting-widget/connection-name-widget.cpp b/plugins/network/src/plugin/setting-widget/connection-name-widget.cpp
|
||||
index 71b3626..5ee8b62 100644
|
||||
--- a/plugins/network/src/plugin/setting-widget/connection-name-widget.cpp
|
||||
+++ b/plugins/network/src/plugin/setting-widget/connection-name-widget.cpp
|
||||
@@ -13,6 +13,7 @@
|
||||
*/
|
||||
|
||||
#include "connection-name-widget.h"
|
||||
+#include <kiran-message-box.h>
|
||||
#include <kiran-switch-button.h>
|
||||
#include <qt5-log-i.h>
|
||||
#include <NetworkManagerQt/Connection>
|
||||
@@ -82,7 +83,7 @@ void ConnectionNameWidget::showSettings(ConnectionSettings::ConnectionType conne
|
||||
}
|
||||
else if (m_connectionType == ConnectionSettings::Wireless)
|
||||
{
|
||||
- if(m_connectionSettings != nullptr)
|
||||
+ if (m_connectionSettings != nullptr)
|
||||
{
|
||||
WirelessSetting::Ptr wirelessSetting = m_connectionSettings->setting(Setting::Wireless).dynamicCast<WirelessSetting>();
|
||||
ui->connectionName->setText(wirelessSetting->ssid());
|
||||
@@ -91,8 +92,8 @@ void ConnectionNameWidget::showSettings(ConnectionSettings::ConnectionType conne
|
||||
}
|
||||
else
|
||||
{
|
||||
-// ui->connectionName->setEnabled(true);
|
||||
-// m_autoConnection->setChecked(true);
|
||||
+ // ui->connectionName->setEnabled(true);
|
||||
+ // m_autoConnection->setChecked(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -173,11 +174,16 @@ void ConnectionNameWidget::clearPtr()
|
||||
|
||||
bool ConnectionNameWidget::isInputValid()
|
||||
{
|
||||
- bool valid = true;
|
||||
QString nameStr = ui->connectionName->text();
|
||||
if (nameStr.isEmpty())
|
||||
{
|
||||
+ QString error = QString(tr("Connection name can not be empty"));
|
||||
+ KiranMessageBox::KiranStandardButton btn = KiranMessageBox::message(this, tr("Error"),
|
||||
+ error,
|
||||
+ KiranMessageBox::Yes | KiranMessageBox::No);
|
||||
+
|
||||
+ KLOG_DEBUG() << "Connection name cannot be empty";
|
||||
return false;
|
||||
}
|
||||
- return valid;
|
||||
+ return true;
|
||||
}
|
||||
\ No newline at end of file
|
||||
diff --git a/plugins/network/src/plugin/setting-widget/ethernet-widget.cpp b/plugins/network/src/plugin/setting-widget/ethernet-widget.cpp
|
||||
index 55c5cd8..ae43125 100644
|
||||
--- a/plugins/network/src/plugin/setting-widget/ethernet-widget.cpp
|
||||
+++ b/plugins/network/src/plugin/setting-widget/ethernet-widget.cpp
|
||||
@@ -13,11 +13,13 @@
|
||||
*/
|
||||
|
||||
#include "ethernet-widget.h"
|
||||
+#include <kiran-message-box.h>
|
||||
#include <kiran-switch-button.h>
|
||||
#include <qt5-log-i.h>
|
||||
#include <NetworkManagerQt/Manager>
|
||||
#include <NetworkManagerQt/WiredDevice>
|
||||
#include "ui_ethernet-widget.h"
|
||||
+
|
||||
using namespace NetworkManager;
|
||||
|
||||
EthernetWidget::EthernetWidget(QWidget *parent) : QWidget(parent), ui(new Ui::EthernetWidget)
|
||||
@@ -38,7 +40,7 @@ void EthernetWidget::initUI()
|
||||
ui->customMTU->setVisible(false);
|
||||
ui->customMTU->setMinimum(0);
|
||||
ui->customMTU->setMaximum(10000);
|
||||
- //UserData设为空"",为了匹配Mac地址为空的情况
|
||||
+ // UserData设为空"",为了匹配Mac地址为空的情况
|
||||
ui->deviceMac->addItem(tr("No device specified"), "");
|
||||
initEthernetMacComboBox();
|
||||
}
|
||||
@@ -75,7 +77,7 @@ void EthernetWidget::setWiredSetting(const WiredSetting::Ptr &wiredSetting)
|
||||
|
||||
void EthernetWidget::saveSettings()
|
||||
{
|
||||
- if(m_wiredSetting != nullptr)
|
||||
+ if (m_wiredSetting != nullptr)
|
||||
{
|
||||
QString macAddress = ui->deviceMac->currentData().toString();
|
||||
QString cloneMac = ui->cloneDeviceMac->text();
|
||||
@@ -89,7 +91,7 @@ void EthernetWidget::saveSettings()
|
||||
|
||||
void EthernetWidget::showSettings()
|
||||
{
|
||||
- if(m_wiredSetting != nullptr)
|
||||
+ if (m_wiredSetting != nullptr)
|
||||
{
|
||||
QString deviceMac = m_wiredSetting->macAddress().toHex(':').toUpper();
|
||||
QString cloneDeviceMac = m_wiredSetting->clonedMacAddress().toHex(':').toUpper();
|
||||
@@ -132,15 +134,26 @@ void EthernetWidget::clearPtr()
|
||||
|
||||
bool EthernetWidget::isInputValid()
|
||||
{
|
||||
- isCloneMacValid(ui->cloneDeviceMac->text());
|
||||
- return false;
|
||||
+ if (!isCloneMacValid(ui->cloneDeviceMac->text()))
|
||||
+ {
|
||||
+ QString error = QString(tr("Clone Mac invalid"));
|
||||
+ KiranMessageBox::KiranStandardButton btn = KiranMessageBox::message(this, tr("Error"),
|
||||
+ error,
|
||||
+ KiranMessageBox::Yes | KiranMessageBox::No);
|
||||
+
|
||||
+ KLOG_DEBUG() << "Clone Mac invalid";
|
||||
+ return false;
|
||||
+ }
|
||||
+ return true;
|
||||
}
|
||||
|
||||
bool EthernetWidget::isCloneMacValid(const QString &cloneMac)
|
||||
{
|
||||
- if (cloneMac.isEmpty()) {
|
||||
+ if (cloneMac.isEmpty())
|
||||
+ {
|
||||
return true;
|
||||
}
|
||||
- bool matched = QRegExp("^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$").exactMatch(cloneMac);
|
||||
+ bool matched = QRegExp("^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$").exactMatch(cloneMac);
|
||||
+
|
||||
return matched;
|
||||
}
|
||||
diff --git a/plugins/network/src/plugin/setting-widget/ipv4-widget.cpp b/plugins/network/src/plugin/setting-widget/ipv4-widget.cpp
|
||||
index 30f7844..7f28576 100644
|
||||
--- a/plugins/network/src/plugin/setting-widget/ipv4-widget.cpp
|
||||
+++ b/plugins/network/src/plugin/setting-widget/ipv4-widget.cpp
|
||||
@@ -13,6 +13,7 @@
|
||||
*/
|
||||
|
||||
#include "ipv4-widget.h"
|
||||
+#include <kiran-message-box.h>
|
||||
#include <kiran-switch-button.h>
|
||||
#include <qt5-log-i.h>
|
||||
#include "ui_ipv4-widget.h"
|
||||
@@ -65,7 +66,6 @@ void Ipv4Widget::setIpv4Setting(const Ipv4Setting::Ptr &ipv4Setting)
|
||||
m_ipv4Setting = ipv4Setting;
|
||||
}
|
||||
|
||||
-// TODO:错误提示弹窗
|
||||
void Ipv4Widget::saveSettings()
|
||||
{
|
||||
if (m_ipv4Setting != nullptr)
|
||||
@@ -85,7 +85,6 @@ void Ipv4Widget::saveSettings()
|
||||
m_ipv4Setting->setMethod(method);
|
||||
|
||||
ipv4Address.setIp(QHostAddress(ui->ipv4Address->text()));
|
||||
- // XXX:输入合法性检测
|
||||
QString netMask = ui->ipv4Netmask->text();
|
||||
if (!netMask.contains("."))
|
||||
{
|
||||
@@ -134,8 +133,11 @@ void Ipv4Widget::showSettings()
|
||||
{
|
||||
if (m_ipv4Setting != nullptr)
|
||||
{
|
||||
+ KLOG_DEBUG() << "m_ipv4Setting->method():" << m_ipv4Setting->method();
|
||||
+
|
||||
if (m_ipv4Setting->method() == Ipv4Setting::ConfigMethod::Automatic)
|
||||
{
|
||||
+ KLOG_DEBUG() << "Ipv4Setting::ConfigMethod::Automatic";
|
||||
resetSettings();
|
||||
}
|
||||
else if (m_ipv4Setting->method() == Ipv4Setting::ConfigMethod::Manual)
|
||||
@@ -143,11 +145,15 @@ void Ipv4Widget::showSettings()
|
||||
int ipv4MethodIndex = ui->ipv4Method->findData(m_ipv4Setting->method());
|
||||
ui->ipv4Method->setCurrentIndex(ipv4MethodIndex);
|
||||
// xxx:取addresses的方式有待改进
|
||||
- IpAddress ipv4Address = m_ipv4Setting->addresses().at(0);
|
||||
+ IpAddress ipv4Address = m_ipv4Setting->addresses().value(0);
|
||||
QString address = ipv4Address.ip().toString();
|
||||
QString netmask = ipv4Address.netmask().toString();
|
||||
QString gateway = ipv4Address.gateway().toString();
|
||||
|
||||
+ KLOG_DEBUG() << "address:" << address;
|
||||
+ KLOG_DEBUG() << "netmask:" << netmask;
|
||||
+ KLOG_DEBUG() << "gateway:" << gateway;
|
||||
+
|
||||
ui->ipv4Address->setText(address);
|
||||
ui->ipv4Netmask->setText(netmask);
|
||||
ui->ipv4Gateway->setText(gateway);
|
||||
@@ -188,57 +194,108 @@ void Ipv4Widget::clearPtr()
|
||||
}
|
||||
|
||||
// TODO:验证功能待完善
|
||||
+// XXX:输入验证提示暂时先用弹框,之后修改
|
||||
bool Ipv4Widget::isInputValid()
|
||||
{
|
||||
Ipv4Setting::ConfigMethod configMethod = ui->ipv4Method->currentData().value<Ipv4Setting::ConfigMethod>();
|
||||
- bool valid = true;
|
||||
+
|
||||
if (configMethod == Ipv4Setting::ConfigMethod::Automatic)
|
||||
{
|
||||
- isIpv4AddressValid(ui->ipv4PreferredDNS->text());
|
||||
- isIpv4AddressValid(ui->ipv4AlternateDNS->text());
|
||||
}
|
||||
else if (configMethod == Ipv4Setting::ConfigMethod::Manual)
|
||||
{
|
||||
- QString ipv4 = ui->ipv4Address->text();
|
||||
- QString netMask = ui->ipv4Netmask->text();
|
||||
+ QString ipv4 = ui->ipv4Address->text();
|
||||
+ QString netMask = ui->ipv4Netmask->text();
|
||||
+ QString ipv4Gateway = ui->ipv4Gateway->text();
|
||||
|
||||
if (ipv4.isEmpty())
|
||||
{
|
||||
- valid = false;
|
||||
- KLOG_DEBUG() << "Ipv4 address cannot be empty";
|
||||
+ QString error = QString(tr("Ipv4 address can not be empty"));
|
||||
+ KiranMessageBox::KiranStandardButton btn = KiranMessageBox::message(this, tr("Error"),
|
||||
+ error,
|
||||
+ KiranMessageBox::Yes | KiranMessageBox::No);
|
||||
+
|
||||
+ KLOG_DEBUG() << "Ipv4 address can not be empty";
|
||||
+ return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
- if(!isIpv4AddressValid(ipv4))
|
||||
+ if (!isIpv4AddressValid(ipv4))
|
||||
{
|
||||
- valid = false;
|
||||
- KLOG_DEBUG() << "Ipv4Address invalid";
|
||||
+ QString error = QString(tr("Ipv4 Address invalid"));
|
||||
+ KiranMessageBox::KiranStandardButton btn = KiranMessageBox::message(this, tr("Error"),
|
||||
+ error,
|
||||
+ KiranMessageBox::Yes | KiranMessageBox::No);
|
||||
+ KLOG_DEBUG() << "Ipv4 Address invalid";
|
||||
+ return false;
|
||||
}
|
||||
}
|
||||
-
|
||||
+
|
||||
if (netMask.isEmpty())
|
||||
{
|
||||
- valid = false;
|
||||
+ QString error = QString(tr("NetMask can not be empty"));
|
||||
+ KiranMessageBox::KiranStandardButton btn = KiranMessageBox::message(this, tr("Error"),
|
||||
+ error,
|
||||
+ KiranMessageBox::Yes | KiranMessageBox::No);
|
||||
KLOG_DEBUG() << "NetMask cannot be empty";
|
||||
+ return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
- if(!isIpv4NetmaskValid(netMask))
|
||||
+ if (!isIpv4NetmaskValid(netMask))
|
||||
{
|
||||
- valid = false;
|
||||
+ QString error = QString(tr("Netmask invalid"));
|
||||
+ KiranMessageBox::KiranStandardButton btn = KiranMessageBox::message(this, tr("Error"),
|
||||
+ error,
|
||||
+ KiranMessageBox::Yes | KiranMessageBox::No);
|
||||
KLOG_DEBUG() << "Netmask invalid";
|
||||
+ return false;
|
||||
}
|
||||
}
|
||||
|
||||
- ui->ipv4Gateway->text();
|
||||
- ui->ipv4PreferredDNS->text();
|
||||
- ui->ipv4AlternateDNS->text();
|
||||
- isIpv4AddressValid(ui->ipv4Gateway->text());
|
||||
- isIpv4AddressValid(ui->ipv4PreferredDNS->text());
|
||||
- isIpv4AddressValid(ui->ipv4AlternateDNS->text());
|
||||
+ if (!ipv4Gateway.isEmpty())
|
||||
+ {
|
||||
+ if (!isIpv4AddressValid(ipv4Gateway))
|
||||
+ {
|
||||
+ QString error = QString(tr("Ipv4 Gateway invalid"));
|
||||
+ KiranMessageBox::KiranStandardButton btn = KiranMessageBox::message(this, tr("Error"),
|
||||
+ error,
|
||||
+ KiranMessageBox::Yes | KiranMessageBox::No);
|
||||
+ KLOG_DEBUG() << "Ipv4 Netmask invalid";
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
||||
+ QString preferredDNS = ui->ipv4PreferredDNS->text();
|
||||
+ if (!preferredDNS.isEmpty())
|
||||
+ {
|
||||
+ if (!isIpv4AddressValid(preferredDNS))
|
||||
+ {
|
||||
+ QString error = QString(tr("Ipv4 Preferred DNS invalid"));
|
||||
+ KiranMessageBox::KiranStandardButton btn = KiranMessageBox::message(this, tr("Error"),
|
||||
+ error,
|
||||
+ KiranMessageBox::Yes | KiranMessageBox::No);
|
||||
+ KLOG_DEBUG() << "Ipv4 Preferred DNS invalid";
|
||||
+ return false;
|
||||
+ }
|
||||
}
|
||||
- return valid;
|
||||
+
|
||||
+ QString alternateDNS = ui->ipv4AlternateDNS->text();
|
||||
+ if (!alternateDNS.isEmpty())
|
||||
+ {
|
||||
+ if (!isIpv4AddressValid(alternateDNS))
|
||||
+ {
|
||||
+ QString error = QString(tr("Ipv4 Alternate DNS invalid"));
|
||||
+ KiranMessageBox::KiranStandardButton btn = KiranMessageBox::message(this, tr("Error"),
|
||||
+ error,
|
||||
+ KiranMessageBox::Yes | KiranMessageBox::No);
|
||||
+ KLOG_DEBUG() << "Ipv4 Alternate DNS invalid";
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
}
|
||||
|
||||
bool Ipv4Widget::isIpv4AddressValid(const QString &address)
|
||||
diff --git a/plugins/network/src/plugin/setting-widget/ipv6-widget.cpp b/plugins/network/src/plugin/setting-widget/ipv6-widget.cpp
|
||||
index a703f95..a9f1676 100644
|
||||
--- a/plugins/network/src/plugin/setting-widget/ipv6-widget.cpp
|
||||
+++ b/plugins/network/src/plugin/setting-widget/ipv6-widget.cpp
|
||||
@@ -13,6 +13,7 @@
|
||||
*/
|
||||
|
||||
#include "ipv6-widget.h"
|
||||
+#include <kiran-message-box.h>
|
||||
#include <qt5-log-i.h>
|
||||
#include "ui_ipv6-widget.h"
|
||||
using namespace NetworkManager;
|
||||
@@ -177,7 +178,7 @@ void Ipv6Widget::clearPtr()
|
||||
bool Ipv6Widget::isInputValid()
|
||||
{
|
||||
Ipv6Setting::ConfigMethod configMethod = ui->ipv6Method->currentData().value<Ipv6Setting::ConfigMethod>();
|
||||
- bool valid = true;
|
||||
+
|
||||
if (configMethod == Ipv6Setting::ConfigMethod::Ignored)
|
||||
{
|
||||
}
|
||||
@@ -189,24 +190,71 @@ bool Ipv6Widget::isInputValid()
|
||||
QString ipv6 = ui->ipv6Address->text();
|
||||
if (ipv6.isEmpty())
|
||||
{
|
||||
- valid = false;
|
||||
+ QString error = QString(tr("Ipv6 address can not be empty"));
|
||||
+ KiranMessageBox::KiranStandardButton btn = KiranMessageBox::message(this, tr("Error"),
|
||||
+ error,
|
||||
+ KiranMessageBox::Yes | KiranMessageBox::No);
|
||||
+
|
||||
KLOG_DEBUG() << "Ipv6 Address cannot be empty";
|
||||
+ return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!isIpv6AddressValid(ipv6))
|
||||
{
|
||||
- valid = false;
|
||||
+ QString error = QString(tr("Ipv6 address invalid"));
|
||||
+ KiranMessageBox::KiranStandardButton btn = KiranMessageBox::message(this, tr("Error"),
|
||||
+ error,
|
||||
+ KiranMessageBox::Yes | KiranMessageBox::No);
|
||||
KLOG_DEBUG() << "Ipv6Address invalid";
|
||||
+ return false;
|
||||
}
|
||||
}
|
||||
|
||||
- isIpv6AddressValid(ui->ipv6Gateway->text());
|
||||
- isIpv6AddressValid(ui->ipv6AlternateDNS->text());
|
||||
- isIpv6AddressValid(ui->ipv6PreferredDNS->text());
|
||||
+ QString ipv6Gateway = ui->ipv6Gateway->text();
|
||||
+ if (!ipv6Gateway.isEmpty())
|
||||
+ {
|
||||
+ if (!isIpv6AddressValid(ipv6Gateway))
|
||||
+ {
|
||||
+ QString error = QString(tr("Ipv6 Gateway invalid"));
|
||||
+ KiranMessageBox::KiranStandardButton btn = KiranMessageBox::message(this, tr("Error"),
|
||||
+ error,
|
||||
+ KiranMessageBox::Yes | KiranMessageBox::No);
|
||||
+ KLOG_DEBUG() << "Ipv6 Netmask invalid";
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
- return valid;
|
||||
+ QString preferredDNS = ui->ipv6PreferredDNS->text();
|
||||
+ if (!preferredDNS.isEmpty())
|
||||
+ {
|
||||
+ if (!isIpv6AddressValid(preferredDNS))
|
||||
+ {
|
||||
+ QString error = QString(tr("Ipv6 Preferred DNS invalid"));
|
||||
+ KiranMessageBox::KiranStandardButton btn = KiranMessageBox::message(this, tr("Error"),
|
||||
+ error,
|
||||
+ KiranMessageBox::Yes | KiranMessageBox::No);
|
||||
+ KLOG_DEBUG() << "Ipv6 Preferred DNS invalid";
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ QString alternateDNS = ui->ipv6AlternateDNS->text();
|
||||
+ if (!alternateDNS.isEmpty())
|
||||
+ {
|
||||
+ if (!isIpv6AddressValid(alternateDNS))
|
||||
+ {
|
||||
+ QString error = QString(tr("Ipv6 Alternate DNS invalid"));
|
||||
+ KiranMessageBox::KiranStandardButton btn = KiranMessageBox::message(this, tr("Error"),
|
||||
+ error,
|
||||
+ KiranMessageBox::Yes | KiranMessageBox::No);
|
||||
+ KLOG_DEBUG() << "Ipv6 Alternate DNS invalid";
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
}
|
||||
|
||||
bool Ipv6Widget::isIpv6AddressValid(const QString &address)
|
||||
diff --git a/plugins/network/src/plugin/settings/setting-page.cpp b/plugins/network/src/plugin/settings/setting-page.cpp
|
||||
index 241f46c..dd84209 100644
|
||||
--- a/plugins/network/src/plugin/settings/setting-page.cpp
|
||||
+++ b/plugins/network/src/plugin/settings/setting-page.cpp
|
||||
@@ -76,11 +76,12 @@ void SettingPage::setConnectionSettings(const ConnectionSettings::Ptr& other)
|
||||
|
||||
void SettingPage::handleSaveButtonClicked(ConnectionSettings::ConnectionType connectionType)
|
||||
{
|
||||
- if(m_connectionSettings == nullptr)
|
||||
+ if (m_connectionSettings == nullptr)
|
||||
{
|
||||
initConnectionSettings(connectionType);
|
||||
initSettingPage();
|
||||
saveSettingPage();
|
||||
+ KLOG_DEBUG() << " m_connectionSettings->toMap():" << m_connectionSettings->toMap();
|
||||
QDBusPendingReply<QDBusObjectPath> replyAdd = NetworkManager::addConnection(m_connectionSettings->toMap());
|
||||
replyAdd.waitForFinished();
|
||||
if (replyAdd.isError())
|
||||
@@ -88,13 +89,16 @@ void SettingPage::handleSaveButtonClicked(ConnectionSettings::ConnectionType con
|
||||
KLOG_DEBUG() << "add connection failed," << replyAdd.error();
|
||||
}
|
||||
else
|
||||
- KLOG_DEBUG() << "add new connection";
|
||||
+ {
|
||||
+ KLOG_DEBUG() << "add new connection reply:" << replyAdd.reply();
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
saveSettingPage();
|
||||
//只有无线网络使用自定义settingUpdated信号,因为未连接无线网络前不存在本地Setting,无法在初始化时监听信号
|
||||
- connect(m_connection.data(),&NetworkManager::Connection::updated,this,&SettingPage::settingUpdated,Qt::UniqueConnection);
|
||||
+ connect(m_connection.data(), &NetworkManager::Connection::updated, this, &SettingPage::settingUpdated, Qt::UniqueConnection);
|
||||
+ KLOG_DEBUG() << "m_connectionSettings->toMap():" << m_connectionSettings->toMap();
|
||||
QDBusPendingReply<> replyUpdate = m_connection->update(m_connectionSettings->toMap());
|
||||
replyUpdate.waitForFinished();
|
||||
if (replyUpdate.isError())
|
||||
diff --git a/plugins/network/src/plugin/settings/wired-setting-page.cpp b/plugins/network/src/plugin/settings/wired-setting-page.cpp
|
||||
index 86ec372..4466468 100644
|
||||
--- a/plugins/network/src/plugin/settings/wired-setting-page.cpp
|
||||
+++ b/plugins/network/src/plugin/settings/wired-setting-page.cpp
|
||||
@@ -20,18 +20,17 @@
|
||||
#include <NetworkManagerQt/Manager>
|
||||
#include <NetworkManagerQt/Settings>
|
||||
#include "ui_wired-setting-page.h"
|
||||
+
|
||||
using namespace NetworkManager;
|
||||
|
||||
WiredSettingPage::WiredSettingPage(QWidget *parent) : SettingPage(parent), ui(new Ui::WiredSettingPage)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
initConnecton();
|
||||
- KLOG_DEBUG() << "WiredSettingPage::WiredSettingPage(QWidget *parent)";
|
||||
}
|
||||
|
||||
WiredSettingPage::~WiredSettingPage()
|
||||
{
|
||||
- KLOG_DEBUG() << "WiredSettingPage::~WiredSettingPage()";
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@@ -54,6 +53,7 @@ void WiredSettingPage::initSpecificSettings()
|
||||
m_wiredSetting = m_connectionSettings->setting(Setting::SettingType::Wired).dynamicCast<WiredSetting>();
|
||||
}
|
||||
|
||||
+// TODO:修改命名
|
||||
void WiredSettingPage::initWidgets()
|
||||
{
|
||||
ui->connectionNameWidget->setConnectionSettings(m_connectionSettings);
|
||||
@@ -109,7 +109,8 @@ void WiredSettingPage::clearPtr()
|
||||
|
||||
bool WiredSettingPage::isInputValid()
|
||||
{
|
||||
- if (ui->ipv4Widget->isInputValid() && ui->ipv6Widget->isInputValid() && ui->connectionNameWidget->isInputValid())
|
||||
+ if (ui->ipv4Widget->isInputValid() && ui->ipv6Widget->isInputValid() &&
|
||||
+ ui->connectionNameWidget->isInputValid() && ui->ethernetWidget->isInputValid())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,466 +0,0 @@
|
||||
From 78bd84e3e5f9626e363e295a1f175c6f2f816ffe Mon Sep 17 00:00:00 2001
|
||||
From: luoqing <luoqing@kylinsec.com.cn>
|
||||
Date: Tue, 23 Aug 2022 11:45:12 +0800
|
||||
Subject: [PATCH 5/7] fix(network):fix invalid configuration created for the
|
||||
first time
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 修复初次创建配置失效的问题
|
||||
---
|
||||
.../src/plugin/setting-widget/ipv6-widget.cpp | 27 ++++++++++---------
|
||||
.../src/plugin/settings/setting-page.cpp | 4 +--
|
||||
.../src/plugin/settings/setting-page.h | 4 +--
|
||||
.../plugin/settings/vpn/vpn-l2tp-setting.cpp | 17 ++++++------
|
||||
.../plugin/settings/vpn/vpn-l2tp-setting.h | 5 ++--
|
||||
.../plugin/settings/vpn/vpn-pptp-setting.cpp | 18 ++++++-------
|
||||
.../plugin/settings/vpn/vpn-pptp-setting.h | 5 ++--
|
||||
.../plugin/settings/wired-setting-page.cpp | 9 +++----
|
||||
.../src/plugin/settings/wired-setting-page.h | 3 +--
|
||||
.../plugin/settings/wireless-setting-page.cpp | 19 +++++++------
|
||||
.../plugin/settings/wireless-setting-page.h | 8 +++---
|
||||
11 files changed, 54 insertions(+), 65 deletions(-)
|
||||
|
||||
diff --git a/plugins/network/src/plugin/setting-widget/ipv6-widget.cpp b/plugins/network/src/plugin/setting-widget/ipv6-widget.cpp
|
||||
index a9f1676..a16bff5 100644
|
||||
--- a/plugins/network/src/plugin/setting-widget/ipv6-widget.cpp
|
||||
+++ b/plugins/network/src/plugin/setting-widget/ipv6-widget.cpp
|
||||
@@ -81,7 +81,6 @@ void Ipv6Widget::saveSettings()
|
||||
{
|
||||
m_ipv6Setting->setMethod(method);
|
||||
m_ipv6Setting->setAddresses(QList<NetworkManager::IpAddress>());
|
||||
- return;
|
||||
}
|
||||
else if (method == Ipv6Setting::ConfigMethod::Automatic)
|
||||
{
|
||||
@@ -119,11 +118,13 @@ void Ipv6Widget::showSettings()
|
||||
{
|
||||
if (m_ipv6Setting->method() == Ipv6Setting::ConfigMethod::Ignored)
|
||||
{
|
||||
- resetSettings();
|
||||
+ int ipv6MethodIndex = ui->ipv6Method->findData(Ipv6Setting::ConfigMethod::Ignored);
|
||||
+ ui->ipv6Method->setCurrentIndex(ipv6MethodIndex);
|
||||
}
|
||||
else if (m_ipv6Setting->method() == Ipv6Setting::ConfigMethod::Automatic)
|
||||
{
|
||||
- resetSettings();
|
||||
+ int ipv6MethodIndex = ui->ipv6Method->findData(Ipv6Setting::ConfigMethod::Automatic);
|
||||
+ ui->ipv6Method->setCurrentIndex(ipv6MethodIndex);
|
||||
}
|
||||
else if (m_ipv6Setting->method() == Ipv6Setting::ConfigMethod::Manual)
|
||||
{
|
||||
@@ -135,24 +136,24 @@ void Ipv6Widget::showSettings()
|
||||
QString ip = ipv6Address.ip().toString();
|
||||
int prefix = ipv6Address.prefixLength();
|
||||
QString gateway = ipv6Address.gateway().toString();
|
||||
- QString preferredDNS = "";
|
||||
- QString alternateDNS = "";
|
||||
|
||||
ui->ipv6Address->setText(ip);
|
||||
ui->ipv6Prefix->setValue(prefix);
|
||||
ui->ipv6Gateway->setText(gateway);
|
||||
+ }
|
||||
|
||||
- if (!m_ipv6Setting->dns().isEmpty())
|
||||
+ QString preferredDNS = "";
|
||||
+ QString alternateDNS = "";
|
||||
+ if (!m_ipv6Setting->dns().isEmpty())
|
||||
+ {
|
||||
+ preferredDNS = m_ipv6Setting->dns().at(0).toString();
|
||||
+ if (m_ipv6Setting->dns().count() >= 2)
|
||||
{
|
||||
- preferredDNS = m_ipv6Setting->dns().at(0).toString();
|
||||
- if (m_ipv6Setting->dns().count() >= 2)
|
||||
- {
|
||||
- alternateDNS = m_ipv6Setting->dns().at(1).toString();
|
||||
- }
|
||||
+ alternateDNS = m_ipv6Setting->dns().at(1).toString();
|
||||
}
|
||||
- ui->ipv6PreferredDNS->setText(preferredDNS);
|
||||
- ui->ipv6AlternateDNS->setText(alternateDNS);
|
||||
}
|
||||
+ ui->ipv6PreferredDNS->setText(preferredDNS);
|
||||
+ ui->ipv6AlternateDNS->setText(alternateDNS);
|
||||
}
|
||||
else
|
||||
resetSettings();
|
||||
diff --git a/plugins/network/src/plugin/settings/setting-page.cpp b/plugins/network/src/plugin/settings/setting-page.cpp
|
||||
index dd84209..512b263 100644
|
||||
--- a/plugins/network/src/plugin/settings/setting-page.cpp
|
||||
+++ b/plugins/network/src/plugin/settings/setting-page.cpp
|
||||
@@ -81,7 +81,7 @@ void SettingPage::handleSaveButtonClicked(ConnectionSettings::ConnectionType con
|
||||
initConnectionSettings(connectionType);
|
||||
initSettingPage();
|
||||
saveSettingPage();
|
||||
- KLOG_DEBUG() << " m_connectionSettings->toMap():" << m_connectionSettings->toMap();
|
||||
+
|
||||
QDBusPendingReply<QDBusObjectPath> replyAdd = NetworkManager::addConnection(m_connectionSettings->toMap());
|
||||
replyAdd.waitForFinished();
|
||||
if (replyAdd.isError())
|
||||
@@ -98,7 +98,6 @@ void SettingPage::handleSaveButtonClicked(ConnectionSettings::ConnectionType con
|
||||
saveSettingPage();
|
||||
//只有无线网络使用自定义settingUpdated信号,因为未连接无线网络前不存在本地Setting,无法在初始化时监听信号
|
||||
connect(m_connection.data(), &NetworkManager::Connection::updated, this, &SettingPage::settingUpdated, Qt::UniqueConnection);
|
||||
- KLOG_DEBUG() << "m_connectionSettings->toMap():" << m_connectionSettings->toMap();
|
||||
QDBusPendingReply<> replyUpdate = m_connection->update(m_connectionSettings->toMap());
|
||||
replyUpdate.waitForFinished();
|
||||
if (replyUpdate.isError())
|
||||
@@ -111,7 +110,6 @@ void SettingPage::handleSaveButtonClicked(ConnectionSettings::ConnectionType con
|
||||
void SettingPage::initSettingPage()
|
||||
{
|
||||
initSpecificSettings();
|
||||
- initWidgets();
|
||||
}
|
||||
|
||||
bool SettingPage::isInputValid()
|
||||
diff --git a/plugins/network/src/plugin/settings/setting-page.h b/plugins/network/src/plugin/settings/setting-page.h
|
||||
index ef5a8a7..474751a 100644
|
||||
--- a/plugins/network/src/plugin/settings/setting-page.h
|
||||
+++ b/plugins/network/src/plugin/settings/setting-page.h
|
||||
@@ -39,7 +39,6 @@ public:
|
||||
|
||||
virtual void initSettingPage();
|
||||
virtual void initSpecificSettings() = 0;
|
||||
- virtual void initWidgets() = 0;
|
||||
virtual void saveSettingPage() = 0;
|
||||
virtual bool isInputValid();
|
||||
|
||||
@@ -53,7 +52,6 @@ signals:
|
||||
void settingChanged();
|
||||
void settingUpdated();
|
||||
|
||||
-
|
||||
protected:
|
||||
NetworkManager::Connection::Ptr m_connection = nullptr;
|
||||
NetworkManager::ConnectionSettings::Ptr m_connectionSettings = nullptr;
|
||||
@@ -68,4 +66,4 @@ private:
|
||||
bool m_isNewConnection;
|
||||
};
|
||||
|
||||
-#endif //KIRAN_CPANEL_NETWORK_SETTINGPAGE_H
|
||||
+#endif // KIRAN_CPANEL_NETWORK_SETTINGPAGE_H
|
||||
diff --git a/plugins/network/src/plugin/settings/vpn/vpn-l2tp-setting.cpp b/plugins/network/src/plugin/settings/vpn/vpn-l2tp-setting.cpp
|
||||
index b9c7e84..dc9e4d2 100644
|
||||
--- a/plugins/network/src/plugin/settings/vpn/vpn-l2tp-setting.cpp
|
||||
+++ b/plugins/network/src/plugin/settings/vpn/vpn-l2tp-setting.cpp
|
||||
@@ -13,9 +13,9 @@
|
||||
*/
|
||||
|
||||
#include "vpn-l2tp-setting.h"
|
||||
-#include "ui_vpn-l2tp-setting.h"
|
||||
-#include <NetworkManagerQt/Settings>
|
||||
#include <qt5-log-i.h>
|
||||
+#include <NetworkManagerQt/Settings>
|
||||
+#include "ui_vpn-l2tp-setting.h"
|
||||
#define ServiceTypeL2TP "org.freedesktop.NetworkManager.l2tp"
|
||||
using namespace NetworkManager;
|
||||
|
||||
@@ -33,25 +33,24 @@ VpnL2tpSetting::~VpnL2tpSetting()
|
||||
|
||||
void VpnL2tpSetting::initConnection()
|
||||
{
|
||||
- connect(ui->disconnectAndDeleteWidget,&DisconnectAndDeleteButton::disconnectButtonClicked,this,&VpnL2tpSetting::returnPreviousPage);
|
||||
- connect(ui->disconnectAndDeleteWidget,&DisconnectAndDeleteButton::deleteButtonClicked,this,&VpnL2tpSetting::returnPreviousPage);
|
||||
+ connect(ui->disconnectAndDeleteWidget, &DisconnectAndDeleteButton::disconnectButtonClicked, this, &VpnL2tpSetting::returnPreviousPage);
|
||||
+ connect(ui->disconnectAndDeleteWidget, &DisconnectAndDeleteButton::deleteButtonClicked, this, &VpnL2tpSetting::returnPreviousPage);
|
||||
}
|
||||
|
||||
void VpnL2tpSetting::initSettingPage()
|
||||
{
|
||||
initSpecificSettings();
|
||||
- initWidgets();
|
||||
}
|
||||
|
||||
void VpnL2tpSetting::initSpecificSettings()
|
||||
{
|
||||
m_vpnSetting = m_connectionSettings->setting(Setting::SettingType::Vpn).dynamicCast<VpnSetting>();
|
||||
m_ipv4Setting = m_connectionSettings->setting(Setting::SettingType::Ipv4).dynamicCast<Ipv4Setting>();
|
||||
+
|
||||
m_vpnSetting->setServiceType(ServiceTypeL2TP);
|
||||
-}
|
||||
+ m_vpnSetting->setInitialized(true);
|
||||
+ m_ipv4Setting->setInitialized(true);
|
||||
|
||||
-void VpnL2tpSetting::initWidgets()
|
||||
-{
|
||||
ui->connectioNameWidget->setConnectionSettings(m_connectionSettings);
|
||||
ui->vpnWidget->setVpnSetting(m_vpnSetting);
|
||||
ui->vpnPpp->setVpnSetting(m_vpnSetting);
|
||||
@@ -80,7 +79,7 @@ void VpnL2tpSetting::showSettingPage(QString activeConnectionPath)
|
||||
if (activeConnectionPath.isEmpty())
|
||||
ui->disconnectAndDeleteWidget->initButton(SETTING_CONNECTION_STATUS_DEACTIVATED);
|
||||
else
|
||||
- ui->disconnectAndDeleteWidget->initButton(SETTING_CONNECTION_STATUS_ACTIVATED,activeConnectionPath);
|
||||
+ ui->disconnectAndDeleteWidget->initButton(SETTING_CONNECTION_STATUS_ACTIVATED, activeConnectionPath);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/plugins/network/src/plugin/settings/vpn/vpn-l2tp-setting.h b/plugins/network/src/plugin/settings/vpn/vpn-l2tp-setting.h
|
||||
index cda99b6..daefdb8 100644
|
||||
--- a/plugins/network/src/plugin/settings/vpn/vpn-l2tp-setting.h
|
||||
+++ b/plugins/network/src/plugin/settings/vpn/vpn-l2tp-setting.h
|
||||
@@ -15,8 +15,8 @@
|
||||
#ifndef KIRAN_CPANEL_NETWORK_VPN_L2TP_SETTING_H
|
||||
#define KIRAN_CPANEL_NETWORK_VPN_L2TP_SETTING_H
|
||||
|
||||
-#include <QWidget>
|
||||
#include <NetworkManagerQt/VpnSetting>
|
||||
+#include <QWidget>
|
||||
#include "setting-page.h"
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui
|
||||
@@ -36,7 +36,6 @@ public:
|
||||
void initConnection();
|
||||
void initSettingPage() override;
|
||||
void initSpecificSettings() override;
|
||||
- void initWidgets() override;
|
||||
void clearPtr() override;
|
||||
|
||||
public slots:
|
||||
@@ -49,4 +48,4 @@ private:
|
||||
NetworkManager::VpnSetting::Ptr m_vpnSetting;
|
||||
};
|
||||
|
||||
-#endif //KIRAN_CPANEL_NETWORK_VPN_L2TP_SETTING_H
|
||||
+#endif // KIRAN_CPANEL_NETWORK_VPN_L2TP_SETTING_H
|
||||
diff --git a/plugins/network/src/plugin/settings/vpn/vpn-pptp-setting.cpp b/plugins/network/src/plugin/settings/vpn/vpn-pptp-setting.cpp
|
||||
index c09b2aa..260ae22 100644
|
||||
--- a/plugins/network/src/plugin/settings/vpn/vpn-pptp-setting.cpp
|
||||
+++ b/plugins/network/src/plugin/settings/vpn/vpn-pptp-setting.cpp
|
||||
@@ -13,8 +13,8 @@
|
||||
*/
|
||||
|
||||
#include "vpn-pptp-setting.h"
|
||||
-#include "ui_vpn-pptp-setting.h"
|
||||
#include <qt5-log-i.h>
|
||||
+#include "ui_vpn-pptp-setting.h"
|
||||
#define ServiceTypePPTP "org.freedesktop.NetworkManager.pptp"
|
||||
using namespace NetworkManager;
|
||||
|
||||
@@ -22,8 +22,8 @@ VpnPptpSetting::VpnPptpSetting(QWidget *parent) : SettingPage(parent), ui(new Ui
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->generalWidget->setNameLabel(tr("VPN name"));
|
||||
- connect(ui->generalButton,&DisconnectAndDeleteButton::disconnectButtonClicked,this,&VpnPptpSetting::returnPreviousPage);
|
||||
- connect(ui->generalButton,&DisconnectAndDeleteButton::deleteButtonClicked,this,&VpnPptpSetting::returnPreviousPage);
|
||||
+ connect(ui->generalButton, &DisconnectAndDeleteButton::disconnectButtonClicked, this, &VpnPptpSetting::returnPreviousPage);
|
||||
+ connect(ui->generalButton, &DisconnectAndDeleteButton::deleteButtonClicked, this, &VpnPptpSetting::returnPreviousPage);
|
||||
}
|
||||
|
||||
VpnPptpSetting::~VpnPptpSetting()
|
||||
@@ -34,19 +34,17 @@ VpnPptpSetting::~VpnPptpSetting()
|
||||
void VpnPptpSetting::initSettingPage()
|
||||
{
|
||||
initSpecificSettings();
|
||||
- initWidgets();
|
||||
}
|
||||
|
||||
-
|
||||
void VpnPptpSetting::initSpecificSettings()
|
||||
{
|
||||
m_vpnSetting = m_connectionSettings->setting(Setting::SettingType::Vpn).dynamicCast<VpnSetting>();
|
||||
m_ipv4Setting = m_connectionSettings->setting(Setting::SettingType::Ipv4).dynamicCast<Ipv4Setting>();
|
||||
+
|
||||
m_vpnSetting->setServiceType(ServiceTypePPTP);
|
||||
-}
|
||||
+ m_vpnSetting->setInitialized(true);
|
||||
+ m_ipv4Setting->setInitialized(true);
|
||||
|
||||
-void VpnPptpSetting::initWidgets()
|
||||
-{
|
||||
ui->generalWidget->setConnectionSettings(m_connectionSettings);
|
||||
ui->vpnWidget->setVpnSetting(m_vpnSetting);
|
||||
ui->vpnPpp->setVpnSetting(m_vpnSetting);
|
||||
@@ -81,13 +79,13 @@ void VpnPptpSetting::showSettingPage(QString activeConnectionPath)
|
||||
if (activeConnectionPath.isEmpty())
|
||||
ui->generalButton->initButton(SETTING_CONNECTION_STATUS_DEACTIVATED);
|
||||
else
|
||||
- ui->generalButton->initButton(SETTING_CONNECTION_STATUS_ACTIVATED,activeConnectionPath);
|
||||
+ ui->generalButton->initButton(SETTING_CONNECTION_STATUS_ACTIVATED, activeConnectionPath);
|
||||
}
|
||||
}
|
||||
|
||||
void VpnPptpSetting::clearPtr()
|
||||
{
|
||||
- KLOG_DEBUG() << "VpnPptpSetting::clearPtr" ;
|
||||
+ KLOG_DEBUG() << "VpnPptpSetting::clearPtr";
|
||||
m_vpnSetting.clear();
|
||||
SettingPage::clearPtr();
|
||||
|
||||
diff --git a/plugins/network/src/plugin/settings/vpn/vpn-pptp-setting.h b/plugins/network/src/plugin/settings/vpn/vpn-pptp-setting.h
|
||||
index 729d1da..fa179a1 100644
|
||||
--- a/plugins/network/src/plugin/settings/vpn/vpn-pptp-setting.h
|
||||
+++ b/plugins/network/src/plugin/settings/vpn/vpn-pptp-setting.h
|
||||
@@ -15,9 +15,9 @@
|
||||
#ifndef KIRAN_CPANEL_NETWORK_VPN_PPTP_SETTING_H
|
||||
#define KIRAN_CPANEL_NETWORK_VPN_PPTP_SETTING_H
|
||||
|
||||
+#include <NetworkManagerQt/VpnSetting>
|
||||
#include <QWidget>
|
||||
#include "setting-page.h"
|
||||
-#include <NetworkManagerQt/VpnSetting>
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui
|
||||
{
|
||||
@@ -34,7 +34,6 @@ public:
|
||||
~VpnPptpSetting() override;
|
||||
void initSettingPage() override;
|
||||
void initSpecificSettings() override;
|
||||
- void initWidgets() override;
|
||||
void clearPtr() override;
|
||||
|
||||
public slots:
|
||||
@@ -47,4 +46,4 @@ private:
|
||||
NetworkManager::VpnSetting::Ptr m_vpnSetting;
|
||||
};
|
||||
|
||||
-#endif //KIRAN_CPANEL_NETWORK_VPN_PPTP_SETTING_H
|
||||
+#endif // KIRAN_CPANEL_NETWORK_VPN_PPTP_SETTING_H
|
||||
diff --git a/plugins/network/src/plugin/settings/wired-setting-page.cpp b/plugins/network/src/plugin/settings/wired-setting-page.cpp
|
||||
index 4466468..507aee5 100644
|
||||
--- a/plugins/network/src/plugin/settings/wired-setting-page.cpp
|
||||
+++ b/plugins/network/src/plugin/settings/wired-setting-page.cpp
|
||||
@@ -37,7 +37,6 @@ WiredSettingPage::~WiredSettingPage()
|
||||
void WiredSettingPage::initSettingPage()
|
||||
{
|
||||
initSpecificSettings();
|
||||
- initWidgets();
|
||||
}
|
||||
|
||||
void WiredSettingPage::initConnecton()
|
||||
@@ -51,11 +50,11 @@ void WiredSettingPage::initSpecificSettings()
|
||||
m_ipv4Setting = m_connectionSettings->setting(Setting::SettingType::Ipv4).dynamicCast<Ipv4Setting>();
|
||||
m_ipv6Setting = m_connectionSettings->setting(Setting::SettingType::Ipv6).dynamicCast<Ipv6Setting>();
|
||||
m_wiredSetting = m_connectionSettings->setting(Setting::SettingType::Wired).dynamicCast<WiredSetting>();
|
||||
-}
|
||||
|
||||
-// TODO:修改命名
|
||||
-void WiredSettingPage::initWidgets()
|
||||
-{
|
||||
+ m_ipv4Setting->setInitialized(true);
|
||||
+ m_ipv6Setting->setInitialized(true);
|
||||
+ m_wiredSetting->setInitialized(true);
|
||||
+
|
||||
ui->connectionNameWidget->setConnectionSettings(m_connectionSettings);
|
||||
ui->ipv4Widget->setIpv4Setting(m_ipv4Setting);
|
||||
ui->ipv6Widget->setIpv6Setting(m_ipv6Setting);
|
||||
diff --git a/plugins/network/src/plugin/settings/wired-setting-page.h b/plugins/network/src/plugin/settings/wired-setting-page.h
|
||||
index f90c8a7..335d7a4 100644
|
||||
--- a/plugins/network/src/plugin/settings/wired-setting-page.h
|
||||
+++ b/plugins/network/src/plugin/settings/wired-setting-page.h
|
||||
@@ -37,7 +37,6 @@ public:
|
||||
void initConnecton();
|
||||
void initSettingPage() override;
|
||||
void initSpecificSettings() override;
|
||||
- void initWidgets() override;
|
||||
void clearPtr() override;
|
||||
|
||||
public slots:
|
||||
@@ -50,4 +49,4 @@ private:
|
||||
KiranSwitchButton *m_security;
|
||||
};
|
||||
|
||||
-#endif //KIRAN_CPANEL_NETWORK_WIRED_SETTING_PAGE_H
|
||||
+#endif // KIRAN_CPANEL_NETWORK_WIRED_SETTING_PAGE_H
|
||||
diff --git a/plugins/network/src/plugin/settings/wireless-setting-page.cpp b/plugins/network/src/plugin/settings/wireless-setting-page.cpp
|
||||
index efcdbe1..b0d5877 100644
|
||||
--- a/plugins/network/src/plugin/settings/wireless-setting-page.cpp
|
||||
+++ b/plugins/network/src/plugin/settings/wireless-setting-page.cpp
|
||||
@@ -13,8 +13,8 @@
|
||||
*/
|
||||
|
||||
#include "wireless-setting-page.h"
|
||||
-#include "ui_wireless-setting-page.h"
|
||||
#include <qt5-log-i.h>
|
||||
+#include "ui_wireless-setting-page.h"
|
||||
using namespace NetworkManager;
|
||||
|
||||
WirelessSettingPage::WirelessSettingPage(QWidget *parent) : SettingPage(parent), ui(new Ui::WirelessSettingPage)
|
||||
@@ -32,14 +32,13 @@ WirelessSettingPage::~WirelessSettingPage()
|
||||
|
||||
void WirelessSettingPage::initConnection()
|
||||
{
|
||||
- connect(ui->disconnectAndDeleteButton,&DisconnectAndDeleteButton::disconnectButtonClicked,this,&WirelessSettingPage::returnPreviousPage);
|
||||
- connect(ui->disconnectAndDeleteButton,&DisconnectAndDeleteButton::deleteButtonClicked,this,&WirelessSettingPage::returnPreviousPage);
|
||||
+ connect(ui->disconnectAndDeleteButton, &DisconnectAndDeleteButton::disconnectButtonClicked, this, &WirelessSettingPage::returnPreviousPage);
|
||||
+ connect(ui->disconnectAndDeleteButton, &DisconnectAndDeleteButton::deleteButtonClicked, this, &WirelessSettingPage::returnPreviousPage);
|
||||
}
|
||||
|
||||
void WirelessSettingPage::initSettingPage()
|
||||
{
|
||||
initSpecificSettings();
|
||||
- initWidgets();
|
||||
}
|
||||
|
||||
void WirelessSettingPage::initSpecificSettings()
|
||||
@@ -48,10 +47,12 @@ void WirelessSettingPage::initSpecificSettings()
|
||||
m_ipv6Setting = m_connectionSettings->setting(Setting::SettingType::Ipv6).dynamicCast<Ipv6Setting>();
|
||||
m_wirelessSetting = m_connectionSettings->setting(Setting::SettingType::Wireless).dynamicCast<WirelessSetting>();
|
||||
m_wirelessSecuritySetting = m_connectionSettings->setting(Setting::SettingType::WirelessSecurity).dynamicCast<WirelessSecuritySetting>();
|
||||
-}
|
||||
|
||||
-void WirelessSettingPage::initWidgets()
|
||||
-{
|
||||
+ m_ipv4Setting->setInitialized(true);
|
||||
+ m_ipv6Setting->setInitialized(true);
|
||||
+ m_wirelessSetting->setInitialized(true);
|
||||
+ m_wirelessSecuritySetting->setInitialized(true);
|
||||
+
|
||||
ui->generalWidget->setConnectionSettings(m_connectionSettings);
|
||||
ui->ipv4Widget->setIpv4Setting(m_ipv4Setting);
|
||||
ui->ipv6Widget->setIpv6Setting(m_ipv6Setting);
|
||||
@@ -81,7 +82,7 @@ void WirelessSettingPage::showSettingPage(QString activeConnectionPath)
|
||||
if (activeConnectionPath.isEmpty())
|
||||
ui->disconnectAndDeleteButton->initButton(SETTING_CONNECTION_STATUS_DEACTIVATED);
|
||||
else
|
||||
- ui->disconnectAndDeleteButton->initButton(SETTING_CONNECTION_STATUS_ACTIVATED,activeConnectionPath);
|
||||
+ ui->disconnectAndDeleteButton->initButton(SETTING_CONNECTION_STATUS_ACTIVATED, activeConnectionPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,5 +110,3 @@ void WirelessSettingPage::clearPtr()
|
||||
ui->wirelessSecurity->clearPtr();
|
||||
ui->wireless->clearPtr();
|
||||
}
|
||||
-
|
||||
-
|
||||
diff --git a/plugins/network/src/plugin/settings/wireless-setting-page.h b/plugins/network/src/plugin/settings/wireless-setting-page.h
|
||||
index d0cf97b..bb963fe 100644
|
||||
--- a/plugins/network/src/plugin/settings/wireless-setting-page.h
|
||||
+++ b/plugins/network/src/plugin/settings/wireless-setting-page.h
|
||||
@@ -15,10 +15,10 @@
|
||||
#ifndef KIRAN_CPANEL_NETWORK_WIRELESS_SETTING_PAGE_H
|
||||
#define KIRAN_CPANEL_NETWORK_WIRELESS_SETTING_PAGE_H
|
||||
|
||||
+#include <NetworkManagerQt/WirelessSecuritySetting>
|
||||
+#include <NetworkManagerQt/WirelessSetting>
|
||||
#include <QWidget>
|
||||
#include "setting-page.h"
|
||||
-#include <NetworkManagerQt/WirelessSetting>
|
||||
-#include <NetworkManagerQt/WirelessSecuritySetting>
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui
|
||||
{
|
||||
@@ -36,16 +36,16 @@ public:
|
||||
void initConnection();
|
||||
void initSettingPage() override;
|
||||
void initSpecificSettings() override;
|
||||
- void initWidgets() override;
|
||||
void clearPtr() override;
|
||||
|
||||
public slots:
|
||||
void saveSettingPage() override;
|
||||
void showSettingPage(QString activeConnectionPath = "");
|
||||
+
|
||||
private:
|
||||
Ui::WirelessSettingPage *ui;
|
||||
NetworkManager::WirelessSetting::Ptr m_wirelessSetting;
|
||||
NetworkManager::WirelessSecuritySetting::Ptr m_wirelessSecuritySetting;
|
||||
};
|
||||
|
||||
-#endif //KIRAN_CPANEL_NETWORK_WIRELESS_SETTING_PAGE_H
|
||||
+#endif // KIRAN_CPANEL_NETWORK_WIRELESS_SETTING_PAGE_H
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,211 +0,0 @@
|
||||
From 963d10274ea3f9bf5321755a9f6f9b21ca98206d Mon Sep 17 00:00:00 2001
|
||||
From: luoqing <luoqing@kylinsec.com.cn>
|
||||
Date: Tue, 23 Aug 2022 15:20:59 +0800
|
||||
Subject: [PATCH 6/7] fix(network):only L2TP type is supported temporary, and
|
||||
fix input defect
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 暂时只支持l2tp类型,修复输入缺陷
|
||||
---
|
||||
.../src/plugin/manager/vpn-manager.cpp | 27 +++++------
|
||||
.../network/src/plugin/manager/vpn-manager.h | 9 ++--
|
||||
.../plugin/setting-widget/vpn/vpn-widget.cpp | 46 +++++++++++++++----
|
||||
.../plugin/settings/vpn/vpn-l2tp-setting.cpp | 2 +-
|
||||
.../plugin/settings/vpn/vpn-pptp-setting.cpp | 1 -
|
||||
5 files changed, 58 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/plugins/network/src/plugin/manager/vpn-manager.cpp b/plugins/network/src/plugin/manager/vpn-manager.cpp
|
||||
index cd858b5..e4aecaf 100644
|
||||
--- a/plugins/network/src/plugin/manager/vpn-manager.cpp
|
||||
+++ b/plugins/network/src/plugin/manager/vpn-manager.cpp
|
||||
@@ -47,8 +47,8 @@ void VpnManager::initUI()
|
||||
ui->connectionShowPage->setTitle(tr("VPN"));
|
||||
ui->connectionShowPage->setSwitchButtonVisible(false);
|
||||
|
||||
- // ui->vpnType->addItem(tr("L2TP"), VPN_TYPE_L2TP);
|
||||
- ui->vpnType->addItem(tr("PPTP"), VPN_TYPE_PPTP);
|
||||
+ ui->vpnType->addItem(tr("L2TP"), VPN_TYPE_L2TP);
|
||||
+ // ui->vpnType->addItem(tr("PPTP"), VPN_TYPE_PPTP);
|
||||
Kiran::StylePropertyHelper::setButtonType(ui->saveButton, Kiran::BUTTON_Default);
|
||||
}
|
||||
|
||||
@@ -59,9 +59,10 @@ void VpnManager::initConnection()
|
||||
{
|
||||
//默认创建vpn类型:L2TP
|
||||
ui->vpnTypeWidget->setVisible(true);
|
||||
- ui->vpnType->setCurrentIndex(0);
|
||||
- ui->vpnTypeStacked->setCurrentIndex(VPN_TYPE_PPTP);
|
||||
- ui->pptpSetting->showSettingPage();
|
||||
+ ui->vpnType->setCurrentIndex(VPN_TYPE_L2TP);
|
||||
+ ui->vpnTypeStacked->setCurrentIndex(VPN_TYPE_L2TP);
|
||||
+ ui->l2tpSetting->showSettingPage();
|
||||
+ // ui->vpnType->setCurrentIndex(0);
|
||||
|
||||
QPointer<QScrollBar> scrollBar = ui->scrollArea->verticalScrollBar();
|
||||
scrollBar->setValue(0);
|
||||
@@ -73,7 +74,7 @@ void VpnManager::initConnection()
|
||||
connect(ui->vpnType, QOverload<int>::of(&QComboBox::currentIndexChanged), [=](int index)
|
||||
{
|
||||
VpnType type = ui->vpnType->currentData().value<VpnType>();
|
||||
- ui->vpnTypeStacked->setCurrentIndex(VPN_TYPE_PPTP);
|
||||
+ ui->vpnTypeStacked->setCurrentIndex(type);
|
||||
switch (type)
|
||||
{
|
||||
case VPN_TYPE_L2TP:
|
||||
@@ -186,14 +187,14 @@ void VpnManager::handleRequestActivateConnection(const QString &connectionPath,
|
||||
inputDialog.setTitle(tr("Tips"));
|
||||
QString tips = QString(tr("Password required to connect to %1.")).arg(settings->id());
|
||||
inputDialog.setText(tips);
|
||||
-
|
||||
- connect(&inputDialog, &TextInputDialog::password, [=](const QString &password)
|
||||
+ inputDialog.setlineEditEchoMode(QLineEdit::Password);
|
||||
+ connect(&inputDialog, &TextInputDialog::password, this, [=](const QString &password)
|
||||
{
|
||||
- NMStringMap secretsMap = vpnSetting->secrets();
|
||||
- secretsMap.insert("password", password);
|
||||
- vpnSetting->setSecrets(secretsMap);
|
||||
- activateVPNConnection(connectionPath, connectionParameter);
|
||||
- connection->clearSecrets(); });
|
||||
+ NMStringMap secretsMap = vpnSetting->secrets();
|
||||
+ secretsMap.insert("password", password);
|
||||
+ vpnSetting->setSecrets(secretsMap);
|
||||
+ activateVPNConnection(connectionPath, connectionParameter);
|
||||
+ connection->clearSecrets(); });
|
||||
|
||||
inputDialog.exec();
|
||||
}
|
||||
diff --git a/plugins/network/src/plugin/manager/vpn-manager.h b/plugins/network/src/plugin/manager/vpn-manager.h
|
||||
index 81233ab..e3fd096 100644
|
||||
--- a/plugins/network/src/plugin/manager/vpn-manager.h
|
||||
+++ b/plugins/network/src/plugin/manager/vpn-manager.h
|
||||
@@ -39,23 +39,24 @@ public:
|
||||
public slots:
|
||||
void clearVpnSetting();
|
||||
void handleRequestEditConnection(const QString &uuid, QString activeConnectionPath);
|
||||
- void handleRequestActivateConnection(const QString &connectionPath,const QString &connectionParameter);
|
||||
+ void handleRequestActivateConnection(const QString &connectionPath, const QString &connectionParameter);
|
||||
|
||||
void handleNotifierConnectionAdded(const QString &path) override;
|
||||
void handleNotifierConnectionRemoved(const QString &path) override;
|
||||
- void activateVPNConnection(const QString &connectionPath,const QString &connectionParameter);
|
||||
+ void activateVPNConnection(const QString &connectionPath, const QString &connectionParameter);
|
||||
|
||||
void handleActiveConnectionAdded(const QString &activePath) override;
|
||||
void handleActiveConnectionRemoved(const QString &activePath) override;
|
||||
|
||||
- void handleVpnConnectionStateChanged(NetworkManager::VpnConnection::State state, NetworkManager::VpnConnection::StateChangeReason reason,const QString &activePath);
|
||||
+ void handleVpnConnectionStateChanged(NetworkManager::VpnConnection::State state, NetworkManager::VpnConnection::StateChangeReason reason, const QString &activePath);
|
||||
void handleVpnStateActivated(const QString &activePath);
|
||||
void handleVpnStateDisconnected(const QString &activePath);
|
||||
void handleVpnStateFailed(const QString &activePath);
|
||||
|
||||
void handleReturnPreviousPage();
|
||||
+
|
||||
private:
|
||||
Ui::VpnManager *ui;
|
||||
};
|
||||
|
||||
-#endif //KIRAN_CPANEL_NETWORK_VPN_MANAGER_H
|
||||
+#endif // KIRAN_CPANEL_NETWORK_VPN_MANAGER_H
|
||||
diff --git a/plugins/network/src/plugin/setting-widget/vpn/vpn-widget.cpp b/plugins/network/src/plugin/setting-widget/vpn/vpn-widget.cpp
|
||||
index 2439947..27de2af 100644
|
||||
--- a/plugins/network/src/plugin/setting-widget/vpn/vpn-widget.cpp
|
||||
+++ b/plugins/network/src/plugin/setting-widget/vpn/vpn-widget.cpp
|
||||
@@ -13,6 +13,7 @@
|
||||
*/
|
||||
|
||||
#include "vpn-widget.h"
|
||||
+#include <kiran-message-box.h>
|
||||
#include <qt5-log-i.h>
|
||||
#include <QHostAddress>
|
||||
#include "ui_vpn-widget.h"
|
||||
@@ -150,24 +151,53 @@ void VpnWidget::clearPtr()
|
||||
|
||||
bool VpnWidget::isInputValid()
|
||||
{
|
||||
- bool valid = true;
|
||||
QString gatewayStr = ui->gateway->text();
|
||||
if (gatewayStr.isEmpty())
|
||||
- valid = false;
|
||||
+ {
|
||||
+ QString error = QString(tr("Gateway can not be empty"));
|
||||
+ KiranMessageBox::KiranStandardButton btn = KiranMessageBox::message(this, tr("Error"),
|
||||
+ error,
|
||||
+ KiranMessageBox::Yes | KiranMessageBox::No);
|
||||
+ KLOG_DEBUG() << "Gateway cannot be empty";
|
||||
+ return false;
|
||||
+ }
|
||||
else
|
||||
{
|
||||
if (!isIpv4AddressValid(gatewayStr))
|
||||
- valid = false;
|
||||
+ {
|
||||
+ QString error = QString(tr("Gateway invalid"));
|
||||
+ KiranMessageBox::KiranStandardButton btn = KiranMessageBox::message(this, tr("Error"),
|
||||
+ error,
|
||||
+ KiranMessageBox::Yes | KiranMessageBox::No);
|
||||
+ KLOG_DEBUG() << "Gateway invalid";
|
||||
+ return false;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (ui->userName->text().isEmpty())
|
||||
- valid = false;
|
||||
+ {
|
||||
+ QString error = QString(tr("user name can not be empty"));
|
||||
+ KiranMessageBox::KiranStandardButton btn = KiranMessageBox::message(this, tr("Error"),
|
||||
+ error,
|
||||
+ KiranMessageBox::Yes | KiranMessageBox::No);
|
||||
|
||||
- if ((ui->passwordOptions->currentData().value<Setting::SecretFlagType>() == NetworkManager::Setting::SecretFlagType::None)
|
||||
- && ui->password->text().isEmpty())
|
||||
- valid = false;
|
||||
+ KLOG_DEBUG() << "user name can not be empty";
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ if ((ui->passwordOptions->currentData().value<Setting::SecretFlagType>() == Setting::SecretFlagType::None) &&
|
||||
+ ui->password->text().isEmpty())
|
||||
+ {
|
||||
+ QString error = QString(tr("password can not be empty"));
|
||||
+ KiranMessageBox::KiranStandardButton btn = KiranMessageBox::message(this, tr("Error"),
|
||||
+ error,
|
||||
+ KiranMessageBox::Yes | KiranMessageBox::No);
|
||||
+
|
||||
+ KLOG_DEBUG() << "password can not be empty";
|
||||
+ return false;
|
||||
+ }
|
||||
|
||||
- return valid;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
bool VpnWidget::isIpv4AddressValid(const QString &address)
|
||||
diff --git a/plugins/network/src/plugin/settings/vpn/vpn-l2tp-setting.cpp b/plugins/network/src/plugin/settings/vpn/vpn-l2tp-setting.cpp
|
||||
index dc9e4d2..09a7109 100644
|
||||
--- a/plugins/network/src/plugin/settings/vpn/vpn-l2tp-setting.cpp
|
||||
+++ b/plugins/network/src/plugin/settings/vpn/vpn-l2tp-setting.cpp
|
||||
@@ -107,5 +107,5 @@ void VpnL2tpSetting::clearPtr()
|
||||
|
||||
bool VpnL2tpSetting::isInputValid()
|
||||
{
|
||||
- return ui->vpnWidget->isInputValid() || ui->connectioNameWidget->isInputValid();
|
||||
+ return ui->vpnWidget->isInputValid() && ui->connectioNameWidget->isInputValid();
|
||||
}
|
||||
diff --git a/plugins/network/src/plugin/settings/vpn/vpn-pptp-setting.cpp b/plugins/network/src/plugin/settings/vpn/vpn-pptp-setting.cpp
|
||||
index 260ae22..817171c 100644
|
||||
--- a/plugins/network/src/plugin/settings/vpn/vpn-pptp-setting.cpp
|
||||
+++ b/plugins/network/src/plugin/settings/vpn/vpn-pptp-setting.cpp
|
||||
@@ -85,7 +85,6 @@ void VpnPptpSetting::showSettingPage(QString activeConnectionPath)
|
||||
|
||||
void VpnPptpSetting::clearPtr()
|
||||
{
|
||||
- KLOG_DEBUG() << "VpnPptpSetting::clearPtr";
|
||||
m_vpnSetting.clear();
|
||||
SettingPage::clearPtr();
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,460 +0,0 @@
|
||||
From e25198845ff304e2a968f6d01b557acc15ba2821 Mon Sep 17 00:00:00 2001
|
||||
From: luoqing <luoqing@kylinsec.com.cn>
|
||||
Date: Tue, 23 Aug 2022 16:14:27 +0800
|
||||
Subject: [PATCH 7/7] feature(network):update translations
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 更新翻译
|
||||
---
|
||||
.../kiran-cpanel-network.zh_CN.ts | 223 ++++++++++++++----
|
||||
1 file changed, 176 insertions(+), 47 deletions(-)
|
||||
|
||||
diff --git a/plugins/network/translations/kiran-cpanel-network.zh_CN.ts b/plugins/network/translations/kiran-cpanel-network.zh_CN.ts
|
||||
index 10521ae..0a1f191 100644
|
||||
--- a/plugins/network/translations/kiran-cpanel-network.zh_CN.ts
|
||||
+++ b/plugins/network/translations/kiran-cpanel-network.zh_CN.ts
|
||||
@@ -25,38 +25,39 @@
|
||||
<translation type="vanished">无线连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/cpanel-network-widget.cpp" line="64"/>
|
||||
- <location filename="../src/plugin/cpanel-network-widget.cpp" line="139"/>
|
||||
+ <location filename="../src/plugin/cpanel-network-widget.cpp" line="67"/>
|
||||
+ <location filename="../src/plugin/cpanel-network-widget.cpp" line="151"/>
|
||||
<source>Wired Network %1</source>
|
||||
<translation>有线网络 %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/cpanel-network-widget.cpp" line="67"/>
|
||||
- <location filename="../src/plugin/cpanel-network-widget.cpp" line="147"/>
|
||||
+ <location filename="../src/plugin/cpanel-network-widget.cpp" line="72"/>
|
||||
+ <location filename="../src/plugin/cpanel-network-widget.cpp" line="159"/>
|
||||
<source>Wired Network</source>
|
||||
<translation>有线网络</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/cpanel-network-widget.cpp" line="83"/>
|
||||
- <location filename="../src/plugin/cpanel-network-widget.cpp" line="155"/>
|
||||
+ <location filename="../src/plugin/cpanel-network-widget.cpp" line="92"/>
|
||||
+ <location filename="../src/plugin/cpanel-network-widget.cpp" line="167"/>
|
||||
<source>Wireless Network %1</source>
|
||||
<translation>无线网络 %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/cpanel-network-widget.cpp" line="86"/>
|
||||
- <location filename="../src/plugin/cpanel-network-widget.cpp" line="163"/>
|
||||
+ <location filename="../src/plugin/cpanel-network-widget.cpp" line="97"/>
|
||||
+ <location filename="../src/plugin/cpanel-network-widget.cpp" line="175"/>
|
||||
+ <location filename="../src/plugin/cpanel-network-widget.cpp" line="319"/>
|
||||
<source>Wireless Network</source>
|
||||
<translation>无线网络</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/cpanel-network-widget.cpp" line="98"/>
|
||||
- <location filename="../src/plugin/cpanel-network-widget.cpp" line="169"/>
|
||||
+ <location filename="../src/plugin/cpanel-network-widget.cpp" line="110"/>
|
||||
+ <location filename="../src/plugin/cpanel-network-widget.cpp" line="181"/>
|
||||
<source>VPN</source>
|
||||
<translation>VPN</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/cpanel-network-widget.cpp" line="105"/>
|
||||
- <location filename="../src/plugin/cpanel-network-widget.cpp" line="170"/>
|
||||
+ <location filename="../src/plugin/cpanel-network-widget.cpp" line="117"/>
|
||||
+ <location filename="../src/plugin/cpanel-network-widget.cpp" line="182"/>
|
||||
<source>Network Details</source>
|
||||
<translation>网络详情</translation>
|
||||
</message>
|
||||
@@ -184,25 +185,35 @@
|
||||
<translation>自动连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/setting-widget/connection-name-widget.cpp" line="40"/>
|
||||
+ <location filename="../src/plugin/setting-widget/connection-name-widget.cpp" line="41"/>
|
||||
<source>Required</source>
|
||||
<translation>必填</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/setting-widget/connection-name-widget.cpp" line="76"/>
|
||||
+ <location filename="../src/plugin/setting-widget/connection-name-widget.cpp" line="77"/>
|
||||
<source>Wired Connection %1</source>
|
||||
<translation>有线网络%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/setting-widget/connection-name-widget.cpp" line="115"/>
|
||||
+ <location filename="../src/plugin/setting-widget/connection-name-widget.cpp" line="116"/>
|
||||
<source>VPN L2TP %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/setting-widget/connection-name-widget.cpp" line="118"/>
|
||||
+ <location filename="../src/plugin/setting-widget/connection-name-widget.cpp" line="119"/>
|
||||
<source>VPN PPTP %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/connection-name-widget.cpp" line="180"/>
|
||||
+ <source>Connection name can not be empty</source>
|
||||
+ <translation>网络名称不能为空</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/connection-name-widget.cpp" line="181"/>
|
||||
+ <source>Error</source>
|
||||
+ <translation>错误</translation>
|
||||
+ </message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ConnectionShowPage</name>
|
||||
@@ -262,12 +273,12 @@
|
||||
<translation>忽略</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/setting-widget/disconnect-and-delete-button.cpp" line="95"/>
|
||||
+ <location filename="../src/plugin/setting-widget/disconnect-and-delete-button.cpp" line="99"/>
|
||||
<source>Are you sure you want to delete the connection %1</source>
|
||||
<translation>您是否确定要删除连接 "%1"</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/setting-widget/disconnect-and-delete-button.cpp" line="96"/>
|
||||
+ <location filename="../src/plugin/setting-widget/disconnect-and-delete-button.cpp" line="100"/>
|
||||
<source>Warning</source>
|
||||
<translation>警告</translation>
|
||||
</message>
|
||||
@@ -344,10 +355,20 @@
|
||||
<translation>自定义MTU</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/setting-widget/ethernet-widget.cpp" line="42"/>
|
||||
+ <location filename="../src/plugin/setting-widget/ethernet-widget.cpp" line="44"/>
|
||||
<source>No device specified</source>
|
||||
<translation>不指定设备</translation>
|
||||
</message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/ethernet-widget.cpp" line="139"/>
|
||||
+ <source>Clone Mac invalid</source>
|
||||
+ <translation>无效的克隆MAC地址</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/ethernet-widget.cpp" line="140"/>
|
||||
+ <source>Error</source>
|
||||
+ <translation>错误</translation>
|
||||
+ </message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Ipv4Widget</name>
|
||||
@@ -387,21 +408,67 @@
|
||||
<translation>备选DNS</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="35"/>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="36"/>
|
||||
<source>Auto</source>
|
||||
<translation>自动</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="36"/>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="37"/>
|
||||
<source>Manual</source>
|
||||
<translation>手动</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="38"/>
|
||||
<location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="39"/>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="40"/>
|
||||
<source>Required</source>
|
||||
<translation>必填</translation>
|
||||
</message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="213"/>
|
||||
+ <source>Ipv4 address can not be empty</source>
|
||||
+ <translation>Ipv4地址不能为空</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="214"/>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="226"/>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="237"/>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="248"/>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="261"/>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="276"/>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="290"/>
|
||||
+ <source>Error</source>
|
||||
+ <translation>错误</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="225"/>
|
||||
+ <source>Ipv4 Address invalid</source>
|
||||
+ <translation>无效的Ipv4地址</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="236"/>
|
||||
+ <source>NetMask can not be empty</source>
|
||||
+ <translation>子网掩码不能为空</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="247"/>
|
||||
+ <source>Netmask invalid</source>
|
||||
+ <translation>无效的子网掩码</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="260"/>
|
||||
+ <source>Ipv4 Gateway invalid</source>
|
||||
+ <translation>无效的Ipv4网关</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="275"/>
|
||||
+ <source>Ipv4 Preferred DNS invalid</source>
|
||||
+ <translation>无效的Ipv4首选DNS</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv4-widget.cpp" line="289"/>
|
||||
+ <source>Ipv4 Alternate DNS invalid</source>
|
||||
+ <translation>无效的Ipv4备选DNS</translation>
|
||||
+ </message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Ipv6Widget</name>
|
||||
@@ -441,25 +508,59 @@
|
||||
<translation>备选DNS</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/setting-widget/ipv6-widget.cpp" line="34"/>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv6-widget.cpp" line="35"/>
|
||||
<source>Auto</source>
|
||||
<translation>自动</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/setting-widget/ipv6-widget.cpp" line="35"/>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv6-widget.cpp" line="36"/>
|
||||
<source>Manual</source>
|
||||
<translation>手动</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/setting-widget/ipv6-widget.cpp" line="36"/>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv6-widget.cpp" line="37"/>
|
||||
<source>Ignored</source>
|
||||
<translation>忽略</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/setting-widget/ipv6-widget.cpp" line="38"/>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv6-widget.cpp" line="39"/>
|
||||
<source>Required</source>
|
||||
<translation>必填</translation>
|
||||
</message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv6-widget.cpp" line="194"/>
|
||||
+ <source>Ipv6 address can not be empty</source>
|
||||
+ <translation>Ipv6地址不能为空</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv6-widget.cpp" line="195"/>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv6-widget.cpp" line="207"/>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv6-widget.cpp" line="221"/>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv6-widget.cpp" line="236"/>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv6-widget.cpp" line="250"/>
|
||||
+ <source>Error</source>
|
||||
+ <translation>错误</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv6-widget.cpp" line="206"/>
|
||||
+ <source>Ipv6 address invalid</source>
|
||||
+ <translation>无效的Ipv6地址</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv6-widget.cpp" line="220"/>
|
||||
+ <source>Ipv6 Gateway invalid</source>
|
||||
+ <translation>无效的Ipv6网关</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv6-widget.cpp" line="235"/>
|
||||
+ <source>Ipv6 Preferred DNS invalid</source>
|
||||
+ <translation>无效的Ipv6首选DNS</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/ipv6-widget.cpp" line="249"/>
|
||||
+ <source>Ipv6 Alternate DNS invalid</source>
|
||||
+ <translation>无效的Ipv6备选DNS</translation>
|
||||
+ </message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ManagerTray</name>
|
||||
@@ -471,7 +572,7 @@
|
||||
<context>
|
||||
<name>NetworkTray</name>
|
||||
<message>
|
||||
- <location filename="../src/tray/network-tray.cpp" line="160"/>
|
||||
+ <location filename="../src/tray/network-tray.cpp" line="164"/>
|
||||
<source>Network settings</source>
|
||||
<translation>网络设置</translation>
|
||||
</message>
|
||||
@@ -629,17 +730,17 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/tray/tray-page.ui" line="92"/>
|
||||
+ <location filename="../src/tray/tray-page.ui" line="98"/>
|
||||
<source>TextLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/tray/tray-page.cpp" line="78"/>
|
||||
+ <location filename="../src/tray/tray-page.cpp" line="88"/>
|
||||
<source>Select wired network card</source>
|
||||
- <translation>请选择 有线网卡</translation>
|
||||
+ <translation>请选择有线网卡</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/tray/tray-page.cpp" line="93"/>
|
||||
+ <location filename="../src/tray/tray-page.cpp" line="103"/>
|
||||
<source>Select wireless network card</source>
|
||||
<translation>请选择无线网卡</translation>
|
||||
</message>
|
||||
@@ -751,22 +852,22 @@
|
||||
<translation>返回</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/manager/vpn-manager.cpp" line="48"/>
|
||||
+ <location filename="../src/plugin/manager/vpn-manager.cpp" line="47"/>
|
||||
<source>VPN</source>
|
||||
<translation type="unfinished">VPN</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/manager/vpn-manager.cpp" line="53"/>
|
||||
- <source>PPTP</source>
|
||||
+ <location filename="../src/plugin/manager/vpn-manager.cpp" line="50"/>
|
||||
+ <source>L2TP</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/manager/vpn-manager.cpp" line="189"/>
|
||||
+ <location filename="../src/plugin/manager/vpn-manager.cpp" line="187"/>
|
||||
<source>Tips</source>
|
||||
<translation>提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/manager/vpn-manager.cpp" line="190"/>
|
||||
+ <location filename="../src/plugin/manager/vpn-manager.cpp" line="188"/>
|
||||
<source>Password required to connect to %1.</source>
|
||||
<translation>连接网络 "%1" 需要密码</translation>
|
||||
</message>
|
||||
@@ -915,27 +1016,55 @@
|
||||
<translation>NT域</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/setting-widget/vpn/vpn-widget.cpp" line="26"/>
|
||||
<location filename="../src/plugin/setting-widget/vpn/vpn-widget.cpp" line="27"/>
|
||||
<location filename="../src/plugin/setting-widget/vpn/vpn-widget.cpp" line="28"/>
|
||||
+ <location filename="../src/plugin/setting-widget/vpn/vpn-widget.cpp" line="29"/>
|
||||
<source>Required</source>
|
||||
<translation>必填</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/setting-widget/vpn/vpn-widget.cpp" line="38"/>
|
||||
+ <location filename="../src/plugin/setting-widget/vpn/vpn-widget.cpp" line="39"/>
|
||||
<source>Saved</source>
|
||||
<translation>已保存的</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/setting-widget/vpn/vpn-widget.cpp" line="39"/>
|
||||
+ <location filename="../src/plugin/setting-widget/vpn/vpn-widget.cpp" line="40"/>
|
||||
<source>Ask</source>
|
||||
<translation>总是询问</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/setting-widget/vpn/vpn-widget.cpp" line="40"/>
|
||||
+ <location filename="../src/plugin/setting-widget/vpn/vpn-widget.cpp" line="41"/>
|
||||
<source>Not required</source>
|
||||
<translation>不要求</translation>
|
||||
</message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/vpn/vpn-widget.cpp" line="157"/>
|
||||
+ <source>Gateway can not be empty</source>
|
||||
+ <translation>网关不能为空</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/vpn/vpn-widget.cpp" line="158"/>
|
||||
+ <location filename="../src/plugin/setting-widget/vpn/vpn-widget.cpp" line="169"/>
|
||||
+ <location filename="../src/plugin/setting-widget/vpn/vpn-widget.cpp" line="180"/>
|
||||
+ <location filename="../src/plugin/setting-widget/vpn/vpn-widget.cpp" line="192"/>
|
||||
+ <source>Error</source>
|
||||
+ <translation>错误</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/vpn/vpn-widget.cpp" line="168"/>
|
||||
+ <source>Gateway invalid</source>
|
||||
+ <translation>无效的网关</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/vpn/vpn-widget.cpp" line="179"/>
|
||||
+ <source>user name can not be empty</source>
|
||||
+ <translation>用户名不能为空</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <location filename="../src/plugin/setting-widget/vpn/vpn-widget.cpp" line="191"/>
|
||||
+ <source>password can not be empty</source>
|
||||
+ <translation>密码不能为空</translation>
|
||||
+ </message>
|
||||
</context>
|
||||
<context>
|
||||
<name>WiredManager</name>
|
||||
@@ -955,7 +1084,7 @@
|
||||
<translation>返回</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/manager/wired-manager.cpp" line="46"/>
|
||||
+ <location filename="../src/plugin/manager/wired-manager.cpp" line="44"/>
|
||||
<source>Wired Network Adapter</source>
|
||||
<translation>有线网卡</translation>
|
||||
</message>
|
||||
@@ -968,7 +1097,7 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/settings/wired-setting-page.cpp" line="68"/>
|
||||
+ <location filename="../src/plugin/settings/wired-setting-page.cpp" line="67"/>
|
||||
<source>Network name</source>
|
||||
<translation>网络名称</translation>
|
||||
</message>
|
||||
@@ -991,17 +1120,17 @@
|
||||
<translation>返回</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/manager/wireless-manager.cpp" line="47"/>
|
||||
+ <location filename="../src/plugin/manager/wireless-manager.cpp" line="45"/>
|
||||
<source>Wireless Network Adapter</source>
|
||||
<translation>无线网卡</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/manager/wireless-manager.cpp" line="369"/>
|
||||
+ <location filename="../src/plugin/manager/wireless-manager.cpp" line="365"/>
|
||||
<source>Tips</source>
|
||||
<translation>提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/manager/wireless-manager.cpp" line="370"/>
|
||||
+ <location filename="../src/plugin/manager/wireless-manager.cpp" line="366"/>
|
||||
<source>Password required to connect to %1.</source>
|
||||
<translation>连接网络 "%1" 需要密码</translation>
|
||||
</message>
|
||||
@@ -1076,7 +1205,7 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
- <location filename="../src/plugin/settings/wireless-setting-page.cpp" line="65"/>
|
||||
+ <location filename="../src/plugin/settings/wireless-setting-page.cpp" line="66"/>
|
||||
<source>Wireless name</source>
|
||||
<translation>无线网络名称</translation>
|
||||
</message>
|
||||
@@ -1084,7 +1213,7 @@
|
||||
<context>
|
||||
<name>WirelessTrayWidget</name>
|
||||
<message>
|
||||
- <location filename="../src/tray/wireless-tray-widget.cpp" line="469"/>
|
||||
+ <location filename="../src/tray/wireless-tray-widget.cpp" line="491"/>
|
||||
<source>the network "%1" not found</source>
|
||||
<translation>未找到网络 "%1"</translation>
|
||||
</message>
|
||||
--
|
||||
2.33.0
|
||||
|
||||
Binary file not shown.
@ -1,33 +1,12 @@
|
||||
Name: kiran-control-panel
|
||||
Version: 2.3.4
|
||||
Release: 10
|
||||
Version: 2.3.5
|
||||
Release: 1
|
||||
Summary: Kiran Control Panel
|
||||
Summary(zh_CN): Kiran桌面控制面板
|
||||
|
||||
License: MulanPSL-2.0
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
Patch0001: 0001-fix-system-buttons-on-the-system-information-page-ar.patch
|
||||
Patch0002: 0002-refactor-systeminfo-update-systeminfo-plugin-dialog-.patch
|
||||
Patch0003: 0001-fix-netwowrk-fix-not-searching-the-wireless-network-.patch
|
||||
Patch0004: 0001-refactor-panel-set-panel-creategory-widget-auto-fill.patch
|
||||
Patch0005: 0001-fix-search-when-the-relevant-setting-interface-canno.patch
|
||||
Patch0006: 0002-fix-account-error-prompt-box-is-added-with-the-defau.patch
|
||||
Patch0007: 0001-fix-battery-idle-remove-invalid-idle-shutdown-displa.patch
|
||||
Patch0008: 0002-fix-account-The-connection-singleton-in-the-signal-s.patch
|
||||
Patch0009: 0001-feature-network-Add-the-conf-file-to-overwrite-the-o.patch
|
||||
Patch0010: 0002-fix-network-fix-crash-and-wireless-network-disable-f.patch
|
||||
Patch0011: 0003-fix-network-fix-the-problem-of-network-and-details-c.patch
|
||||
Patch0012: 0004-fix-network-Add-error-prompt-box-when-saving-configu.patch
|
||||
Patch0013: 0005-fix-network-fix-invalid-configuration-created-for-th.patch
|
||||
Patch0014: 0006-fix-network-only-L2TP-type-is-supported-temporary-an.patch
|
||||
Patch0015: 0007-feature-network-update-translations.patch
|
||||
Patch0016: 0001-feat-accessibleName-updates-accessiblename.patch
|
||||
Patch0017: 0001-feature-audio-network-Add-labels-to-volume-and-netwo.patch
|
||||
Patch0018: 0002-fix-network-Temporarily-do-not-overwrite-the-Network.patch
|
||||
Patch0019: 0001-refactor-account-move-some-account-management-contro.patch
|
||||
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: cmake >= 3.2
|
||||
BuildRequires: glib2-devel
|
||||
@ -149,7 +128,7 @@ make %{?_smp_mflags}
|
||||
#network
|
||||
%{_sysconfdir}/xdg/autostart/kiran-network-status-icon.desktop
|
||||
%{_bindir}/kiran-network-status-icon
|
||||
# /etc/NetworkManager/conf.d/00-server.conf
|
||||
/etc/NetworkManager/conf.d/00-server.conf
|
||||
|
||||
#display
|
||||
%{_datadir}/kiran-cpanel-display/translations/*
|
||||
@ -187,6 +166,12 @@ make %{?_smp_mflags}
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%changelog
|
||||
* Mon Sep 05 2022 luoqing <luoqing@kylinsec.com.cn> - 2.3.5-1
|
||||
- KYOS-F: Fix the network connection status does not change after unplugging the network cable (#I5I0AA)
|
||||
- KYOS-F: Fix network tay crash (#I5OKBR)
|
||||
- KYOS-F: Optimized prompt pop-up box, consistent with the overall style (#I5O86G)
|
||||
- KYOS-F: Re add the network profile during installation to overwrite the original configuration
|
||||
|
||||
* Mon Sep 05 2022 liuxinhao <liuxinhao@kylinsec.com.cn> - 2.3.4-10
|
||||
- KYOS-F: move some account management controls to common component library
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user