52 lines
1.8 KiB
Diff
52 lines
1.8 KiB
Diff
From 62d168b58a73df914ad2b1f339f60d11dbc81bd1 Mon Sep 17 00:00:00 2001
|
|
From: tanyulong <tanyulong@kylinos.cn>
|
|
Date: Thu, 28 Oct 2021 15:41:57 +0800
|
|
Subject: [PATCH] fix net sort wifi strength
|
|
|
|
---
|
|
plugins/network/netconnect/netconnect.cpp | 7 ++-----
|
|
1 file changed, 2 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/plugins/network/netconnect/netconnect.cpp b/plugins/network/netconnect/netconnect.cpp
|
|
index ce0eb22..5d868d4 100755
|
|
--- a/plugins/network/netconnect/netconnect.cpp
|
|
+++ b/plugins/network/netconnect/netconnect.cpp
|
|
@@ -35,7 +35,7 @@
|
|
#define CONTROL_CENTER_WIFI "org.ukui.control-center.wifi.switch"
|
|
|
|
bool sortByVal(const QPair<QString, int> &l, const QPair<QString, int> &r) {
|
|
- return (l.second > r.second);
|
|
+ return (l.second < r.second);
|
|
}
|
|
|
|
NetConnect::NetConnect():m_wifiList(new Wifi)
|
|
@@ -123,7 +123,6 @@ void NetConnect::initSearchText() {
|
|
|
|
void NetConnect::initComponent(){
|
|
|
|
-// ui->RefreshBtn->hide();
|
|
|
|
//把判断列表是否已刷新的bool值初始化为true
|
|
this->is_refreshed = true;
|
|
@@ -331,8 +330,6 @@ void NetConnect::rebuildAvailComponent(QString iconPath, QString netName){
|
|
devFrame->setMinimumHeight(50);
|
|
devFrame->setMaximumHeight(50);
|
|
|
|
-// devFrame->setFixedHeight(50);
|
|
-// devFrame->setStyleSheet("QWidget{background: #F4F4F4; border-radius: 6px;}");
|
|
QHBoxLayout * devHorLayout = new QHBoxLayout(devFrame);
|
|
devHorLayout->setSpacing(8);
|
|
devHorLayout->setContentsMargins(16, 0, 0, 0);
|
|
@@ -562,7 +559,7 @@ bool NetConnect::getInitStatus()
|
|
//获取当前wifi是否连接
|
|
QDBusReply<QVariant> m_result = interface.call("Get", "org.freedesktop.NetworkManager", "WirelessEnabled");
|
|
|
|
- if (m_result.isValid()){
|
|
+ if (m_result.isValid()) {
|
|
bool status = m_result.value().toBool();
|
|
return status;
|
|
} else {
|
|
--
|
|
2.30.0
|
|
|