summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/networksetup/mainwindowimp.cpp7
-rw-r--r--noncore/net/networksetup/wlan/wlanmodule.cpp5
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp7
-rw-r--r--noncore/settings/networksettings/wlan/wlanmodule.cpp5
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
@@ -82,8 +82,15 @@ MainWindowImp::~MainWindowImp(){
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();
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,10 +1,8 @@
#include "wlanmodule.h"
-#include <qpe/config.h>
#include "wlanimp.h"
#include "info.h"
-
#include <arpa/inet.h>
#include <sys/socket.h>
#include <linux/if_ether.h>
#include <netinet/ip.h>
@@ -62,9 +60,9 @@ bool WLANModule::isOwner(Interface *i){
* @param tabWidget a pointer to the tab widget that this configure has.
* @return QWidget* pointer to the tab widget in this modules configure.
*/
QWidget *WLANModule::configure(Interface *i, QTabWidget **tabWidget){
- WLANImp *wlanconfig = new WLANImp( );
+ WLANImp *wlanconfig = new WLANImp(0, "WlanConfig");
(*tabWidget) = wlanconfig->tabWidget;
return wlanconfig;
}
@@ -73,8 +71,9 @@ QWidget *WLANModule::configure(Interface *i, QTabWidget **tabWidget){
* @param tabWidget a pointer to the tab widget that this information has.
* @return QWidget* pointer to the tab widget in this modules info.
*/
QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){
+ return NULL;
WlanInfo *info = new WlanInfo(0, "wireless info");
(*tabWidget) = info->tabWidget;
struct ifreq ifr;
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
@@ -82,8 +82,15 @@ MainWindowImp::~MainWindowImp(){
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();
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,10 +1,8 @@
#include "wlanmodule.h"
-#include <qpe/config.h>
#include "wlanimp.h"
#include "info.h"
-
#include <arpa/inet.h>
#include <sys/socket.h>
#include <linux/if_ether.h>
#include <netinet/ip.h>
@@ -62,9 +60,9 @@ bool WLANModule::isOwner(Interface *i){
* @param tabWidget a pointer to the tab widget that this configure has.
* @return QWidget* pointer to the tab widget in this modules configure.
*/
QWidget *WLANModule::configure(Interface *i, QTabWidget **tabWidget){
- WLANImp *wlanconfig = new WLANImp( );
+ WLANImp *wlanconfig = new WLANImp(0, "WlanConfig");
(*tabWidget) = wlanconfig->tabWidget;
return wlanconfig;
}
@@ -73,8 +71,9 @@ QWidget *WLANModule::configure(Interface *i, QTabWidget **tabWidget){
* @param tabWidget a pointer to the tab widget that this information has.
* @return QWidget* pointer to the tab widget in this modules info.
*/
QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){
+ return NULL;
WlanInfo *info = new WlanInfo(0, "wireless info");
(*tabWidget) = info->tabWidget;
struct ifreq ifr;