summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/mainwindowimp.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/mainwindowimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index c86acdc..4a088cb 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -75,32 +75,32 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par
75} 75}
76 76
77/** 77/**
78 * Deconstructor. Save profiles. Delete loaded libraries. 78 * Deconstructor. Save profiles. Delete loaded libraries.
79 */ 79 */
80MainWindowImp::~MainWindowImp(){ 80MainWindowImp::~MainWindowImp(){
81 qDebug("start Saving mainwindow"); 81 qDebug("Deleting main window");
82 // Save profiles. 82 // Save profiles.
83 Config cfg("NetworkSetup"); 83 Config cfg("NetworkSetup");
84 cfg.setGroup("General"); 84 cfg.setGroup("General");
85 cfg.writeEntry("Profiles", profiles.join(" ")); 85 cfg.writeEntry("Profiles", profiles.join(" "));
86 86
87 // Delete all interfaces that don't have owners. 87 // Delete all interfaces that don't have owners.
88 QMap<Interface*, QListViewItem*>::Iterator iIt; 88 QMap<Interface*, QListViewItem*>::Iterator iIt;
89 for( iIt = items.begin(); iIt != items.end(); ++iIt ){ 89 for( iIt = items.begin(); iIt != items.end(); ++iIt ){
90 if(iIt.key()->getModuleOwner() == NULL) 90 if(iIt.key()->getModuleOwner() == NULL)
91 delete iIt.key(); 91 delete iIt.key();
92 } 92 }
93 93
94 // Delete Modules and Libraries 94 // Delete Modules and Libraries
95 QMap<Module*, QLibrary*>::Iterator it; 95 QMap<Module*, QLibrary*>::Iterator it;
96 for( it = libraries.begin(); it != libraries.end(); ++it ){ 96 for( it = libraries.begin(); it != libraries.end(); ++it ){
97 delete it.key(); 97 delete it.key();
98 delete it.data(); 98 //delete it.data();
99 } 99 }
100 qDebug("done Saving mainwindow"); 100 qDebug("Done deleting main window");
101} 101}
102 102
103/** 103/**
104 * Load all modules that are found in the path 104 * Load all modules that are found in the path
105 * @param path a directory that is scaned for any plugins that can be loaded 105 * @param path a directory that is scaned for any plugins that can be loaded
106 * and attempts to load them 106 * and attempts to load them
@@ -241,24 +241,23 @@ void MainWindowImp::configureClicked(){
241 if(i->getModuleOwner()){ 241 if(i->getModuleOwner()){
242 i->getModuleOwner()->setProfile(currentProfile); 242 i->getModuleOwner()->setProfile(currentProfile);
243 QTabWidget *tabWidget = NULL; 243 QTabWidget *tabWidget = NULL;
244 QWidget *moduleConfigure = i->getModuleOwner()->configure(i, &tabWidget); 244 QWidget *moduleConfigure = i->getModuleOwner()->configure(i, &tabWidget);
245 if(moduleConfigure != NULL){ 245 if(moduleConfigure != NULL){
246 if(tabWidget != NULL){ 246 if(tabWidget != NULL){
247 InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, true); 247 InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, false, Qt::WDestructiveClose);
248 configure->setProfile(currentProfile); 248 configure->setProfile(currentProfile);
249 tabWidget->insertTab(configure, "TCP/IP"); 249 tabWidget->insertTab(configure, "TCP/IP");
250
251 } 250 }
252 moduleConfigure->showMaximized(); 251 moduleConfigure->showMaximized();
253 moduleConfigure->show(); 252 moduleConfigure->show();
254 return; 253 return;
255 } 254 }
256 } 255 }
257 256
258 InterfaceSetupImp *configure = new InterfaceSetupImp(0, "InterfaceSetupImp", i, true); 257 InterfaceSetupImp *configure = new InterfaceSetupImp(0, "InterfaceSetupImp", i, false, Qt::WDestructiveClose);
259 configure->setProfile(currentProfile); 258 configure->setProfile(currentProfile);
260 configure->showMaximized(); 259 configure->showMaximized();
261 configure->show(); 260 configure->show();
262} 261}
263 262
264/** 263/**