Merge branch 'dbus-interface' of http://gitlab2.kylin.com/kylin-desktop/kylin-nm into approxy

This commit is contained in:
zhangyuanyuan1 2022-10-13 11:39:15 +08:00
commit 6ff370056a
14 changed files with 202 additions and 19 deletions

110
debian/changelog vendored
View File

@ -1,3 +1,113 @@
kylin-nm (3.20.1.6) v101; urgency=medium
* BUG号
-#132105 【设计】网络属性界面字体最大时显示与设计预期不符
-#143023 【设计】【控制面板】有线网络连接属性界面无删除此网络功能
* 需求号:无
* 其他改动:
* 影响域: 网络连接属性界面
-- zhaoshixu <zhaoshixu@kylinos.cn> Tue, 11 Oct 2022 09:38:20 +0800
kylin-nm (3.20.1.5) v101; urgency=medium
* BUG号
-#140403 【HWE-Base1】【网络连接】【用例-391923】连接有线网络后更改ip后保存此时有线连接一直显示连接中状态此时网络已经可用
-#125714 【UKUI 3.20 走查】【网络】快捷键支持不完整
-#123342 【ukui3.20】【设计】移动热点通知弹窗优化
-#141661 【网络】网络名称长度最大时,网络详情界面名称显示不全
* 需求号:无
* 其他改动:修改关键字,解决编译不过问题
* 影响域: 已连接有线更改ip usd快捷键 移动热点开关 详情页网络名称
-- zhaoshixu <zhaoshixu@kylinos.cn> Wed, 28 Sep 2022 10:11:31 +0800
kylin-nm (3.20.1.4) v101; urgency=medium
* BUG号
- #141204 【rc6走查】【托盘】【网络】网络项间距待调整
- #103843 【个性化|主题】【网络】切换主题,添加网络或者网络详情左上角的网络图标没有变化
- #100325 【登录】【网络】在系统内关闭有线网络的开关后,注销到登录界面,有线网络仍然可以连接(但实际没有连接)
- #140629 【藏文】【无线局域网】未藏文化:任务栏打开无线局域网,加入其他网络,”记住该网络“显示为英文
- #140550 【网络配置】以太网连接确认窗口选择允许其他设备发现这台设备后,防火墙类型没有配置为办公网络
- #140545 【HWE-Base1】【网络连接】忘记WiFi后仍会显示WiFi连接状态此时实际已经断连必现
- #140442 【rc6走查】【托盘】【网络】离任务栏的间距和设计稿不符
- #140441 【rc6走查】【托盘】【网络】弹窗页tab控件未居中对齐
- #140440 【rc6走查】【托盘】【网络】左右间距不符合设计稿
- #140438 【rc6走查】【托盘】【网络】设置按钮未符合设计稿
- #140401 【HWE-Base1】【网络连接】连接无线网络时弹窗提示“是否允许此网络在其他设备...”,显示在屏幕右下方,未显示在屏幕中央(必现)
- #122742 【reopen】【x100】【通有】【卓怡NF14-ODM】【wifi】路由器设置WiFi从不加密到加密后测试机点击连接该WiFi没有弹出密码框一直转圈
* 需求号:无
* 其他改动:修改关键字,解决编译不过问题
* 影响域: 网络主界面,详情页图标,翻译
-- chenxuechao <chenxuechao@kylinos.cn> Mon, 26 Sep 2022 09:33:31 +0800
kylin-nm (3.20.1.3) v101; urgency=medium
* BUG号
- #103974 【无线网络】使用ip link set down dev wlan0关闭无线设备后无线开关仍然是打开状态无无线列表
- #126700 【WIFI】在网络高级设置中连接无线网络后断开该无线网络任务栏无线列表该无线网络仍然处于断开加载状态
- #122742 【wifi】路由器设置WiFi从不加密到加密后测试机点击连接该WiFi没有弹出密码框一直转圈
- #134326 【网络】网络项长度不一致
-- zhaoshixu <zhaoshixu@kylinos.cn> Fri, 26 Aug 2022 13:47:31 +0800
kylin-nm (3.20.1.2) v101; urgency=medium
* BUG号
- #125058 【任务栏】【托盘】英文模式下网络工具插件名称悬浮显示不正确
- #125703 【UKUI 3.20 走查】【托盘-网络】任务栏显示图标和默认弹出界面不一致
- #126830 【ukui3.20】【设计】手动修改IP冲突提示优化
- #131910 网络模式选择弹窗可以重复弹出
- #132105 【设计】网络属性界面字体最大时显示与设计预期不符
- #132350 【设计】连接企业wifi验证密码弹窗与设计不符
- #133072 【防火墙】【网络模式配置】关闭专用和公用模式,首次连接网络,提示信息与选择内容错误
- #133311 【防火墙】开机后连接默认网络,防火墙网络模式不显示正在使用的网络
- #132228 【设计】首次连接网络提示弹窗版面间隔与设计不相符
- #133299 【PTOF】【防火墙规则】【安全通知】匹配到阻止的入站规则重启机器后阻止规则失效
* 需求号:无
* 其他改动:
* 影响域: 托盘图标tooltip 详情页 ip冲突检测 网络模式选择
-- zhaoshixu <zhaoshixu@kylinos.cn> Fri, 12 Aug 2022 10:48:46 +0800
kylin-nm (3.20.1.1) v101; urgency=medium
* BUG号
* 需求号:无
* 其他改动删除多余头文件解决编包不过的BUG
* 影响域:移动热点界面 藏文翻译 网络模式选择 网络配置界面
-- chenxuechao <chenxuechao@kylinos.cn> Mon, 25 Jul 2022 11:05:08 +0800
kylin-nm (3.20.1.0) v101; urgency=medium
* BUG号
- #126640 【WiFi】输入密码后连接过程中右键忘记网络后密码信息仍然保存在输入框建议删除
- #116373 【设计】网络-加入其他网络弹窗样式与设计稿不一致
* 需求号:
- #14264 网络模式选择
* 其他改动:
-任务#94645 前端界面开发
* 影响域:移动热点界面 藏文翻译 网络模式选择 网络配置界面
-- chenxuechao <chenxuechao@kylinos.cn> Mon, 25 Jul 2022 10:16:17 +0800
kylin-nm (3.20.0.6) v101; urgency=medium
* BUG号
- #126640 【WiFi】输入密码后连接过程中右键忘记网络后密码信息仍然保存在输入框建议删除
- #116373 【设计】网络-加入其他网络弹窗样式与设计稿不一致
* 需求号:
- #14264 网络模式选择
* 其他改动:
-任务#94645 前端界面开发
* 影响域:移动热点界面 藏文翻译 网络模式选择 网络配置界面
-- chenxuechao <chenxuechao@kylinos.cn> Fri, 22 Jul 2022 18:23:34 +0800
kylin-nm (3.1.1-2021+1230) v101; urgency=medium
* BUG号: #93795 切换动画效果生硬

