summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
authorbenmeyer <benmeyer>2002-10-31 20:15:07 (UTC)
committer benmeyer <benmeyer>2002-10-31 20:15:07 (UTC)
commita491aa2ba326826b7493caa83fc6050e11d53be5 (patch) (side-by-side diff)
tree4598d1770de61605dceafceafce3ad43b633f711 /noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
parentab5a63544deead5206ca47ff8bf94123aa032281 (diff)
downloadopie-a491aa2ba326826b7493caa83fc6050e11d53be5.zip
opie-a491aa2ba326826b7493caa83fc6050e11d53be5.tar.gz
opie-a491aa2ba326826b7493caa83fc6050e11d53be5.tar.bz2
Changed a number of "OK" to QMesageBox::OK
Diffstat (limited to 'noncore/settings/networksettings/interfaces/interfacesetupimp.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
index a19aaeb..3b1a4de 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
+++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
@@ -39,49 +39,49 @@ InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interfac
bool InterfaceSetupImp::saveChanges(){
if(!saveSettings())
return false;
interfaces->write();
return true;
}
/**
* Save the settings for the current Interface.
* @return bool true if successfull, false otherwise
*/
bool InterfaceSetupImp::saveSettings(){
// eh can't really do anything about it other then return. :-D
if(!interfaces->isInterfaceSet())
return true;
bool error = false;
// Loopback case
if(interfaces->getInterfaceMethod(error) == INTERFACES_LOOPBACK){
interfaces->setAuto(interface->getInterfaceName(), autoStart->isChecked());
return true;
}
if(!dhcpCheckBox->isChecked() && (ipAddressEdit->text().isEmpty() || subnetMaskEdit->text().isEmpty())){
- QMessageBox::information(this, "Not Saved.", "Please fill in the IP address and\n subnet entries.", "Ok");
+ QMessageBox::information(this, "Not Saved.", "Please fill in the IP address and\n subnet entries.", QMessageBox::Ok);
return false;
}
interfaces->removeAllInterfaceOptions();
// DHCP
if(dhcpCheckBox->isChecked()){
interfaces->setInterfaceMethod(INTERFACES_METHOD_DHCP);
interfaces->setInterfaceOption("leasehours", QString("%1").arg(leaseTime->value()));
interfaces->setInterfaceOption("leasetime", QString("%1").arg(leaseTime->value()*60*60));
}
else{
interfaces->setInterfaceMethod("static");
interfaces->setInterfaceOption("address", ipAddressEdit->text());
interfaces->setInterfaceOption("netmask", subnetMaskEdit->text());
interfaces->setInterfaceOption("gateway", gatewayEdit->text());
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());