Merge pull request #80 from CrankyPants123/master
Fix bug#40360 Cursor exception
This commit is contained in:
commit
2359b3f242
|
@ -184,7 +184,6 @@ void ConfForm::setProp(QString connName, QString uuidName, QString v4method, QSt
|
|||
ui->cbType->setCurrentIndex(1);
|
||||
cbTypeChanged(1);
|
||||
}
|
||||
|
||||
if (v6method == "manual") {
|
||||
ui->leAddr_ipv6->setText(v6addr);
|
||||
}
|
||||
|
@ -227,8 +226,8 @@ void ConfForm::on_btnCreate_clicked()
|
|||
if (kylindbus.multiWiredIfName.size() == 0) {
|
||||
QString tip(tr("Can not create new wired network for without wired card"));
|
||||
kylindbus.showDesktopNotify(tip);
|
||||
//this->close();
|
||||
this->hide();
|
||||
//this->close();this->hide();
|
||||
onConfformHide();
|
||||
return;
|
||||
} else {
|
||||
mIfname = kylindbus.multiWiredIfName.at(0);
|
||||
|
@ -274,7 +273,7 @@ void ConfForm::on_btnCreate_clicked()
|
|||
Utils::m_system(cmdStr.toUtf8().data());
|
||||
}
|
||||
|
||||
this->hide();
|
||||
onConfformHide();
|
||||
}
|
||||
|
||||
//点击了保存更改网络设置的按钮
|
||||
|
@ -303,7 +302,7 @@ void ConfForm::on_btnSave_clicked()
|
|||
QString tip(tr("Can not save wired network for without wired card"));
|
||||
kylindbus.showDesktopNotify(tip);
|
||||
//this->close();
|
||||
this->hide();
|
||||
onConfformHide();
|
||||
return;
|
||||
} else {
|
||||
mIfname = kylindbus.multiWiredIfName.at(0);
|
||||
|
@ -418,7 +417,7 @@ void ConfForm::saveNetworkConfiguration()
|
|||
}
|
||||
}
|
||||
|
||||
this->hide();
|
||||
onConfformHide();
|
||||
}
|
||||
|
||||
bool ConfForm::check_ip_conflict(QString ifname)
|
||||
|
@ -469,8 +468,7 @@ bool ConfForm::check_ip_conflict(QString ifname)
|
|||
//点击取消按钮
|
||||
void ConfForm::on_btnCancel_clicked()
|
||||
{
|
||||
//this->close();
|
||||
this->hide();
|
||||
onConfformHide();
|
||||
}
|
||||
|
||||
//根据需要设置的种类(自动或手动等)显示界面内容
|
||||
|
@ -641,6 +639,17 @@ bool ConfForm::getIpv6EditState(QString text)
|
|||
return match;
|
||||
}
|
||||
|
||||
void ConfForm::onConfformHide()
|
||||
{
|
||||
clearFocus();
|
||||
ui->leAddr->clearFocus();
|
||||
ui->leAddr_ipv6->clearFocus();
|
||||
ui->leGateway->clearFocus();
|
||||
ui->leDns->clearFocus();
|
||||
ui->leDns2->clearFocus();
|
||||
this->hide();
|
||||
}
|
||||
|
||||
//设置创建或保存按钮不可点击
|
||||
void ConfForm::setBtnEnableFalse()
|
||||
{
|
||||
|
|
|
@ -81,7 +81,7 @@ private:
|
|||
void mouseMoveEvent(QMouseEvent *event);
|
||||
|
||||
bool check_ip_conflict(QString ifname);
|
||||
|
||||
void onConfformHide();
|
||||
bool isPress;
|
||||
QPoint winPos;
|
||||
QPoint dragPos;
|
||||
|
|
|
@ -645,7 +645,6 @@ void MainWindow::iconActivated(QSystemTrayIcon::ActivationReason reason)
|
|||
switch (reason) {
|
||||
case QSystemTrayIcon::Trigger:
|
||||
case QSystemTrayIcon::MiddleClick:
|
||||
|
||||
handleIconClicked();
|
||||
|
||||
if (this->isHidden()) {
|
||||
|
@ -991,7 +990,7 @@ void MainWindow::onPhysicalCarrierChanged(bool flag)
|
|||
} else {
|
||||
qDebug()<<"拔出了有线网的网线";
|
||||
syslog(LOG_DEBUG,"wired physical cable is already plug out");
|
||||
|
||||
activeLanDisconn();
|
||||
BackThread *bt = new BackThread();
|
||||
IFace *iface = bt->execGetIface();
|
||||
if (iface->lstate != 0) {
|
||||
|
@ -2726,7 +2725,6 @@ void MainWindow::activeLanDisconn()
|
|||
|
||||
QString txt(tr("Wired net is disconnected"));
|
||||
objKyDBus->showDesktopNotify(txt);
|
||||
|
||||
currSelNetName = "";
|
||||
oldActLanName = "";
|
||||
oldDbusActLanDNS = 0;
|
||||
|
@ -2751,7 +2749,6 @@ void MainWindow::activeWifiDisconn()
|
|||
void MainWindow::activeStartLoading()
|
||||
{
|
||||
syslog(LOG_DEBUG, "Wi-Fi is disconnected");
|
||||
|
||||
QString txt(tr("Wi-Fi is disconnected"));
|
||||
objKyDBus->showDesktopNotify(txt);
|
||||
|
||||
|
|
Binary file not shown.
|
@ -1465,7 +1465,7 @@
|
|||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="2359"/>
|
||||
<source>Wired net is disconnected</source>
|
||||
<translation type="unfinished">断开有线网络</translation>
|
||||
<translation type="unfinished">有线网络断开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="2385"/>
|
||||
|
|
Loading…
Reference in New Issue