summaryrefslogtreecommitdiff
Unidiff
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(){
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();
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 @@
1#include "wlanmodule.h" 1#include "wlanmodule.h"
2#include <qpe/config.h>
3#include "wlanimp.h" 2#include "wlanimp.h"
4#include "info.h" 3#include "info.h"
5 4
6
7#include <arpa/inet.h> 5#include <arpa/inet.h>
8#include <sys/socket.h> 6#include <sys/socket.h>
9#include <linux/if_ether.h> 7#include <linux/if_ether.h>
10#include <netinet/ip.h> 8#include <netinet/ip.h>
@@ -62,9 +60,9 @@ bool WLANModule::isOwner(Interface *i){
62 * @param tabWidget a pointer to the tab widget that this configure has. 60 * @param tabWidget a pointer to the tab widget that this configure has.
63 * @return QWidget* pointer to the tab widget in this modules configure. 61 * @return QWidget* pointer to the tab widget in this modules configure.
64 */ 62 */
65QWidget *WLANModule::configure(Interface *i, QTabWidget **tabWidget){ 63QWidget *WLANModule::configure(Interface *i, QTabWidget **tabWidget){
66 WLANImp *wlanconfig = new WLANImp( ); 64 WLANImp *wlanconfig = new WLANImp(0, "WlanConfig");
67 (*tabWidget) = wlanconfig->tabWidget; 65 (*tabWidget) = wlanconfig->tabWidget;
68 return wlanconfig; 66 return wlanconfig;
69} 67}
70 68
@@ -73,8 +71,9 @@ QWidget *WLANModule::configure(Interface *i, QTabWidget **tabWidget){
73 * @param tabWidget a pointer to the tab widget that this information has. 71 * @param tabWidget a pointer to the tab widget that this information has.
74 * @return QWidget* pointer to the tab widget in this modules info. 72 * @return QWidget* pointer to the tab widget in this modules info.
75 */ 73 */
76QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){ 74QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){
75 return NULL;
77 WlanInfo *info = new WlanInfo(0, "wireless info"); 76 WlanInfo *info = new WlanInfo(0, "wireless info");
78 (*tabWidget) = info->tabWidget; 77 (*tabWidget) = info->tabWidget;
79 78
80 struct ifreq ifr; 79 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(){
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();
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 @@
1#include "wlanmodule.h" 1#include "wlanmodule.h"
2#include <qpe/config.h>
3#include "wlanimp.h" 2#include "wlanimp.h"
4#include "info.h" 3#include "info.h"
5 4
6
7#include <arpa/inet.h> 5#include <arpa/inet.h>
8#include <sys/socket.h> 6#include <sys/socket.h>
9#include <linux/if_ether.h> 7#include <linux/if_ether.h>
10#include <netinet/ip.h> 8#include <netinet/ip.h>
@@ -62,9 +60,9 @@ bool WLANModule::isOwner(Interface *i){
62 * @param tabWidget a pointer to the tab widget that this configure has. 60 * @param tabWidget a pointer to the tab widget that this configure has.
63 * @return QWidget* pointer to the tab widget in this modules configure. 61 * @return QWidget* pointer to the tab widget in this modules configure.
64 */ 62 */
65QWidget *WLANModule::configure(Interface *i, QTabWidget **tabWidget){ 63QWidget *WLANModule::configure(Interface *i, QTabWidget **tabWidget){
66 WLANImp *wlanconfig = new WLANImp( ); 64 WLANImp *wlanconfig = new WLANImp(0, "WlanConfig");
67 (*tabWidget) = wlanconfig->tabWidget; 65 (*tabWidget) = wlanconfig->tabWidget;
68 return wlanconfig; 66 return wlanconfig;
69} 67}
70 68
@@ -73,8 +71,9 @@ QWidget *WLANModule::configure(Interface *i, QTabWidget **tabWidget){
73 * @param tabWidget a pointer to the tab widget that this information has. 71 * @param tabWidget a pointer to the tab widget that this information has.
74 * @return QWidget* pointer to the tab widget in this modules info. 72 * @return QWidget* pointer to the tab widget in this modules info.
75 */ 73 */
76QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){ 74QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){
75 return NULL;
77 WlanInfo *info = new WlanInfo(0, "wireless info"); 76 WlanInfo *info = new WlanInfo(0, "wireless info");
78 (*tabWidget) = info->tabWidget; 77 (*tabWidget) = info->tabWidget;
79 78
80 struct ifreq ifr; 79 struct ifreq ifr;