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
{
return true;
return false;
}
QIcon MobileHotspot::icon() const

View File

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

View File

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

View File

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

View File

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