summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
authorkergoth <kergoth>2003-04-14 23:26:44 (UTC)
committer kergoth <kergoth>2003-04-14 23:26:44 (UTC)
commit9c0ba9922e12081ba87cce6583fe413ab5794cf6 (patch) (side-by-side diff)
tree274472a08b80971045ad54a49b126f7b19454483 /noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
parent4c0ff8a1bdc4750ee36c713392d0842e9eb9eeb3 (diff)
downloadopie-9c0ba9922e12081ba87cce6583fe413ab5794cf6.zip
opie-9c0ba9922e12081ba87cce6583fe413ab5794cf6.tar.gz
opie-9c0ba9922e12081ba87cce6583fe413ab5794cf6.tar.bz2
Correct the constructor, and ensure it does not remove all interface options, as that interferes with the new wireless module.
Diffstat (limited to 'noncore/settings/networksettings/interfaces/interfacesetupimp.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
index 2a5520d..fc65c5f 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
+++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
@@ -14,23 +14,21 @@
/**
* Constuctor. Set up the connection. A profile must be set.
*/
-InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, Interfaces *j, WFlags fl) : InterfaceSetup(parent, name, fl), interfaces(j), interface(i), delInterfaces(false){
-}
-
-/**
- * Constuctor. Set up the connection. A profile must be set.
- */
-InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, WFlags fl) : InterfaceSetup(parent, name, fl), interface(i), delInterfaces(true){
+InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, Interfaces *j, WFlags fl) : InterfaceSetup(parent, name, fl), interface(i), interfaces(j), delInterfaces(false){
+ if (j == 0) {
+ delInterfaces = true;
interfaces = new Interfaces;
}
+}
/**
* Destructor
*/
InterfaceSetupImp::~InterfaceSetupImp(){
- if(delInterfaces)
+ if(delInterfaces) {
delete interfaces;
}
+}
/**
* Save the current settings, then write out the interfaces file and close.
@@ -62,7 +60,7 @@ bool InterfaceSetupImp::saveSettings(){
QMessageBox::information(this, "Not Saved.", "Please fill in the IP address and\n subnet entries.", QMessageBox::Ok);
return false;
}
- interfaces->removeAllInterfaceOptions();
+ //interfaces.removeAllInterfaceOptions();
// DHCP
if(dhcpCheckBox->isChecked())