summaryrefslogtreecommitdiff
path: root/noncore/net/networksetup/mainwindowimp.cpp
authorbenmeyer <benmeyer>2002-10-21 15:59:21 (UTC)
committer benmeyer <benmeyer>2002-10-21 15:59:21 (UTC)
commitbb135a644e61cbc30116b96ff8fb24dfb7576a21 (patch) (side-by-side diff)
tree5b3114322ba7f552512925e3247f77588d53bbbb /noncore/net/networksetup/mainwindowimp.cpp
parentd9ddcd0eb7608321eb2b94ad427868948ea627c2 (diff)
downloadopie-bb135a644e61cbc30116b96ff8fb24dfb7576a21.zip
opie-bb135a644e61cbc30116b96ff8fb24dfb7576a21.tar.gz
opie-bb135a644e61cbc30116b96ff8fb24dfb7576a21.tar.bz2
Some deletion coverage
Diffstat (limited to 'noncore/net/networksetup/mainwindowimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/networksetup/mainwindowimp.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp
index 843f630..9d81ab1 100644
--- a/noncore/net/networksetup/mainwindowimp.cpp
+++ b/noncore/net/networksetup/mainwindowimp.cpp
@@ -80,12 +80,19 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par
MainWindowImp::~MainWindowImp(){
// Save profiles.
Config cfg("NetworkSetup");
cfg.setGroup("General");
cfg.writeEntry("Profiles", profiles.join(" "));
+ // Delete all interfaces that don't have owners.
+ QMap<Interface*, QListViewItem*>::Iterator iIt;
+ for( iIt = items.begin(); iIt != items.end(); ++iIt ){
+ if(iIt.key()->getModuleOwner() == NULL)
+ delete iIt.key();
+ }
+
// Delete Modules and Libraries
QMap<Module*, QLibrary*>::Iterator it;
for( it = libraries.begin(); it != libraries.end(); ++it ){
delete it.key();
delete it.data();
}