Fix:It takes too lang to reconnect wifi after reboot.
优化重启回连时间过长的问题 Link:http://172.17.66.192/biz/bug-view-54745.html
This commit is contained in:
parent
f38a73cb45
commit
92d2a3fc54
|
@ -14,14 +14,13 @@ LANGUAGE = C++
|
|||
|
||||
CONFIG += c++14
|
||||
CONFIG += qt warn_on
|
||||
CONFIG += release
|
||||
#CONFIG += release
|
||||
#CONFIG += link_pkgconfig
|
||||
|
||||
#PKGCONFIG += glib-2.0 gio-2.0 gsettings-qt
|
||||
|
||||
LIBS += -L/usr/lib/ -lgsettings-qt -lX11
|
||||
#LIBS += -lkysec
|
||||
|
||||
target.path = /usr/bin
|
||||
target.source += $$TARGET
|
||||
desktop.path = /etc/xdg/autostart/
|
||||
|
|
|
@ -887,12 +887,14 @@ void MainWindow::on_showWindowAction()
|
|||
|
||||
void MainWindow::startLoading()
|
||||
{
|
||||
qDebug()<<"Start loading...";
|
||||
loading->startLoading();
|
||||
setTrayLoading(true);
|
||||
}
|
||||
|
||||
void MainWindow::stopLoading()
|
||||
{
|
||||
qDebug()<<"Stop loading!";
|
||||
loading->stopLoading();
|
||||
setTrayLoading(false);
|
||||
getActiveInfoAndSetTrayIcon();
|
||||
|
@ -1810,6 +1812,7 @@ void MainWindow::getWifiListDone(QStringList slist)
|
|||
qDebug()<<"Reconnect finished, cmd = "<<reconnectWifiCmd<<". res = "<<con_res;
|
||||
emit this->stopReconnectWifi(wifiSsid);
|
||||
if (con_res == 0) {
|
||||
m_connected_by_self = true;
|
||||
//回连成功,停止
|
||||
this->stopLoading();
|
||||
is_stop_check_net_state = 0;
|
||||
|
@ -3687,13 +3690,17 @@ void MainWindow::onExternalLanChange()
|
|||
|
||||
void MainWindow::onExternalWifiChange()
|
||||
{
|
||||
if (!isWifiBeConnUp) {
|
||||
//QString txt(tr("WiFi already disconnect"));
|
||||
//objKyDBus->showDesktopNotify(txt);
|
||||
}
|
||||
if (isWifiBeConnUp) {
|
||||
//QString txt(tr("WiFi already connected external"));
|
||||
//objKyDBus->showDesktopNotify(txt);
|
||||
// if (!isWifiBeConnUp) {
|
||||
// //QString txt(tr("WiFi already disconnect"));
|
||||
// //objKyDBus->showDesktopNotify(txt);
|
||||
// }
|
||||
// if (isWifiBeConnUp) {
|
||||
// //QString txt(tr("WiFi already connected external"));
|
||||
// //objKyDBus->showDesktopNotify(txt);
|
||||
// }
|
||||
if (m_connected_by_self) {
|
||||
m_connected_by_self = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_btnWifiList_clicked) {
|
||||
|
|
|
@ -358,6 +358,7 @@ private:
|
|||
// QString hasStarWifiName;
|
||||
|
||||
bool hasWifiConnected;//当前是否有wifi连接
|
||||
bool m_connected_by_self = false; //是否在本进程执行的连接操作
|
||||
QDBusInterface *mDbusXrandInter;
|
||||
QDBusInterface *kdsDbus;
|
||||
|
||||
|
|
Loading…
Reference in New Issue