This commit is contained in:
chenlelin 2020-01-13 09:38:25 +08:00
parent 55fc0ec506
commit e6d53e8cbc
7 changed files with 29 additions and 14 deletions

View File

@ -1 +1 @@
18c1694c9d87adc92ebb3d79a081909857f60aff
d0ea598f653671ec7ae29f02cfe8a223bb295ffb

View File

@ -5,9 +5,9 @@ Version: 1.0.4-1
Auto-Built-Package: debug-symbols
Architecture: amd64
Maintainer: Kylin Team <team+kylin@tracker.debian.org>
Installed-Size: 2144
Installed-Size: 2150
Depends: kylin-nm (= 1.0.4-1)
Section: debug
Priority: optional
Description: debug symbols for kylin-nm
Build-Ids: 18c1694c9d87adc92ebb3d79a081909857f60aff
Build-Ids: d0ea598f653671ec7ae29f02cfe8a223bb295ffb

View File

@ -1 +1 @@
469c8cb42ada0c9dd27938a1626a381a usr/lib/debug/.build-id/18/c1694c9d87adc92ebb3d79a081909857f60aff.debug
c48517cf1b116f015acf8816247d5b42 usr/lib/debug/.build-id/d0/ea598f653671ec7ae29f02cfe8a223bb295ffb.debug

View File

@ -372,7 +372,7 @@ void MainWindow::onPhysicalCarrierChanged(bool flag)
this->startLoading();
if (flag){
syslog(LOG_DEBUG,"wired physical cable is already plug in");
wiredCableUpTimer->start(4000);
wiredCableUpTimer->start(2000);
} else{
syslog(LOG_DEBUG,"wired physical cable is already plug out");
wiredCableDownTimer->start(6000);
@ -400,6 +400,21 @@ void MainWindow::onCarrierDownHandle()
on_btnNetList_clicked(0);
is_stop_check_net_state = 0;
}
void MainWindow::onDeleteLan()
{
deleteLanTimer->stop();
BackThread *btn_bt = new BackThread();
btn_bt->lanDelete();
sleep(1);
btn_bt->lanDelete();
sleep(1);
btn_bt->lanDelete();
btn_bt->deleteLater();
this->stopLoading();
on_btnNetList_clicked(0);
is_stop_check_net_state = 0;
}
//无线网卡插拔处理
void MainWindow::onWirelessDeviceAdded(QDBusObjectPath objPath)
@ -551,6 +566,10 @@ void MainWindow::initNetwork()
wiredCableDownTimer = new QTimer(this);
wiredCableDownTimer->setTimerType(Qt::PreciseTimer);
QObject::connect(wiredCableDownTimer, SIGNAL(timeout()), this, SLOT(onCarrierDownHandle()));
//定时处理异常网络
deleteLanTimer = new QTimer(this);
deleteLanTimer->setTimerType(Qt::PreciseTimer);
QObject::connect(deleteLanTimer, SIGNAL(timeout()), this, SLOT(onDeleteLan()));
}
void MainWindow::iconActivated(QSystemTrayIcon::ActivationReason reason)
@ -1084,15 +1103,9 @@ void MainWindow::on_btnNetList_clicked(int flag)
QString cmd = "export LANG='en_US.UTF-8';export LANGUAGE='en_US';notify-send '" + txt + "...' -t 3800";
system(cmd.toUtf8().data());
BackThread *btn_bt = new BackThread();
btn_bt->lanDelete();
sleep(1);
btn_bt->lanDelete();
sleep(1);
btn_bt->lanDelete();
btn_bt->deleteLater();
on_btnNetList_clicked(0);
is_stop_check_net_state = 1;
this->startLoading();
deleteLanTimer->start(1000);
return;
}

View File

@ -98,6 +98,7 @@ public slots:
void onPhysicalCarrierChanged(bool flag);
void onCarrierUpHandle();
void onCarrierDownHandle();
void onDeleteLan();
void onWirelessDeviceAdded(QDBusObjectPath objPath);
void onWirelessDeviceRemoved(QDBusObjectPath objPath);
void getLanBandWidth();
@ -152,6 +153,7 @@ private:
QTimer *iconTimer;
QTimer *wiredCableUpTimer;
QTimer *wiredCableDownTimer;
QTimer *deleteLanTimer;
QTimer *checkWifiListChanged;
QTimer *checkIfLanConnect;
QTimer *checkIfWifiConnect;