From bb135a644e61cbc30116b96ff8fb24dfb7576a21 Mon Sep 17 00:00:00 2001 From: benmeyer Date: Mon, 21 Oct 2002 15:59:21 +0000 Subject: Some deletion coverage --- (limited to 'noncore/settings/networksettings/mainwindowimp.cpp') 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 @@ -83,6 +83,13 @@ MainWindowImp::~MainWindowImp(){ cfg.setGroup("General"); cfg.writeEntry("Profiles", profiles.join(" ")); + // Delete all interfaces that don't have owners. + QMap::Iterator iIt; + for( iIt = items.begin(); iIt != items.end(); ++iIt ){ + if(iIt.key()->getModuleOwner() == NULL) + delete iIt.key(); + } + // Delete Modules and Libraries QMap::Iterator it; for( it = libraries.begin(); it != libraries.end(); ++it ){ -- cgit v0.9.0.2