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 += c++14
|
||||||
CONFIG += qt warn_on
|
CONFIG += qt warn_on
|
||||||
CONFIG += release
|
#CONFIG += release
|
||||||
#CONFIG += link_pkgconfig
|
#CONFIG += link_pkgconfig
|
||||||
|
|
||||||
#PKGCONFIG += glib-2.0 gio-2.0 gsettings-qt
|
#PKGCONFIG += glib-2.0 gio-2.0 gsettings-qt
|
||||||
|
|
||||||
LIBS += -L/usr/lib/ -lgsettings-qt -lX11
|
LIBS += -L/usr/lib/ -lgsettings-qt -lX11
|
||||||
#LIBS += -lkysec
|
#LIBS += -lkysec
|
||||||
|
|
||||||
target.path = /usr/bin
|
target.path = /usr/bin
|
||||||
target.source += $$TARGET
|
target.source += $$TARGET
|
||||||
desktop.path = /etc/xdg/autostart/
|
desktop.path = /etc/xdg/autostart/
|
||||||
|
|
|
@ -887,12 +887,14 @@ void MainWindow::on_showWindowAction()
|
||||||
|
|
||||||
void MainWindow::startLoading()
|
void MainWindow::startLoading()
|
||||||
{
|
{
|
||||||
|
qDebug()<<"Start loading...";
|
||||||
loading->startLoading();
|
loading->startLoading();
|
||||||
setTrayLoading(true);
|
setTrayLoading(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::stopLoading()
|
void MainWindow::stopLoading()
|
||||||
{
|
{
|
||||||
|
qDebug()<<"Stop loading!";
|
||||||
loading->stopLoading();
|
loading->stopLoading();
|
||||||
setTrayLoading(false);
|
setTrayLoading(false);
|
||||||
getActiveInfoAndSetTrayIcon();
|
getActiveInfoAndSetTrayIcon();
|
||||||
|
@ -1810,6 +1812,7 @@ void MainWindow::getWifiListDone(QStringList slist)
|
||||||
qDebug()<<"Reconnect finished, cmd = "<<reconnectWifiCmd<<". res = "<<con_res;
|
qDebug()<<"Reconnect finished, cmd = "<<reconnectWifiCmd<<". res = "<<con_res;
|
||||||
emit this->stopReconnectWifi(wifiSsid);
|
emit this->stopReconnectWifi(wifiSsid);
|
||||||
if (con_res == 0) {
|
if (con_res == 0) {
|
||||||
|
m_connected_by_self = true;
|
||||||
//回连成功,停止
|
//回连成功,停止
|
||||||
this->stopLoading();
|
this->stopLoading();
|
||||||
is_stop_check_net_state = 0;
|
is_stop_check_net_state = 0;
|
||||||
|
@ -3687,13 +3690,17 @@ void MainWindow::onExternalLanChange()
|
||||||
|
|
||||||
void MainWindow::onExternalWifiChange()
|
void MainWindow::onExternalWifiChange()
|
||||||
{
|
{
|
||||||
if (!isWifiBeConnUp) {
|
// if (!isWifiBeConnUp) {
|
||||||
//QString txt(tr("WiFi already disconnect"));
|
// //QString txt(tr("WiFi already disconnect"));
|
||||||
//objKyDBus->showDesktopNotify(txt);
|
// //objKyDBus->showDesktopNotify(txt);
|
||||||
}
|
// }
|
||||||
if (isWifiBeConnUp) {
|
// if (isWifiBeConnUp) {
|
||||||
//QString txt(tr("WiFi already connected external"));
|
// //QString txt(tr("WiFi already connected external"));
|
||||||
//objKyDBus->showDesktopNotify(txt);
|
// //objKyDBus->showDesktopNotify(txt);
|
||||||
|
// }
|
||||||
|
if (m_connected_by_self) {
|
||||||
|
m_connected_by_self = false;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_btnWifiList_clicked) {
|
if (is_btnWifiList_clicked) {
|
||||||
|
|
|
@ -358,6 +358,7 @@ private:
|
||||||
// QString hasStarWifiName;
|
// QString hasStarWifiName;
|
||||||
|
|
||||||
bool hasWifiConnected;//当前是否有wifi连接
|
bool hasWifiConnected;//当前是否有wifi连接
|
||||||
|
bool m_connected_by_self = false; //是否在本进程执行的连接操作
|
||||||
QDBusInterface *mDbusXrandInter;
|
QDBusInterface *mDbusXrandInter;
|
||||||
QDBusInterface *kdsDbus;
|
QDBusInterface *kdsDbus;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue