Merge branch 'up-dbus' into 'dbus-interface'

Up dbus

See merge request kylin-desktop/kylin-nm!296
This commit is contained in:
ren peijia 2021-09-29 09:16:48 +00:00
commit d6b43dfddd
4 changed files with 15 additions and 4 deletions

View File

@ -1,6 +1,6 @@
#include "creatnetpage.h"
#define MAX_NAME_LENGTH 32
CreatNetPage::CreatNetPage(QWidget *parent):QFrame(parent)
{
@ -11,6 +11,7 @@ CreatNetPage::CreatNetPage(QWidget *parent):QFrame(parent)
void CreatNetPage::initUI()
{
connNameEdit = new QLineEdit(this);
connNameEdit->setMaxLength(MAX_NAME_LENGTH);
ipv4ConfigCombox = new QComboBox(this);
ipv4addressEdit = new QLineEdit(this);
netMaskEdit = new QLineEdit(this);

View File

@ -64,6 +64,9 @@ NetDetail::NetDetail(QString interface, QString name, QString uuid, bool isActiv
setFixedSize(WINDOW_WIDTH,WINDOW_HEIGHT);
centerToScreen();
if (isCreateNet && !uuid.isEmpty()) {
isCreateNet = false;
}
m_netDeviceResource = new KyNetworkDeviceResourse(this);
m_wirelessConnOpration = new KyWirelessConnectOperation(this);
m_resource = new KyWirelessNetResource(this);

View File

@ -8,6 +8,7 @@
#include <QProcess>
#include "kylinnetworkdeviceresource.h"
#include "../backend/dbus-interface/kylinagentinterface.h"
#define MAINWINDOW_WIDTH 420
#define MAINWINDOW_HEIGHT 456
@ -77,6 +78,9 @@ void MainWindow::firstlyStart()
secondaryStart();//满足条件后执行比较耗时的二级启动
});
m_secondaryStartTimer->start(5 * 1000);
//加载key ring
agent_init();
}
/**

View File

@ -317,7 +317,7 @@ void WlanPage::getAllWlan()
void WlanPage::onWlanAdded(QString interface, KyWirelessNetItem &item)
{
qDebug() << "A Wlan Added! interface = " << interface << "; ssid = " << item.m_NetSsid << Q_FUNC_INFO <<__LINE__;
qDebug() << "A Wlan Added! interface = " << interface << "; ssid = " << item.m_NetSsid << "interface" << interface << Q_FUNC_INFO <<__LINE__;
if (interface != m_defaultDevice) {
qDebug() << "wlan add interface not equal defaultdevice,ignore";
}
@ -904,8 +904,11 @@ void WlanPage::showDetailPage(QString devName, QString ssid)
return;
}
bool isActive = actMap[devName].contains(ssid);
NetDetail *netDetail = new NetDetail(devName, ssid, data.m_connectUuid, isActive, true, false, this);
QString actSsid;
m_resource->getSsidByUuid(actMap[devName].at(0), actSsid, devName);
bool isActive = !actSsid.compare(ssid);
NetDetail *netDetail = new NetDetail(devName, ssid, data.m_connectUuid, isActive, true, true, this);
netDetail->show();
}