summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.cpp18
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.h3
2 files changed, 9 insertions, 12 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
@@ -16,10 +16,7 @@
*/
-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){
- interfaces = new Interfaces;
+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;
+ }
}
@@ -30,4 +27,5 @@ InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interfac
InterfaceSetupImp::~InterfaceSetupImp(){
- if(delInterfaces)
+ if(delInterfaces) {
delete interfaces;
+ }
}
@@ -64,3 +62,3 @@ bool InterfaceSetupImp::saveSettings(){
}
- interfaces->removeAllInterfaceOptions();
+ //interfaces.removeAllInterfaceOptions();
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.h b/noncore/settings/networksettings/interfaces/interfacesetupimp.h
index c4ace77..172da6a 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetupimp.h
+++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.h
@@ -13,3 +13,2 @@ class InterfaceSetupImp : public InterfaceSetup {
public:
- InterfaceSetupImp( QWidget* parent = 0, const char* name = 0, Interface *i = 0, WFlags fl = 0);
InterfaceSetupImp( QWidget* parent = 0, const char* name = 0, Interface *i = 0, Interfaces *j = 0, WFlags fl = 0);
@@ -39,3 +38,3 @@ public:
setCaption("Interface Setup");
- interfaceSetup = new InterfaceSetupImp(this, "InterfaceSetup",i,fl);
+ interfaceSetup = new InterfaceSetupImp(this, "InterfaceSetup",i);
InterfaceSetupLayout->addWidget( interfaceSetup );