Merge branch '1012' into 'dbus-interface'
add delay See merge request kylin-desktop/kylin-nm!320
This commit is contained in:
commit
24fa8f1fe9
|
@ -17,6 +17,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "kylinnetworkresourcemanager.h"
|
#include "kylinnetworkresourcemanager.h"
|
||||||
|
#define SIGNAL_DELAY 80000
|
||||||
|
#define EMIT_DELAY 10000
|
||||||
|
|
||||||
KyNetworkResourceManager* KyNetworkResourceManager::m_pInstance = nullptr;
|
KyNetworkResourceManager* KyNetworkResourceManager::m_pInstance = nullptr;
|
||||||
|
|
||||||
|
@ -556,9 +558,10 @@ void KyNetworkResourceManager::onActiveConnectionChanged(
|
||||||
if (activeConnect->isValid()) {
|
if (activeConnect->isValid()) {
|
||||||
qDebug()<<"!New state change activate connect"<<activeConnect->uuid();
|
qDebug()<<"!New state change activate connect"<<activeConnect->uuid();
|
||||||
qDebug()<<"!New the active connect state"<<state;
|
qDebug()<<"!New the active connect state"<<state;
|
||||||
|
::usleep(SIGNAL_DELAY);
|
||||||
while(activeConnect->state() != state) {
|
while(activeConnect->state() != state) {
|
||||||
qDebug()<<"connect real state"<<activeConnect->state() <<"change state"<<state;
|
qDebug()<<"connect real state"<<activeConnect->state() <<"change state"<<state;
|
||||||
::usleep(10000);
|
::usleep(EMIT_DELAY);
|
||||||
}
|
}
|
||||||
emit activeConnectStateChangeReason(activeConnect->uuid(), state,
|
emit activeConnectStateChangeReason(activeConnect->uuid(), state,
|
||||||
NetworkManager::ActiveConnection::Reason::UknownReason);
|
NetworkManager::ActiveConnection::Reason::UknownReason);
|
||||||
|
|
|
@ -32,7 +32,7 @@ LanListItem::LanListItem(KyConnectItem *data, QString deviceName, QWidget *paren
|
||||||
LanListItem::LanListItem(QWidget *parent) : ListItem(parent)
|
LanListItem::LanListItem(QWidget *parent) : ListItem(parent)
|
||||||
{
|
{
|
||||||
m_isActive = false;
|
m_isActive = false;
|
||||||
m_netButton->setButtonIcon(QIcon::fromTheme("network-wireless-signal-none-symbolic"));
|
m_netButton->setButtonIcon(QIcon::fromTheme("network-offline-symbolic"));
|
||||||
const QString str=tr("Not connected");
|
const QString str=tr("Not connected");
|
||||||
m_nameLabel->setText(str);
|
m_nameLabel->setText(str);
|
||||||
this->m_infoButton->hide();
|
this->m_infoButton->hide();
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
#include "detailitem.h"
|
||||||
|
|
||||||
|
DetailItem::DetailItem(QWidget *parent) : QWidget(parent)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
#ifndef DETAILITEM_H
|
||||||
|
#define DETAILITEM_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
class DetailItem : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit DetailItem(QWidget *parent = nullptr);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DETAILITEM_H
|
|
@ -22,6 +22,7 @@ LanPage::LanPage(QWidget *parent) : TabPage(parent)
|
||||||
m_activeResourse = new KyActiveConnectResourse(this);
|
m_activeResourse = new KyActiveConnectResourse(this);
|
||||||
m_connectResourse = new KyConnectResourse(this);
|
m_connectResourse = new KyConnectResourse(this);
|
||||||
m_deviceResource = new KyNetworkDeviceResourse(this);
|
m_deviceResource = new KyNetworkDeviceResourse(this);
|
||||||
|
m_wiredConnectOperation = new KyWiredConnectOperation(this);
|
||||||
|
|
||||||
initUI();
|
initUI();
|
||||||
initNetSwitch();
|
initNetSwitch();
|
||||||
|
@ -679,14 +680,13 @@ void LanPage::initUI()
|
||||||
|
|
||||||
inactiveLanListLayout->addWidget(m_inactivatedLanListWidget);
|
inactiveLanListLayout->addWidget(m_inactivatedLanListWidget);
|
||||||
m_settingsLabel->installEventFilter(this);
|
m_settingsLabel->installEventFilter(this);
|
||||||
// emit this->lanConnectChanged();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QListWidgetItem *LanPage::addNewItem(KyConnectItem *itemData, QListWidget *listWidget)
|
QListWidgetItem *LanPage::addNewItem(KyConnectItem *itemData, QListWidget *listWidget)
|
||||||
{
|
{
|
||||||
QListWidgetItem *p_listWidgetItem = new QListWidgetItem(listWidget);
|
QListWidgetItem *p_listWidgetItem = new QListWidgetItem();
|
||||||
p_listWidgetItem->setSizeHint(QSize(listWidget->width(),ITEM_HEIGHT));
|
p_listWidgetItem->setSizeHint(QSize(listWidget->width(),ITEM_HEIGHT));
|
||||||
listWidget->addItem(p_listWidgetItem);
|
listWidget->insertItem(0, p_listWidgetItem);
|
||||||
|
|
||||||
LanListItem *p_lanItem = nullptr;
|
LanListItem *p_lanItem = nullptr;
|
||||||
if (itemData != nullptr) {
|
if (itemData != nullptr) {
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue