summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/networksetup/mainwindowimp.cpp3
-rw-r--r--noncore/net/networksetup/wlan/wlanmodule.cpp1
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp3
-rw-r--r--noncore/settings/networksettings/wlan/wlanmodule.cpp1
4 files changed, 2 insertions, 6 deletions
diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp
index 4a088cb..f9ca83b 100644
--- a/noncore/net/networksetup/mainwindowimp.cpp
+++ b/noncore/net/networksetup/mainwindowimp.cpp
@@ -33,116 +33,115 @@
33#define TEMP_UP "/tmp/ifconfig" 33#define TEMP_UP "/tmp/ifconfig"
34 34
35#define DEFAULT_SCHEME "/var/lib/pcmcia/scheme" 35#define DEFAULT_SCHEME "/var/lib/pcmcia/scheme"
36 36
37MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name, true), advancedUserMode(false){ 37MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name, true), advancedUserMode(false){
38 connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked())); 38 connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked()));
39 connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked())); 39 connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked()));
40 connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked())); 40 connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked()));
41 connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked())); 41 connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked()));
42 42
43 connect(newProfileButton, SIGNAL(clicked()), this, SLOT(addProfile())); 43 connect(newProfileButton, SIGNAL(clicked()), this, SLOT(addProfile()));
44 connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile())); 44 connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile()));
45 connect(setCurrentProfileButton, SIGNAL(clicked()), this, SLOT(changeProfile())); 45 connect(setCurrentProfileButton, SIGNAL(clicked()), this, SLOT(changeProfile()));
46 46
47 connect(newProfile, SIGNAL(textChanged(const QString&)), this, SLOT(newProfileChanged(const QString&))); 47 connect(newProfile, SIGNAL(textChanged(const QString&)), this, SLOT(newProfileChanged(const QString&)));
48 // Load connections. 48 // Load connections.
49 loadModules(QPEApplication::qpeDir() + "/plugins/networksetup"); 49 loadModules(QPEApplication::qpeDir() + "/plugins/networksetup");
50 getInterfaceList(); 50 getInterfaceList();
51 connectionList->header()->hide(); 51 connectionList->header()->hide();
52 52
53 53
54 Config cfg("NetworkSetup"); 54 Config cfg("NetworkSetup");
55 profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All")); 55 profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All"));
56 for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it) 56 for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it)
57 profilesList->insertItem((*it)); 57 profilesList->insertItem((*it));
58 currentProfileLabel->setText(cfg.readEntry("CurrentProfile", "All")); 58 currentProfileLabel->setText(cfg.readEntry("CurrentProfile", "All"));
59 advancedUserMode = cfg.readBoolEntry("AdvancedUserMode", false); 59 advancedUserMode = cfg.readBoolEntry("AdvancedUserMode", false);
60 scheme = cfg.readEntry("SchemeFile", DEFAULT_SCHEME); 60 scheme = cfg.readEntry("SchemeFile", DEFAULT_SCHEME);
61 61
62 QFile file(scheme); 62 QFile file(scheme);
63 if ( file.open(IO_ReadOnly) ) { // file opened successfully 63 if ( file.open(IO_ReadOnly) ) { // file opened successfully
64 QTextStream stream( &file ); // use a text stream 64 QTextStream stream( &file ); // use a text stream
65 while ( !stream.eof() ) { // until end of file... 65 while ( !stream.eof() ) { // until end of file...
66 QString line = stream.readLine(); // line of text excluding '\n' 66 QString line = stream.readLine(); // line of text excluding '\n'
67 if(line.contains("SCHEME")){ 67 if(line.contains("SCHEME")){
68 line = line.mid(7, line.length()); 68 line = line.mid(7, line.length());
69 currentProfileLabel->setText(line); 69 currentProfileLabel->setText(line);
70 break; 70 break;
71 } 71 }
72 } 72 }
73 file.close(); 73 file.close();
74 } 74 }
75} 75}
76 76
77/** 77/**
78 * Deconstructor. Save profiles. Delete loaded libraries. 78 * Deconstructor. Save profiles. Delete loaded libraries.
79 */ 79 */
80MainWindowImp::~MainWindowImp(){ 80MainWindowImp::~MainWindowImp(){
81 qDebug("Deleting main window");
82 // Save profiles. 81 // Save profiles.
83 Config cfg("NetworkSetup"); 82 Config cfg("NetworkSetup");
84 cfg.setGroup("General"); 83 cfg.setGroup("General");
85 cfg.writeEntry("Profiles", profiles.join(" ")); 84 cfg.writeEntry("Profiles", profiles.join(" "));
86 85
87 // Delete all interfaces that don't have owners. 86 // Delete all interfaces that don't have owners.
88 QMap<Interface*, QListViewItem*>::Iterator iIt; 87 QMap<Interface*, QListViewItem*>::Iterator iIt;
89 for( iIt = items.begin(); iIt != items.end(); ++iIt ){ 88 for( iIt = items.begin(); iIt != items.end(); ++iIt ){
90 if(iIt.key()->getModuleOwner() == NULL) 89 if(iIt.key()->getModuleOwner() == NULL)
91 delete iIt.key(); 90 delete iIt.key();
92 } 91 }
93 92
94 // Delete Modules and Libraries 93 // Delete Modules and Libraries
95 QMap<Module*, QLibrary*>::Iterator it; 94 QMap<Module*, QLibrary*>::Iterator it;
96 for( it = libraries.begin(); it != libraries.end(); ++it ){ 95 for( it = libraries.begin(); it != libraries.end(); ++it ){
97 delete it.key(); 96 delete it.key();
97 // I wonder why I can't delete the libraries
98 //delete it.data(); 98 //delete it.data();
99 } 99 }
100 qDebug("Done deleting main window");
101} 100}
102 101
103/** 102/**
104 * Load all modules that are found in the path 103 * Load all modules that are found in the path
105 * @param path a directory that is scaned for any plugins that can be loaded 104 * @param path a directory that is scaned for any plugins that can be loaded
106 * and attempts to load them 105 * and attempts to load them
107 */ 106 */
108void MainWindowImp::loadModules(QString path){ 107void MainWindowImp::loadModules(QString path){
109 //qDebug(path.latin1()); 108 //qDebug(path.latin1());
110 QDir d(path); 109 QDir d(path);
111 if(!d.exists()) 110 if(!d.exists())
112 return; 111 return;
113 112
114 // Don't want sym links 113 // Don't want sym links
115 d.setFilter( QDir::Files | QDir::NoSymLinks ); 114 d.setFilter( QDir::Files | QDir::NoSymLinks );
116 const QFileInfoList *list = d.entryInfoList(); 115 const QFileInfoList *list = d.entryInfoList();
117 QFileInfoListIterator it( *list ); 116 QFileInfoListIterator it( *list );
118 QFileInfo *fi; 117 QFileInfo *fi;
119 while ( (fi=it.current()) ) { 118 while ( (fi=it.current()) ) {
120 if(fi->fileName().contains(".so")){ 119 if(fi->fileName().contains(".so")){
121 loadPlugin(path + "/" + fi->fileName()); 120 loadPlugin(path + "/" + fi->fileName());
122 } 121 }
123 ++it; 122 ++it;
124 } 123 }
125} 124}
126 125
127/** 126/**
128 * Attempt to load a function and resolve a function. 127 * Attempt to load a function and resolve a function.
129 * @param pluginFileName - the name of the file in which to attempt to load 128 * @param pluginFileName - the name of the file in which to attempt to load
130 * @param resolveString - function pointer to resolve 129 * @param resolveString - function pointer to resolve
131 * @return pointer to the function with name resolveString or NULL 130 * @return pointer to the function with name resolveString or NULL
132 */ 131 */
133Module* MainWindowImp::loadPlugin(QString pluginFileName, QString resolveString){ 132Module* MainWindowImp::loadPlugin(QString pluginFileName, QString resolveString){
134 //qDebug(QString("MainWindowImp::loadPlugin: %1").arg(pluginFileName).latin1()); 133 //qDebug(QString("MainWindowImp::loadPlugin: %1").arg(pluginFileName).latin1());
135 QLibrary *lib = new QLibrary(pluginFileName); 134 QLibrary *lib = new QLibrary(pluginFileName);
136 void *functionPointer = lib->resolve(resolveString); 135 void *functionPointer = lib->resolve(resolveString);
137 if( !functionPointer ){ 136 if( !functionPointer ){
138 qDebug(QString("MainWindowImp: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1()); 137 qDebug(QString("MainWindowImp: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1());
139 delete lib; 138 delete lib;
140 return NULL; 139 return NULL;
141 } 140 }
142 141
143 // Try to get an object. 142 // Try to get an object.
144 Module *object = ((Module* (*)()) functionPointer)(); 143 Module *object = ((Module* (*)()) functionPointer)();
145 if(object == NULL){ 144 if(object == NULL){
146 qDebug("MainWindowImp: Couldn't create object, but did load library!"); 145 qDebug("MainWindowImp: Couldn't create object, but did load library!");
147 delete lib; 146 delete lib;
148 return NULL; 147 return NULL;
diff --git a/noncore/net/networksetup/wlan/wlanmodule.cpp b/noncore/net/networksetup/wlan/wlanmodule.cpp
index 3363b8a..bf2589e 100644
--- a/noncore/net/networksetup/wlan/wlanmodule.cpp
+++ b/noncore/net/networksetup/wlan/wlanmodule.cpp
@@ -1,66 +1,65 @@
1#include "wlanmodule.h" 1#include "wlanmodule.h"
2#include "wlanimp.h" 2#include "wlanimp.h"
3#include "info.h" 3#include "info.h"
4#include "wextensions.h" 4#include "wextensions.h"
5 5
6#include <qlabel.h> 6#include <qlabel.h>
7#include <qprogressbar.h> 7#include <qprogressbar.h>
8 8
9/** 9/**
10 * Constructor, find all of the possible interfaces 10 * Constructor, find all of the possible interfaces
11 */ 11 */
12WLANModule::WLANModule() : Module() { 12WLANModule::WLANModule() : Module() {
13} 13}
14 14
15/** 15/**
16 */ 16 */
17WLANModule::~WLANModule(){ 17WLANModule::~WLANModule(){
18 qDebug("Deleting module");
19 Interface *i; 18 Interface *i;
20 for ( i=list.first(); i != 0; i=list.next() ) 19 for ( i=list.first(); i != 0; i=list.next() )
21 delete i; 20 delete i;
22} 21}
23 22
24/** 23/**
25 * Change the current profile 24 * Change the current profile
26 */ 25 */
27void WLANModule::setProfile(QString newProfile){ 26void WLANModule::setProfile(QString newProfile){
28 profile = newProfile; 27 profile = newProfile;
29} 28}
30 29
31/** 30/**
32 * get the icon name for this device. 31 * get the icon name for this device.
33 * @param Interface* can be used in determining the icon. 32 * @param Interface* can be used in determining the icon.
34 * @return QString the icon name (minus .png, .gif etc) 33 * @return QString the icon name (minus .png, .gif etc)
35 */ 34 */
36QString WLANModule::getPixmapName(Interface* ){ 35QString WLANModule::getPixmapName(Interface* ){
37 return "wlan"; 36 return "wlan";
38} 37}
39 38
40/** 39/**
41 * Check to see if the interface i is owned by this module. 40 * Check to see if the interface i is owned by this module.
42 * @param Interface* interface to check against 41 * @param Interface* interface to check against
43 * @return bool true if i is owned by this module, false otherwise. 42 * @return bool true if i is owned by this module, false otherwise.
44 */ 43 */
45bool WLANModule::isOwner(Interface *i){ 44bool WLANModule::isOwner(Interface *i){
46 WExtensions we(i->getInterfaceName()); 45 WExtensions we(i->getInterfaceName());
47 if(!we.doesHaveWirelessExtensions()) 46 if(!we.doesHaveWirelessExtensions())
48 return false; 47 return false;
49 48
50 i->setHardwareName("802.11b"); 49 i->setHardwareName("802.11b");
51 list.append(i); 50 list.append(i);
52 return true; 51 return true;
53} 52}
54 53
55/** 54/**
56 * Create, set tabWiget and return the WLANConfigure Module 55 * Create, set tabWiget and return the WLANConfigure Module
57 * @param tabWidget a pointer to the tab widget that this configure has. 56 * @param tabWidget a pointer to the tab widget that this configure has.
58 * @return QWidget* pointer to the tab widget in this modules configure. 57 * @return QWidget* pointer to the tab widget in this modules configure.
59 */ 58 */
60QWidget *WLANModule::configure(Interface *, QTabWidget **tabWidget){ 59QWidget *WLANModule::configure(Interface *, QTabWidget **tabWidget){
61 WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", false, Qt::WDestructiveClose); 60 WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", false, Qt::WDestructiveClose);
62 (*tabWidget) = wlanconfig->tabWidget; 61 (*tabWidget) = wlanconfig->tabWidget;
63 return wlanconfig; 62 return wlanconfig;
64} 63}
65 64
66/** 65/**
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index 4a088cb..f9ca83b 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -33,116 +33,115 @@
33#define TEMP_UP "/tmp/ifconfig" 33#define TEMP_UP "/tmp/ifconfig"
34 34
35#define DEFAULT_SCHEME "/var/lib/pcmcia/scheme" 35#define DEFAULT_SCHEME "/var/lib/pcmcia/scheme"
36 36
37MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name, true), advancedUserMode(false){ 37MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name, true), advancedUserMode(false){
38 connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked())); 38 connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked()));
39 connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked())); 39 connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked()));
40 connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked())); 40 connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked()));
41 connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked())); 41 connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked()));
42 42
43 connect(newProfileButton, SIGNAL(clicked()), this, SLOT(addProfile())); 43 connect(newProfileButton, SIGNAL(clicked()), this, SLOT(addProfile()));
44 connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile())); 44 connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile()));
45 connect(setCurrentProfileButton, SIGNAL(clicked()), this, SLOT(changeProfile())); 45 connect(setCurrentProfileButton, SIGNAL(clicked()), this, SLOT(changeProfile()));
46 46
47 connect(newProfile, SIGNAL(textChanged(const QString&)), this, SLOT(newProfileChanged(const QString&))); 47 connect(newProfile, SIGNAL(textChanged(const QString&)), this, SLOT(newProfileChanged(const QString&)));
48 // Load connections. 48 // Load connections.
49 loadModules(QPEApplication::qpeDir() + "/plugins/networksetup"); 49 loadModules(QPEApplication::qpeDir() + "/plugins/networksetup");
50 getInterfaceList(); 50 getInterfaceList();
51 connectionList->header()->hide(); 51 connectionList->header()->hide();
52 52
53 53
54 Config cfg("NetworkSetup"); 54 Config cfg("NetworkSetup");
55 profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All")); 55 profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All"));
56 for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it) 56 for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it)
57 profilesList->insertItem((*it)); 57 profilesList->insertItem((*it));
58 currentProfileLabel->setText(cfg.readEntry("CurrentProfile", "All")); 58 currentProfileLabel->setText(cfg.readEntry("CurrentProfile", "All"));
59 advancedUserMode = cfg.readBoolEntry("AdvancedUserMode", false); 59 advancedUserMode = cfg.readBoolEntry("AdvancedUserMode", false);
60 scheme = cfg.readEntry("SchemeFile", DEFAULT_SCHEME); 60 scheme = cfg.readEntry("SchemeFile", DEFAULT_SCHEME);
61 61
62 QFile file(scheme); 62 QFile file(scheme);
63 if ( file.open(IO_ReadOnly) ) { // file opened successfully 63 if ( file.open(IO_ReadOnly) ) { // file opened successfully
64 QTextStream stream( &file ); // use a text stream 64 QTextStream stream( &file ); // use a text stream
65 while ( !stream.eof() ) { // until end of file... 65 while ( !stream.eof() ) { // until end of file...
66 QString line = stream.readLine(); // line of text excluding '\n' 66 QString line = stream.readLine(); // line of text excluding '\n'
67 if(line.contains("SCHEME")){ 67 if(line.contains("SCHEME")){
68 line = line.mid(7, line.length()); 68 line = line.mid(7, line.length());
69 currentProfileLabel->setText(line); 69 currentProfileLabel->setText(line);
70 break; 70 break;
71 } 71 }
72 } 72 }
73 file.close(); 73 file.close();
74 } 74 }
75} 75}
76 76
77/** 77/**
78 * Deconstructor. Save profiles. Delete loaded libraries. 78 * Deconstructor. Save profiles. Delete loaded libraries.
79 */ 79 */
80MainWindowImp::~MainWindowImp(){ 80MainWindowImp::~MainWindowImp(){
81 qDebug("Deleting main window");
82 // Save profiles. 81 // Save profiles.
83 Config cfg("NetworkSetup"); 82 Config cfg("NetworkSetup");
84 cfg.setGroup("General"); 83 cfg.setGroup("General");
85 cfg.writeEntry("Profiles", profiles.join(" ")); 84 cfg.writeEntry("Profiles", profiles.join(" "));
86 85
87 // Delete all interfaces that don't have owners. 86 // Delete all interfaces that don't have owners.
88 QMap<Interface*, QListViewItem*>::Iterator iIt; 87 QMap<Interface*, QListViewItem*>::Iterator iIt;
89 for( iIt = items.begin(); iIt != items.end(); ++iIt ){ 88 for( iIt = items.begin(); iIt != items.end(); ++iIt ){
90 if(iIt.key()->getModuleOwner() == NULL) 89 if(iIt.key()->getModuleOwner() == NULL)
91 delete iIt.key(); 90 delete iIt.key();
92 } 91 }
93 92
94 // Delete Modules and Libraries 93 // Delete Modules and Libraries
95 QMap<Module*, QLibrary*>::Iterator it; 94 QMap<Module*, QLibrary*>::Iterator it;
96 for( it = libraries.begin(); it != libraries.end(); ++it ){ 95 for( it = libraries.begin(); it != libraries.end(); ++it ){
97 delete it.key(); 96 delete it.key();
97 // I wonder why I can't delete the libraries
98 //delete it.data(); 98 //delete it.data();
99 } 99 }
100 qDebug("Done deleting main window");
101} 100}
102 101
103/** 102/**
104 * Load all modules that are found in the path 103 * Load all modules that are found in the path
105 * @param path a directory that is scaned for any plugins that can be loaded 104 * @param path a directory that is scaned for any plugins that can be loaded
106 * and attempts to load them 105 * and attempts to load them
107 */ 106 */
108void MainWindowImp::loadModules(QString path){ 107void MainWindowImp::loadModules(QString path){
109 //qDebug(path.latin1()); 108 //qDebug(path.latin1());
110 QDir d(path); 109 QDir d(path);
111 if(!d.exists()) 110 if(!d.exists())
112 return; 111 return;
113 112
114 // Don't want sym links 113 // Don't want sym links
115 d.setFilter( QDir::Files | QDir::NoSymLinks ); 114 d.setFilter( QDir::Files | QDir::NoSymLinks );
116 const QFileInfoList *list = d.entryInfoList(); 115 const QFileInfoList *list = d.entryInfoList();
117 QFileInfoListIterator it( *list ); 116 QFileInfoListIterator it( *list );
118 QFileInfo *fi; 117 QFileInfo *fi;
119 while ( (fi=it.current()) ) { 118 while ( (fi=it.current()) ) {
120 if(fi->fileName().contains(".so")){ 119 if(fi->fileName().contains(".so")){
121 loadPlugin(path + "/" + fi->fileName()); 120 loadPlugin(path + "/" + fi->fileName());
122 } 121 }
123 ++it; 122 ++it;
124 } 123 }
125} 124}
126 125
127/** 126/**
128 * Attempt to load a function and resolve a function. 127 * Attempt to load a function and resolve a function.
129 * @param pluginFileName - the name of the file in which to attempt to load 128 * @param pluginFileName - the name of the file in which to attempt to load
130 * @param resolveString - function pointer to resolve 129 * @param resolveString - function pointer to resolve
131 * @return pointer to the function with name resolveString or NULL 130 * @return pointer to the function with name resolveString or NULL
132 */ 131 */
133Module* MainWindowImp::loadPlugin(QString pluginFileName, QString resolveString){ 132Module* MainWindowImp::loadPlugin(QString pluginFileName, QString resolveString){
134 //qDebug(QString("MainWindowImp::loadPlugin: %1").arg(pluginFileName).latin1()); 133 //qDebug(QString("MainWindowImp::loadPlugin: %1").arg(pluginFileName).latin1());
135 QLibrary *lib = new QLibrary(pluginFileName); 134 QLibrary *lib = new QLibrary(pluginFileName);
136 void *functionPointer = lib->resolve(resolveString); 135 void *functionPointer = lib->resolve(resolveString);
137 if( !functionPointer ){ 136 if( !functionPointer ){
138 qDebug(QString("MainWindowImp: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1()); 137 qDebug(QString("MainWindowImp: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1());
139 delete lib; 138 delete lib;
140 return NULL; 139 return NULL;
141 } 140 }
142 141
143 // Try to get an object. 142 // Try to get an object.
144 Module *object = ((Module* (*)()) functionPointer)(); 143 Module *object = ((Module* (*)()) functionPointer)();
145 if(object == NULL){ 144 if(object == NULL){
146 qDebug("MainWindowImp: Couldn't create object, but did load library!"); 145 qDebug("MainWindowImp: Couldn't create object, but did load library!");
147 delete lib; 146 delete lib;
148 return NULL; 147 return NULL;
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp
index 3363b8a..bf2589e 100644
--- a/noncore/settings/networksettings/wlan/wlanmodule.cpp
+++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp
@@ -1,66 +1,65 @@
1#include "wlanmodule.h" 1#include "wlanmodule.h"
2#include "wlanimp.h" 2#include "wlanimp.h"
3#include "info.h" 3#include "info.h"
4#include "wextensions.h" 4#include "wextensions.h"
5 5
6#include <qlabel.h> 6#include <qlabel.h>
7#include <qprogressbar.h> 7#include <qprogressbar.h>
8 8
9/** 9/**
10 * Constructor, find all of the possible interfaces 10 * Constructor, find all of the possible interfaces
11 */ 11 */
12WLANModule::WLANModule() : Module() { 12WLANModule::WLANModule() : Module() {
13} 13}
14 14
15/** 15/**
16 */ 16 */
17WLANModule::~WLANModule(){ 17WLANModule::~WLANModule(){
18 qDebug("Deleting module");
19 Interface *i; 18 Interface *i;
20 for ( i=list.first(); i != 0; i=list.next() ) 19 for ( i=list.first(); i != 0; i=list.next() )
21 delete i; 20 delete i;
22} 21}
23 22
24/** 23/**
25 * Change the current profile 24 * Change the current profile
26 */ 25 */
27void WLANModule::setProfile(QString newProfile){ 26void WLANModule::setProfile(QString newProfile){
28 profile = newProfile; 27 profile = newProfile;
29} 28}
30 29
31/** 30/**
32 * get the icon name for this device. 31 * get the icon name for this device.
33 * @param Interface* can be used in determining the icon. 32 * @param Interface* can be used in determining the icon.
34 * @return QString the icon name (minus .png, .gif etc) 33 * @return QString the icon name (minus .png, .gif etc)
35 */ 34 */
36QString WLANModule::getPixmapName(Interface* ){ 35QString WLANModule::getPixmapName(Interface* ){
37 return "wlan"; 36 return "wlan";
38} 37}
39 38
40/** 39/**
41 * Check to see if the interface i is owned by this module. 40 * Check to see if the interface i is owned by this module.
42 * @param Interface* interface to check against 41 * @param Interface* interface to check against
43 * @return bool true if i is owned by this module, false otherwise. 42 * @return bool true if i is owned by this module, false otherwise.
44 */ 43 */
45bool WLANModule::isOwner(Interface *i){ 44bool WLANModule::isOwner(Interface *i){
46 WExtensions we(i->getInterfaceName()); 45 WExtensions we(i->getInterfaceName());
47 if(!we.doesHaveWirelessExtensions()) 46 if(!we.doesHaveWirelessExtensions())
48 return false; 47 return false;
49 48
50 i->setHardwareName("802.11b"); 49 i->setHardwareName("802.11b");
51 list.append(i); 50 list.append(i);
52 return true; 51 return true;
53} 52}
54 53
55/** 54/**
56 * Create, set tabWiget and return the WLANConfigure Module 55 * Create, set tabWiget and return the WLANConfigure Module
57 * @param tabWidget a pointer to the tab widget that this configure has. 56 * @param tabWidget a pointer to the tab widget that this configure has.
58 * @return QWidget* pointer to the tab widget in this modules configure. 57 * @return QWidget* pointer to the tab widget in this modules configure.
59 */ 58 */
60QWidget *WLANModule::configure(Interface *, QTabWidget **tabWidget){ 59QWidget *WLANModule::configure(Interface *, QTabWidget **tabWidget){
61 WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", false, Qt::WDestructiveClose); 60 WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", false, Qt::WDestructiveClose);
62 (*tabWidget) = wlanconfig->tabWidget; 61 (*tabWidget) = wlanconfig->tabWidget;
63 return wlanconfig; 62 return wlanconfig;
64} 63}
65 64
66/** 65/**