update
This commit is contained in:
parent
0c4d6d420c
commit
dede6d7a29
|
@ -143,6 +143,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
|
||||
initTimer(); //初始化定时器
|
||||
changeTimerState();//初始化定时器
|
||||
checkIsWirelessDeviceOn(); //检测无线网卡是否插入
|
||||
getIface(); //初始化网络
|
||||
|
||||
trayIcon->show();
|
||||
|
@ -345,6 +346,11 @@ void MainWindow::changeTimerState()
|
|||
|
||||
//检测无线网卡与网线是否准备好,以及相应的处理
|
||||
void MainWindow::checkWirelessDeviceState(/*QDBusObjectPath path*/)
|
||||
{
|
||||
checkIsWirelessDeviceOn();
|
||||
on_btnWifi_clicked();
|
||||
}
|
||||
void MainWindow::checkIsWirelessDeviceOn()
|
||||
{
|
||||
QString wlan_card = "iwconfig>/tmp/kylin-nm-iwconfig";
|
||||
system(wlan_card.toUtf8().data());
|
||||
|
@ -361,8 +367,6 @@ void MainWindow::checkWirelessDeviceState(/*QDBusObjectPath path*/)
|
|||
}else{
|
||||
is_wireless_adapter_ready = 0;
|
||||
}
|
||||
|
||||
on_btnWifi_clicked();
|
||||
}
|
||||
|
||||
// 初始化网络
|
||||
|
|
|
@ -73,6 +73,7 @@ public:
|
|||
|
||||
void initTimer();
|
||||
void changeTimerState();
|
||||
void checkIsWirelessDeviceOn();
|
||||
|
||||
QIcon iconLanOnline, iconLanOffline;
|
||||
QIcon iconWifiFull, iconWifiHigh, iconWifiMedium, iconWifiLow;
|
||||
|
|
Loading…
Reference in New Issue