From 7b747299fc08adfd43db3e2151245e2b259df57e Mon Sep 17 00:00:00 2001 From: chenlelin Date: Sat, 6 Feb 2021 16:33:04 +0800 Subject: [PATCH] Fix bug can not save configuration if gateway and dns is empty --- src/confform.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/confform.cpp b/src/confform.cpp index 54677a63..da0c5b9b 100644 --- a/src/confform.cpp +++ b/src/confform.cpp @@ -518,13 +518,13 @@ void ConfForm::on_leAddr_ipv6_textChanged(const QString &arg1) //编辑网络网关 void ConfForm::on_leGateway_textEdited(const QString &arg1) { - this->setEnableOfBtn(); + //this->setEnableOfBtn(); } //编辑网络DNS void ConfForm::on_leDns_textEdited(const QString &arg1) { - this->setEnableOfBtn(); + //this->setEnableOfBtn(); } //编辑网络备用DNS @@ -547,12 +547,12 @@ void ConfForm::setEnableOfBtn() return; } - if (!this->getTextEditState(ui->leGateway->text()) ) { + if (!ui->leGateway->text().isEmpty() && !this->getTextEditState(ui->leGateway->text()) ) { this->setBtnEnableFalse(); return; } - if (!this->getTextEditState(ui->leDns->text()) ) { + if (!ui->leDns->text().isEmpty() && !this->getTextEditState(ui->leDns->text()) ) { this->setBtnEnableFalse(); return; }