View File

@ -58,7 +58,7 @@ void MobileHotspotWidget::showDesktopNotify(const QString &message)
QList<QVariant> args;
args<<(tr("ukui control center"))
<<((unsigned int) 0)
<<QString("gnome-dev-ethernet")
<<QString("ukui-control-center")
<<tr("ukui control center desktop message") //显示的是什么类型的信息
<<message //显示的具体信息
<<QStringList()
@ -148,7 +148,7 @@ bool MobileHotspotWidget::eventFilter(QObject *watched, QEvent *event)
return true;
}
if (m_switchBtn->isChecked()) {
showDesktopNotify(tr("start to close hotspot"));
// showDesktopNotify(tr("start to close hotspot"));
QDBusReply<void> reply = m_interface->call("deactiveWirelessAp", m_apNameLine->text(), m_uuid);
if (!reply.isValid()) {
qDebug() << "[MobileHotspotWidget] call deactiveWirelessAp failed ";
@ -171,7 +171,7 @@ bool MobileHotspotWidget::eventFilter(QObject *watched, QEvent *event)
// showDesktopNotify(tr("can not create hotspot with password length less than eight!"));
return true;
}
showDesktopNotify(tr("start to open hotspot ") + m_apNameLine->text());
// showDesktopNotify(tr("start to open hotspot ") + m_apNameLine->text());
QDBusReply<void> reply = m_interface->call("activeWirelessAp",
m_apNameLine->text(),
m_pwdNameLine->text(),

View File

@ -149,6 +149,25 @@ KyConnectItem * KyConnectResourse::getConnectionItemByUuid(QString connectUuid)
return nullptr;
}
KyConnectItem * KyConnectResourse::getConnectionItemByUuidWithoutActivateChecking(QString connectUuid)
{
NetworkManager::Connection::Ptr connectPtr =
m_networkResourceInstance->getConnect(connectUuid);
if (nullptr == connectPtr) {
qWarning()<< "[KyConnectResourse]" <<"get connect failed, connect uuid"<<connectUuid;
return nullptr;
}
KyConnectItem *connectItem = getConnectionItem(connectPtr, "");
if (nullptr != connectItem) {
//connectItem->dumpInfo();
return connectItem;
}
return nullptr;
}
KyConnectItem * KyConnectResourse::getConnectionItemByUuid(QString connectUuid, QString deviceName)
{
NetworkManager::Connection::Ptr connectPtr =

View File

@ -38,6 +38,7 @@ public:
public:
KyConnectItem *getConnectionItemByUuid(QString connectUuid);
KyConnectItem *getConnectionItemByUuidWithoutActivateChecking(QString connectUuid);
KyConnectItem *getConnectionItemByUuid(QString connectUuid, QString deviceName);
void getConnectionList(QString deviceName,
NetworkManager::ConnectionSettings::ConnectionType connectionType,

View File

@ -43,6 +43,10 @@
const QString v10Sp1 = "V10SP1";
const QString intel = "V10SP1-edu";
#define LANPAGE 0
#define WLANPAGE 1
#define AUTOSELET 2
#define KEY_PRODUCT_FEATURES "PRODUCT_FEATURES"
#include <kwindowsystem.h>
@ -257,6 +261,7 @@ void MainWindow::initUI()
m_centralWidget = new QTabWidget(this);
this->setCentralWidget(m_centralWidget);
m_centralWidget->tabBar()->setFixedWidth(this->width()+1);
m_centralWidget->tabBar()->setProperty("setRadius", 12);
// m_centralWidget->tabBar()->setStyleSheet("QTabBar::tab{min-height:40px}");
m_lanWidget = new LanPage(m_centralWidget);
m_wlanWidget = new WlanPage(m_centralWidget);
@ -645,11 +650,17 @@ void MainWindow::onTabletModeChanged(bool mode)
void MainWindow::onShowMainWindow(int type)
{
if (type == LANPAGE || type == WLANPAGE) {
m_centralWidget->setCurrentIndex(type);
if(QApplication::activeWindow() != this) {
this->showMainwindow();
}
} else if (type == AUTOSELET) {
onTrayIconActivated(QSystemTrayIcon::ActivationReason::Trigger);
} else {
qWarning() << "unsupport parameter";
}
}
void MainWindow::onConnectivityChanged(NetworkManager::Connectivity connectivity)

View File

@ -23,6 +23,7 @@
#define MAX_NAME_LENGTH 32
#define MAX_LABEL_WIDTH 250
#define MAX_SSID_WIDTH 133
extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed);
@ -50,10 +51,10 @@ void DetailPage::setSSID(const QString &ssid) {
return;
}
m_formerSSID = ssid;
QFontMetrics fontMetrics(this->font());
QFontMetrics fontMetrics(m_SSIDLabel->font());
int fontSize = fontMetrics.width(ssid);
if (fontSize > this->width()) {
this->m_SSIDLabel->setText(fontMetrics.elidedText(ssid, Qt::ElideRight, this->width()));
if (fontSize > MAX_SSID_WIDTH) {
this->m_SSIDLabel->setText(fontMetrics.elidedText(ssid, Qt::ElideRight, MAX_SSID_WIDTH));
this->setToolTip(ssid);
} else {
this->m_SSIDLabel->setText(ssid);

View File

@ -33,12 +33,14 @@ FixLabel::FixLabel(QWidget *parent) :
{
const QByteArray id("org.ukui.style");
QGSettings * fontSetting = new QGSettings(id, QByteArray(), this);
if(QGSettings::isSchemaInstalled(id)){
connect(fontSetting, &QGSettings::changed,[=](QString key) {
if ("systemFont" == key || "systemFontSize" ==key) {
changedLabelSlot();
}
});
}
}
void FixLabel::setLabelText(QString text) {

View File

@ -30,6 +30,7 @@
#include <QEvent>
#include <QMenu>
#include <QToolTip>
#include <QFontMetrics>
#include "windowmanager/windowmanager.h"
@ -37,7 +38,7 @@
#define WINDOW_HEIGHT 602
#define ICON_SIZE 22,22
#define TITLE_LAYOUT_MARGINS 9,9,0,0
#define CENTER_LAYOUT_MARGINS 24,0,24,0
#define CENTER_LAYOUT_MARGINS 24,0,0,0
#define BOTTOM_LAYOUT_MARGINS 24,0,24,0
#define BOTTOM_LAYOUT_SPACING 16
#define PAGE_LAYOUT_SPACING 1
@ -53,6 +54,7 @@
#define SCRO_WIDTH 472
#define PEAP_SCRO_HEIGHT 300
#define TLS_SCRO_HEIGHT 480
#define MAX_TAB_TEXT_LENGTH 44
//extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed);
@ -358,7 +360,7 @@ void NetDetail::initUI()
// TabBar关联选项卡页面
connect(m_netTabBar, SIGNAL(currentChanged(int)), this, SLOT(currentRowChangeSlot(int)));
setNetTabToolTip();
confimBtn = new QPushButton(this);
confimBtn->setText(tr("Confirm"));
@ -367,7 +369,6 @@ void NetDetail::initUI()
cancelBtn->setText(tr("Cancel"));
forgetBtn = new QPushButton(this);
forgetBtn->setText(tr("Forget this network"));
QVBoxLayout *centerlayout = new QVBoxLayout(centerWidget);
centerlayout->setContentsMargins(CENTER_LAYOUT_MARGINS);
@ -413,7 +414,12 @@ void NetDetail::initComponent()
});
connect(confimBtn, SIGNAL(clicked()), this, SLOT(on_btnConfirm_clicked()));
if (isWlan && !m_uuid.isEmpty()) {
if (!m_uuid.isEmpty()) {
if (isWlan) {
forgetBtn->setText(tr("Forget this network"));
} else {
forgetBtn->setText(tr("Delete this network"));
}
forgetBtn->show();
connect(forgetBtn, SIGNAL(clicked()), this, SLOT(on_btnForget_clicked()));
} else {
@ -451,6 +457,16 @@ void NetDetail::initComponent()
connect(securityPage, &SecurityPage::eapTypeChanged, this, [=]() {
setSecuPageHeight();
});
const QByteArray id(THEME_SCHAME);
if(QGSettings::isSchemaInstalled(id)){
QGSettings * fontSetting = new QGSettings(id, QByteArray(), this);
connect(fontSetting, &QGSettings::changed,[=](QString key) {
if ("systemFont" == key || "systemFontSize" ==key) {
setNetTabToolTip();
}
});
}
}
void NetDetail::pagePadding(QString netName, bool isWlan)
@ -1105,6 +1121,20 @@ bool NetDetail::eventFilter(QObject *w, QEvent *event)
return QWidget::eventFilter(w, event);
}
void NetDetail::setNetTabToolTip()
{
int tabCount = m_netTabBar->count();
for (int i = 0; i< tabCount; ++i) {
QFontMetrics fontMetrics(m_netTabBar->font());
int fontSize = fontMetrics.width(m_netTabBar->tabText(i));
if (fontSize > MAX_TAB_TEXT_LENGTH) {
m_netTabBar->setTabToolTip(i, m_netTabBar->tabText(i));
} else {
m_netTabBar->setTabToolTip(i, "");
}
}
}
NetTabBar::NetTabBar(QWidget *parent)
{

View File

@ -137,6 +137,7 @@ private:
void setNetdetailSomeEnable(bool on);
void startObjectThread();
void setNetTabToolTip();
private:
KyNetworkDeviceResourse *m_netDeviceResource = nullptr;

View File

@ -947,7 +947,7 @@ void LanPage::onConnectionStateChange(QString uuid,
updateActivatedConnectionArea(p_newItem);
updateConnectionState(m_activeConnectionMap, m_activatedLanListWidget, uuid, (ConnectState)state);
} else if (state == NetworkManager::ActiveConnection::State::Deactivated) {
p_newItem = m_connectResourse->getConnectionItemByUuid(uuid);
p_newItem = m_connectResourse->getConnectionItemByUuidWithoutActivateChecking(uuid);
qDebug() << "[LanPage] deactivated reason" << reason;
if (nullptr == p_newItem) {
qWarning()<<"[LanPage] get active connection failed, connection uuid" << uuid;

Binary file not shown.

View File

@ -852,6 +852,10 @@
<source>Forget this network</source>
<translation></translation>
</message>
<message>
<source>Delete this network</source>
<translation></translation>
</message>
<message>
<location filename="../src/frontend/netdetails/netdetail.cpp" line="403"/>
<source>Add Lan Connect</source>

Binary file not shown.

View File

@ -851,6 +851,10 @@
<location filename="../src/frontend/netdetails/netdetail.cpp" line="372"/>
<source>Forget this network</source>
<translation></translation>
</message>
<message>
<source>Delete this network</source>
<translation></translation>
</message>
<message>
<location filename="../src/frontend/netdetails/netdetail.cpp" line="403"/>