Diffstat (limited to 'noncore/settings/networksettings/mainwindowimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/mainwindowimp.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index 843f630..9d81ab1 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp | |||
@@ -78,16 +78,23 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par | |||
78 | * Deconstructor. Save profiles. Delete loaded libraries. | 78 | * Deconstructor. Save profiles. Delete loaded libraries. |
79 | */ | 79 | */ |
80 | MainWindowImp::~MainWindowImp(){ | 80 | MainWindowImp::~MainWindowImp(){ |
81 | // Save profiles. | 81 | // Save profiles. |
82 | Config cfg("NetworkSetup"); | 82 | Config cfg("NetworkSetup"); |
83 | cfg.setGroup("General"); | 83 | cfg.setGroup("General"); |
84 | cfg.writeEntry("Profiles", profiles.join(" ")); | 84 | cfg.writeEntry("Profiles", profiles.join(" ")); |
85 | 85 | ||
86 | // Delete all interfaces that don't have owners. | ||
87 | QMap<Interface*, QListViewItem*>::Iterator iIt; | ||
88 | for( iIt = items.begin(); iIt != items.end(); ++iIt ){ | ||
89 | if(iIt.key()->getModuleOwner() == NULL) | ||
90 | delete iIt.key(); | ||
91 | } | ||
92 | |||
86 | // Delete Modules and Libraries | 93 | // Delete Modules and Libraries |
87 | QMap<Module*, QLibrary*>::Iterator it; | 94 | QMap<Module*, QLibrary*>::Iterator it; |
88 | for( it = libraries.begin(); it != libraries.end(); ++it ){ | 95 | for( it = libraries.begin(); it != libraries.end(); ++it ){ |
89 | delete it.key(); | 96 | delete it.key(); |
90 | delete it.data(); | 97 | delete it.data(); |
91 | } | 98 | } |
92 | } | 99 | } |
93 | 100 | ||