author | benmeyer <benmeyer> | 2002-10-21 15:59:21 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-21 15:59:21 (UTC) |
commit | bb135a644e61cbc30116b96ff8fb24dfb7576a21 (patch) (unidiff) | |
tree | 5b3114322ba7f552512925e3247f77588d53bbbb /noncore/settings/networksettings/mainwindowimp.cpp | |
parent | d9ddcd0eb7608321eb2b94ad427868948ea627c2 (diff) | |
download | opie-bb135a644e61cbc30116b96ff8fb24dfb7576a21.zip opie-bb135a644e61cbc30116b96ff8fb24dfb7576a21.tar.gz opie-bb135a644e61cbc30116b96ff8fb24dfb7576a21.tar.bz2 |
Some deletion coverage
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 | |||
@@ -74,24 +74,31 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par | |||
74 | } | 74 | } |
75 | } | 75 | } |
76 | 76 | ||
77 | /** | 77 | /** |
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 | ||
94 | /** | 101 | /** |
95 | * Load all modules that are found in the path | 102 | * Load all modules that are found in the path |
96 | * @param path a directory that is scaned for any plugins that can be loaded | 103 | * @param path a directory that is scaned for any plugins that can be loaded |
97 | * and attempts to load them | 104 | * and attempts to load them |