author | benmeyer <benmeyer> | 2002-10-21 15:59:21 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-21 15:59:21 (UTC) |
commit | bb135a644e61cbc30116b96ff8fb24dfb7576a21 (patch) (side-by-side diff) | |
tree | 5b3114322ba7f552512925e3247f77588d53bbbb | |
parent | d9ddcd0eb7608321eb2b94ad427868948ea627c2 (diff) | |
download | opie-bb135a644e61cbc30116b96ff8fb24dfb7576a21.zip opie-bb135a644e61cbc30116b96ff8fb24dfb7576a21.tar.gz opie-bb135a644e61cbc30116b96ff8fb24dfb7576a21.tar.bz2 |
Some deletion coverage
-rw-r--r-- | noncore/net/networksetup/mainwindowimp.cpp | 7 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlanmodule.cpp | 5 | ||||
-rw-r--r-- | noncore/settings/networksettings/mainwindowimp.cpp | 7 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanmodule.cpp | 5 |
4 files changed, 18 insertions, 6 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 @@ -85,2 +85,9 @@ MainWindowImp::~MainWindowImp(){ + // 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
diff --git a/noncore/net/networksetup/wlan/wlanmodule.cpp b/noncore/net/networksetup/wlan/wlanmodule.cpp index cbb520d..24cb1cd 100644 --- a/noncore/net/networksetup/wlan/wlanmodule.cpp +++ b/noncore/net/networksetup/wlan/wlanmodule.cpp @@ -1,3 +1,2 @@ #include "wlanmodule.h" -#include <qpe/config.h> #include "wlanimp.h" @@ -5,3 +4,2 @@ - #include <arpa/inet.h> @@ -65,3 +63,3 @@ bool WLANModule::isOwner(Interface *i){ QWidget *WLANModule::configure(Interface *i, QTabWidget **tabWidget){ - WLANImp *wlanconfig = new WLANImp( ); + WLANImp *wlanconfig = new WLANImp(0, "WlanConfig"); (*tabWidget) = wlanconfig->tabWidget; @@ -76,2 +74,3 @@ QWidget *WLANModule::configure(Interface *i, QTabWidget **tabWidget){ QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){ + return NULL; WlanInfo *info = new WlanInfo(0, "wireless info"); 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 @@ -85,2 +85,9 @@ MainWindowImp::~MainWindowImp(){ + // 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
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp index cbb520d..24cb1cd 100644 --- a/noncore/settings/networksettings/wlan/wlanmodule.cpp +++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp @@ -1,3 +1,2 @@ #include "wlanmodule.h" -#include <qpe/config.h> #include "wlanimp.h" @@ -5,3 +4,2 @@ - #include <arpa/inet.h> @@ -65,3 +63,3 @@ bool WLANModule::isOwner(Interface *i){ QWidget *WLANModule::configure(Interface *i, QTabWidget **tabWidget){ - WLANImp *wlanconfig = new WLANImp( ); + WLANImp *wlanconfig = new WLANImp(0, "WlanConfig"); (*tabWidget) = wlanconfig->tabWidget; @@ -76,2 +74,3 @@ QWidget *WLANModule::configure(Interface *i, QTabWidget **tabWidget){ QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){ + return NULL; WlanInfo *info = new WlanInfo(0, "wireless info"); |