summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/interfaces
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/interfaces') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.cpp7
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.h5
2 files changed, 7 insertions, 5 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
index 550e909..a19aaeb 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
+++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
@@ -37,8 +37,9 @@ InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interfac
37 * Save the current settings, then write out the interfaces file and close. 37 * Save the current settings, then write out the interfaces file and close.
38 */ 38 */
39void InterfaceSetupImp::saveChanges(){ 39bool InterfaceSetupImp::saveChanges(){
40 if(!saveSettings()) 40 if(!saveSettings())
41 return; 41 return false;
42 interfaces->write(); 42 interfaces->write();
43 return true;
43} 44}
44 45
@@ -60,5 +61,5 @@ bool InterfaceSetupImp::saveSettings(){
60 61
61 if(!dhcpCheckBox->isChecked() && (ipAddressEdit->text().isEmpty() || subnetMaskEdit->text().isEmpty())){ 62 if(!dhcpCheckBox->isChecked() && (ipAddressEdit->text().isEmpty() || subnetMaskEdit->text().isEmpty())){
62 QMessageBox::information(this, "Not Saved.", "Please fill in address, subnet,\n and gateway entries.", "Ok"); 63 QMessageBox::information(this, "Not Saved.", "Please fill in the IP address and\n subnet entries.", "Ok");
63 return false; 64 return false;
64 } 65 }
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.h b/noncore/settings/networksettings/interfaces/interfacesetupimp.h
index 3bbf34e..a88e190 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetupimp.h
+++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.h
@@ -13,9 +13,10 @@ class InterfaceSetupImp : public InterfaceSetup {
13public: 13public:
14 InterfaceSetupImp( QWidget* parent = 0, const char* name = 0, Interface *i=0, WFlags fl = 0); 14 InterfaceSetupImp( QWidget* parent = 0, const char* name = 0, Interface *i=0, WFlags fl = 0);
15 void saveChanges(); 15 bool saveChanges();
16 16
17public slots: 17public slots:
18 void setProfile(const QString &profile); 18 void setProfile(const QString &profile);
19 bool saveSettings(); 19 bool saveSettings();
20
20private: 21private:
21 Interfaces *interfaces; 22 Interfaces *interfaces;
@@ -44,5 +45,5 @@ private:
44protected slots: 45protected slots:
45 void accept(){ 46 void accept(){
46 interfaceSetup->saveChanges(); 47 if(interfaceSetup->saveChanges())
47 QDialog::accept(); 48 QDialog::accept();
48 }; 49 };