Merge branch '1116' into 'dbus-interface'

1116

See merge request kylin-desktop/kylin-nm!410
This commit is contained in:
ren peijia 2021-11-17 02:37:29 +00:00
commit f5ef8eabc0
5 changed files with 14 additions and 4 deletions

View File

@ -82,7 +82,7 @@ bool MobileHotspot::isEnable() const
bool MobileHotspot::isShowOnHomePage() const bool MobileHotspot::isShowOnHomePage() const
{ {
return true; return false;
} }
QIcon MobileHotspot::icon() const QIcon MobileHotspot::icon() const

View File

@ -130,7 +130,7 @@ bool NetConnect::isEnable() const
bool NetConnect::isShowOnHomePage() const bool NetConnect::isShowOnHomePage() const
{ {
return true; return false;
} }
QIcon NetConnect::icon() const QIcon NetConnect::icon() const

View File

@ -1,5 +1,6 @@
#include "lanpage.h" #include "lanpage.h"
#include <QDebug> #include <QDebug>
#include <QScrollBar>
#define MAIN_LAYOUT_MARGINS 0,0,0,0 #define MAIN_LAYOUT_MARGINS 0,0,0,0
#define MAIN_LAYOUT_SPACING 0 #define MAIN_LAYOUT_SPACING 0
@ -697,6 +698,8 @@ void LanPage::initUI()
m_inactivatedLanListWidget->setFrameShape(QFrame::Shape::NoFrame); m_inactivatedLanListWidget->setFrameShape(QFrame::Shape::NoFrame);
m_inactivatedLanListWidget->setSpacing(LAN_LIST_SPACING); m_inactivatedLanListWidget->setSpacing(LAN_LIST_SPACING);
m_inactivatedLanListWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); m_inactivatedLanListWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
m_inactivatedLanListWidget->setVerticalScrollMode(QAbstractItemView::ScrollMode::ScrollPerPixel);
m_inactivatedLanListWidget->verticalScrollBar()->setSingleStep(SCROLL_STEP);
m_inactivatedAreaLayout->addWidget(m_inactivatedLanListWidget); m_inactivatedAreaLayout->addWidget(m_inactivatedLanListWidget);
m_settingsLabel->installEventFilter(this); m_settingsLabel->installEventFilter(this);

View File

@ -33,6 +33,8 @@
#define ACTIVE_AREA_MAX_HEIGHT 92 #define ACTIVE_AREA_MAX_HEIGHT 92
#define LABEL_HEIGHT 20 #define LABEL_HEIGHT 20
#define SCROLL_STEP 4
enum KyDeviceType enum KyDeviceType
{ {
WIRED, WIRED,

View File

@ -11,7 +11,6 @@
#define EMPTY_SSID "emptyssid" #define EMPTY_SSID "emptyssid"
#define LOG_FLAG "[WlanPage]" #define LOG_FLAG "[WlanPage]"
#define LAN_PAGE_INDEX 0 #define LAN_PAGE_INDEX 0
#define SCROLL_STEP 4
WlanPage::WlanPage(QWidget *parent) : TabPage(parent) WlanPage::WlanPage(QWidget *parent) : TabPage(parent)
{ {
@ -521,6 +520,7 @@ void WlanPage::onWlanRemoved(QString interface, QString ssid)
} else { } else {
deleteWirelessItemFormMap(m_activateConnectionItemMap, deleteWirelessItemFormMap(m_activateConnectionItemMap,
m_activatedNetListWidget, ssid); m_activatedNetListWidget, ssid);
showDesktopNotify(tr("WLAN Disconnected Successfully"));
QListWidgetItem *p_listWidgetItem = addEmptyItem(m_activatedNetListWidget); QListWidgetItem *p_listWidgetItem = addEmptyItem(m_activatedNetListWidget);
m_activateConnectionItemMap.insert(EMPTY_SSID, p_listWidgetItem); m_activateConnectionItemMap.insert(EMPTY_SSID, p_listWidgetItem);
@ -867,9 +867,14 @@ void WlanPage::onConnectionStateChanged(QString uuid,
if (m_connectResource->isApConnection(uuid)) { if (m_connectResource->isApConnection(uuid)) {
sendApStateChangeSignal(uuid, ssid, devName, state); sendApStateChangeSignal(uuid, ssid, devName, state);
} else {
if (state == NetworkManager::ActiveConnection::State::Deactivated &&
!m_activateConnectionItemMap.contains(ssid)) {
qDebug() << "wlan remove before deactivated";
} else { } else {
wlanShowNotify(ssid, state, reason); wlanShowNotify(ssid, state, reason);
} }
}
if (devName != m_currentDevice) { if (devName != m_currentDevice) {
return; return;