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.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index 9d81ab1..c86acdc 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -69,42 +69,44 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par
69 currentProfileLabel->setText(line); 69 currentProfileLabel->setText(line);
70 break; 70 break;
71 } 71 }
72 } 72 }
73 file.close(); 73 file.close();
74 } 74 }
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 // Save profiles. 82 // Save profiles.
82 Config cfg("NetworkSetup"); 83 Config cfg("NetworkSetup");
83 cfg.setGroup("General"); 84 cfg.setGroup("General");
84 cfg.writeEntry("Profiles", profiles.join(" ")); 85 cfg.writeEntry("Profiles", profiles.join(" "));
85 86
86 // Delete all interfaces that don't have owners. 87 // Delete all interfaces that don't have owners.
87 QMap<Interface*, QListViewItem*>::Iterator iIt; 88 QMap<Interface*, QListViewItem*>::Iterator iIt;
88 for( iIt = items.begin(); iIt != items.end(); ++iIt ){ 89 for( iIt = items.begin(); iIt != items.end(); ++iIt ){
89 if(iIt.key()->getModuleOwner() == NULL) 90 if(iIt.key()->getModuleOwner() == NULL)
90 delete iIt.key(); 91 delete iIt.key();
91 } 92 }
92 93
93 // Delete Modules and Libraries 94 // Delete Modules and Libraries
94 QMap<Module*, QLibrary*>::Iterator it; 95 QMap<Module*, QLibrary*>::Iterator it;
95 for( it = libraries.begin(); it != libraries.end(); ++it ){ 96 for( it = libraries.begin(); it != libraries.end(); ++it ){
96 delete it.key(); 97 delete it.key();
97 delete it.data(); 98 delete it.data();
98 } 99 }
100 qDebug("done Saving mainwindow");
99} 101}
100 102
101/** 103/**
102 * Load all modules that are found in the path 104 * Load all modules that are found in the path
103 * @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
104 * and attempts to load them 106 * and attempts to load them
105 */ 107 */
106void MainWindowImp::loadModules(QString path){ 108void MainWindowImp::loadModules(QString path){
107 //qDebug(path.latin1()); 109 //qDebug(path.latin1());
108 QDir d(path); 110 QDir d(path);
109 if(!d.exists()) 111 if(!d.exists())
110 return; 112 return;