Modify some debug sentences

This commit is contained in:
chenlelin 2021-05-24 14:15:30 +08:00
parent a058591a12
commit a3d256fad1
6 changed files with 21 additions and 18 deletions

View File

@ -82,7 +82,7 @@ int main(int argc, char *argv[])
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication a(argc, argv);
qInstallMessageHandler(messageOutput);
//qInstallMessageHandler(messageOutput);
openlog(LOG_IDENT, LOG_NDELAY | LOG_NOWAIT | LOG_PID, LOG_USER);
syslog(LOG_DEBUG, "Kylin Network Manager Is Already Launched");

View File

@ -978,7 +978,6 @@ void MainWindow::onPhysicalCarrierChanged(bool flag)
syslog(LOG_DEBUG,"wired physical cable is already plug out");
QtConcurrent::run([=](){
while (1) {
//activeLanDisconn();
BackThread *bt = new BackThread();
IFace *iface = bt->execGetIface();
if (iface->lstate != 0) {
@ -1622,7 +1621,7 @@ void MainWindow::getLanListDone(QStringList slist)
OneLancForm *ccfAct = new OneLancForm(topLanListWidget, this, confForm, ksnm);
connect(ccfAct, SIGNAL(selectedOneLanForm(QString, QString)), this, SLOT(oneTopLanFormSelected(QString, QString)));
connect(ccfAct, SIGNAL(disconnActiveLan()), this, SLOT(activeLanDisconn()));
connect(ccfAct, SIGNAL(requestHandleLanDisconn()), this, SLOT(handleLanDisconn()));
ccfAct->setLanName(nname, ltype, nuuid, mIfName);//第二个参数本来是strLanName但目前不需要翻译
ccfAct->setIcon(true);
ccfAct->setLanInfo(objKyDBus->dbusActiveLanIpv4, objKyDBus->dbusActiveLanIpv6, mwBandWidth, macInterface);
@ -1776,11 +1775,11 @@ void MainWindow::getWifiListDone(QStringList slist)
}
if (current_wifi_list_state == RECONNECT_WIFI) {
qDebug()<<"======优选后的列表为======";
foreach (QString line, slist) {
qDebug()<<line;
}
qDebug()<<"========================";
//qDebug()<<"======优选后的列表为======";
//foreach (QString line, slist) {
// qDebug()<<line;
//}
//qDebug()<<"========================";
QVector<structWifiProperty> targetWifiStructList = connectableWifiPriorityList(slist);
if (!targetWifiStructList.isEmpty()) {
if (!isReconnectingWifi) {
@ -2298,9 +2297,9 @@ QVector<structWifiProperty> MainWindow::connectableWifiPriorityList(const QStrin
//再按照wifiPriority进行排序先简单的选出最高优先级的wifi进行连接
if (selectedWifiListStruct.size() > 1) {
devListSort(&selectedWifiListStruct);
foreach (structWifiProperty wifiPriorityAfterSort, selectedWifiListStruct) {
qDebug() << wifiPriorityAfterSort.bssid << " 的自动连接优先级是 " << wifiPriorityAfterSort.priority;
}
//foreach (structWifiProperty wifiPriorityAfterSort, selectedWifiListStruct) {
// qDebug() << wifiPriorityAfterSort.bssid << " 的自动连接优先级是 " << wifiPriorityAfterSort.priority;
//}
}
ocf->deleteLater();
return selectedWifiListStruct;
@ -2546,7 +2545,7 @@ void MainWindow::loadWifiListDone(QStringList slist)
}
}
}
qDebug()<<"Wifi ssid="<<wname<<". max_freq="<<max_freq<<". min_freq="<<min_freq;
//qDebug()<<"Wifi ssid="<<wname<<". max_freq="<<max_freq<<". min_freq="<<min_freq;
int freqState = 0;
if (max_freq < 3000) {
//只有2.4GHZ
@ -2829,7 +2828,7 @@ void MainWindow::updateWifiListDone(QStringList slist)
}
}
qDebug()<<"Wifi ssid="<<wname<<". max_freq="<<max_freq<<". min_freq="<<min_freq;
//qDebug()<<"Wifi ssid="<<wname<<". max_freq="<<max_freq<<". min_freq="<<min_freq;
int freqState = 0;
if (max_freq < 3000) {
//只有2.4GHZ
@ -3380,7 +3379,7 @@ void MainWindow::oneTopWifiFormSelected(QString wifibssid, int extendLength)
}
//断开网络处理
void MainWindow::activeLanDisconn()
void MainWindow::handleLanDisconn()
{
syslog(LOG_DEBUG, "Wired net is disconnected");
@ -4030,7 +4029,7 @@ void MainWindow::connWifiDone(int connFlag)
syslog(LOG_DEBUG, "Connect Hidden Wifi Success.");
this->ksnm->execGetWifiList(this->wcardname, this->isHuaWeiPC);
QString txt(tr("Connect Hidden Wifi Success"));
qWarning()<<"Wi-Fi connected failed. res=6";
qWarning()<<"Connect Hidden Wifi Success. res=6";
objKyDBus->showDesktopNotify(txt);
}

View File

@ -380,7 +380,7 @@ private slots:
void on_btnAdvConf_clicked();
void activeLanDisconn();
void handleLanDisconn();
void handleWifiDisconn();
void handleWifiDisconnLoading();
void onRequestScanAccesspoint();

View File

@ -566,6 +566,8 @@ void OneConnForm::on_btnDisConn_clicked()
syslog(LOG_DEBUG, "DisConnect button about wifi net is clicked, current wifi name is %s .", wifiName.toUtf8().data());
qDebug()<<"DisConnect button about wifi net is clicked, current wifi name is "<<wifiName;
//syslog(LOG_DEBUG, "DisConnect button about wifi net is clicked, wifi may be disconnected .");
//qDebug()<<"DisConnect button about wifi net is clicked, wifi may be disconnected";
if (mw->canReconnectWifiList.contains(wifiName)) {
mw->canReconnectWifiList.removeOne(wifiName);
}

View File

@ -311,6 +311,8 @@ void OneLancForm::on_btnDisConn_clicked()
{
syslog(LOG_DEBUG, "DisConnect button about lan net is clicked, current wired net name is %s .", ui->lbName->text().toUtf8().data());
qDebug()<<"DisConnect button about lan net is clicked, current wired net name is "<<ui->lbName->text();
//syslog(LOG_DEBUG, "DisConnect button about lan net is clicked, a wired network may be disconnected .");
//qDebug()<<"DisConnect button about lan net is clicked, a wired network may be disconnected";
this->startWaiting(false);
mw->is_stop_check_net_state = 1;
@ -324,7 +326,7 @@ void OneLancForm::on_btnDisConn_clicked()
disconnect(this, SIGNAL(selectedOneLanForm(QString, QString)), mw, SLOT(oneTopLanFormSelected(QString, QString)));
emit disconnActiveLan();
emit requestHandleLanDisconn();
}
void OneLancForm::toDisConnWiredNetwork(QString netUuid)

View File

@ -121,7 +121,7 @@ private:
signals:
void selectedOneLanForm(QString lanName, QString uniqueName);
void connDone(int connFlag);
void disconnActiveLan();
void requestHandleLanDisconn();
void sigConnLan(QString, QString, QString);
};