author | benmeyer <benmeyer> | 2002-10-30 20:43:56 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-30 20:43:56 (UTC) |
commit | 26b5befecbb8a763a7fde36b0b3299bd9dd28f73 (patch) (side-by-side diff) | |
tree | 3170521118daaed4145f12705d52748b4612ae67 /noncore/settings/networksettings/interfaces/interfacesetupimp.cpp | |
parent | 3c1824f39867bc2ada45fe32785267caa5dfb04b (diff) | |
download | opie-26b5befecbb8a763a7fde36b0b3299bd9dd28f73.zip opie-26b5befecbb8a763a7fde36b0b3299bd9dd28f73.tar.gz opie-26b5befecbb8a763a7fde36b0b3299bd9dd28f73.tar.bz2 |
Removed requirment for DNS in setup
Diffstat (limited to 'noncore/settings/networksettings/interfaces/interfacesetupimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/interfaces/interfacesetupimp.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp index d42b45d..6587d6f 100644 --- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp +++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp @@ -57,10 +57,10 @@ bool InterfaceSetupImp::saveSettings(){ interfaces->setAuto(interface->getInterfaceName(), autoStart->isChecked()); return true; } - if(!dhcpCheckBox->isChecked() && (ipAddressEdit->text().isEmpty() || subnetMaskEdit->text().isEmpty() || firstDNSLineEdit->text().isEmpty())){ - QMessageBox::information(this, "Empy Fields.", "Please fill in address, subnet,\n gateway and the first dns entries.", "Ok"); + if(!dhcpCheckBox->isChecked() && (ipAddressEdit->text().isEmpty() || subnetMaskEdit->text().isEmpty())){ + QMessageBox::information(this, "Empy Fields.", "Please fill in address, subnet,\n and gateway entries.", "Ok"); return false; } interfaces->removeAllInterfaceOptions(); @@ -74,11 +74,13 @@ bool InterfaceSetupImp::saveSettings(){ interfaces->setInterfaceMethod("static"); interfaces->setInterfaceOption("address", ipAddressEdit->text()); interfaces->setInterfaceOption("netmask", subnetMaskEdit->text()); interfaces->setInterfaceOption("gateway", gatewayEdit->text()); - QString dns = firstDNSLineEdit->text() + " " + secondDNSLineEdit->text(); - interfaces->setInterfaceOption("up "DNSSCRIPT" -a ", dns); - interfaces->setInterfaceOption("down "DNSSCRIPT" -r ", dns); + if(!firstDNSLineEdit->text().isEmpty() || !secondDNSLineEdit->text().isEmpty()){ + QString dns = firstDNSLineEdit->text() + " " + secondDNSLineEdit->text(); + interfaces->setInterfaceOption("up "DNSSCRIPT" -a ", dns); + interfaces->setInterfaceOption("down "DNSSCRIPT" -r ", dns); + } } // IP Information interfaces->setAuto(interface->getInterfaceName(), autoStart->isChecked()); |