Merge pull request #70 from mammonsama666/0128-dev
fix(wifi): New wifi connected failed.
This commit is contained in:
commit
62bba09cc4
|
@ -1635,10 +1635,12 @@ void MainWindow::getConnListDone(QStringList slist)
|
|||
if (isAddedWifi) {
|
||||
isAddedWifi = false;
|
||||
//如果是新添加的wifi,尝试激活这个wifi
|
||||
this->is_stop_check_net_state = 1;
|
||||
BackThread *bt = new BackThread();
|
||||
bt->execConnWifi(lastAddedConn);
|
||||
connect(bt, SIGNAL(connDone(int)), this, SLOT(connWifiDone(int)));
|
||||
if (! is_stop_check_net_state) {
|
||||
this->is_stop_check_net_state = 1;
|
||||
BackThread *bt = new BackThread();
|
||||
bt->execConnWifi(lastAddedConn);
|
||||
connect(bt, SIGNAL(connDone(int)), this, SLOT(connWifiDone(int)));
|
||||
}
|
||||
}
|
||||
oldConnSlist.clear();
|
||||
oldConnSlist = newConnSlist;
|
||||
|
|
|
@ -660,18 +660,20 @@ void OneConnForm::on_btnConnPWD_clicked()
|
|||
t->start();
|
||||
}
|
||||
|
||||
mw->is_stop_check_net_state = 1;
|
||||
QThread *t = new QThread();
|
||||
BackThread *bt = new BackThread();
|
||||
bt->moveToThread(t);
|
||||
connect(t, SIGNAL(finished()), t, SLOT(deleteLater()));
|
||||
connect(t, SIGNAL(started()), this, SLOT(slotConnWifiPWD()));
|
||||
connect(this, SIGNAL(sigConnWifiPWD(QString, QString, QString)),
|
||||
bt, SLOT(execConnWifiPWD(QString, QString, QString)));
|
||||
connect(bt, SIGNAL(connDone(int)), mw, SLOT(connWifiDone(int)));
|
||||
connect(bt, SIGNAL(connDone(int)), this, SLOT(slotConnWifiResult(int)));
|
||||
connect(bt, SIGNAL(btFinish()), t, SLOT(quit()));
|
||||
t->start();
|
||||
if (! mw->is_stop_check_net_state) {
|
||||
mw->is_stop_check_net_state = 1;
|
||||
QThread *t = new QThread();
|
||||
BackThread *bt = new BackThread();
|
||||
bt->moveToThread(t);
|
||||
connect(t, SIGNAL(finished()), t, SLOT(deleteLater()));
|
||||
connect(t, SIGNAL(started()), this, SLOT(slotConnWifiPWD()));
|
||||
connect(this, SIGNAL(sigConnWifiPWD(QString, QString, QString)),
|
||||
bt, SLOT(execConnWifiPWD(QString, QString, QString)));
|
||||
connect(bt, SIGNAL(connDone(int)), mw, SLOT(connWifiDone(int)));
|
||||
connect(bt, SIGNAL(connDone(int)), this, SLOT(slotConnWifiResult(int)));
|
||||
connect(bt, SIGNAL(btFinish()), t, SLOT(quit()));
|
||||
t->start();
|
||||
}
|
||||
}
|
||||
|
||||
//点击后弹出连接隐藏wifi网络窗口
|
||||
|
|
Loading…
Reference in New Issue