summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/networksetup/TODO6
-rw-r--r--noncore/net/networksetup/interface.cpp4
-rw-r--r--noncore/net/networksetup/mainwindowimp.cpp2
-rw-r--r--noncore/net/networksetup/wlan/wextensions.cpp2
-rw-r--r--noncore/net/networksetup/wlan/wlanimp.cpp2
-rw-r--r--noncore/net/networksetup/wlan/wlanmodule.cpp20
-rw-r--r--noncore/settings/networksettings/TODO6
-rw-r--r--noncore/settings/networksettings/interface.cpp4
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp2
-rw-r--r--noncore/settings/networksettings/wlan/wextensions.cpp2
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp.cpp2
-rw-r--r--noncore/settings/networksettings/wlan/wlanmodule.cpp20
12 files changed, 36 insertions, 36 deletions
diff --git a/noncore/net/networksetup/TODO b/noncore/net/networksetup/TODO
index 7a71142..d61c510 100644
--- a/noncore/net/networksetup/TODO
+++ b/noncore/net/networksetup/TODO
@@ -1,11 +1,9 @@
WLAN needs to be re-written to not use Config
--remove WLAN Config item
--sub class out the wlan info
--check if an interface supports wireless extensions before config.
+WHERE Is DHCP info stored???
PPP module needs to be written
Write a class that parses /proc and not ifconfig
-Possible other modules: ipsec, bluetooth
+Possible other modules: ipsec, bluetooth, ipchains
diff --git a/noncore/net/networksetup/interface.cpp b/noncore/net/networksetup/interface.cpp
index a84b91f..929b3a1 100644
--- a/noncore/net/networksetup/interface.cpp
+++ b/noncore/net/networksetup/interface.cpp
@@ -5,9 +5,9 @@
#include <qfileinfo.h>
#include <qtextstream.h>
#define IFCONFIG "/sbin/ifconfig"
-#define HDCP_INFO_DIR "/etc/dhcpc"
+#define DHCP_INFO_DIR "/etc/dhcpc"
#include <stdio.h>
#include <stdlib.h>
@@ -170,9 +170,9 @@ bool Interface::refresh(){
leaseObtained = "";
leaseExpires = "";
dhcp = false;
- QString dhcpDirectory(HDCP_INFO_DIR);
+ QString dhcpDirectory(DHCP_INFO_DIR);
QDir d(dhcpDirectory);
if(!d.exists(dhcpDirectory))
dhcpDirectory = "/var/run";
diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp
index 9d81ab1..c86acdc 100644
--- a/noncore/net/networksetup/mainwindowimp.cpp
+++ b/noncore/net/networksetup/mainwindowimp.cpp
@@ -77,8 +77,9 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par
/**
* Deconstructor. Save profiles. Delete loaded libraries.
*/
MainWindowImp::~MainWindowImp(){
+ qDebug("start Saving mainwindow");
// Save profiles.
Config cfg("NetworkSetup");
cfg.setGroup("General");
cfg.writeEntry("Profiles", profiles.join(" "));
@@ -95,8 +96,9 @@ MainWindowImp::~MainWindowImp(){
for( it = libraries.begin(); it != libraries.end(); ++it ){
delete it.key();
delete it.data();
}
+ qDebug("done Saving mainwindow");
}
/**
* Load all modules that are found in the path
diff --git a/noncore/net/networksetup/wlan/wextensions.cpp b/noncore/net/networksetup/wlan/wextensions.cpp
index ef4ba8f..e545bd1 100644
--- a/noncore/net/networksetup/wlan/wextensions.cpp
+++ b/noncore/net/networksetup/wlan/wextensions.cpp
@@ -156,9 +156,9 @@ bool WExtensions::stats(int &signal, int &noise, int &quality){
if ( ( signal > IW_UPPER ) || ( signal < IW_LOWER ) )
qDebug( "WIFIAPPLET: Doh! Strength %d > estimated max!\n", signal );
if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) )
qDebug( "WIFIAPPLET: Doh! Noise %d > estimated max!\n", noise );
- qDebug(QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1());
+ //qDebug(QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1());
signal = ( ( signal-IW_LOWER ) * 100 ) / IW_UPPER;
noise = ( ( noise-IW_LOWER ) * 100 ) / IW_UPPER;
quality = ( quality*100 ) / 92;
return true;
diff --git a/noncore/net/networksetup/wlan/wlanimp.cpp b/noncore/net/networksetup/wlan/wlanimp.cpp
index ea19207..94c7518 100644
--- a/noncore/net/networksetup/wlan/wlanimp.cpp
+++ b/noncore/net/networksetup/wlan/wlanimp.cpp
@@ -15,9 +15,9 @@
#include <qradiobutton.h>
#include <qcheckbox.h>
#include <qregexp.h>
-WLANImp::WLANImp( QWidget* parent, const char* name):WLAN(parent, name){
+WLANImp::WLANImp( QWidget* parent, const char* name):WLAN(parent, name, Qt::WDestructiveClose){
config = new Config("wireless");
readConfig();
}
diff --git a/noncore/net/networksetup/wlan/wlanmodule.cpp b/noncore/net/networksetup/wlan/wlanmodule.cpp
index 73e753c..7507c54 100644
--- a/noncore/net/networksetup/wlan/wlanmodule.cpp
+++ b/noncore/net/networksetup/wlan/wlanmodule.cpp
@@ -9,17 +9,16 @@
/**
* Constructor, find all of the possible interfaces
*/
WLANModule::WLANModule() : Module() {
- // get output from iwconfig
}
/**
*/
WLANModule::~WLANModule(){
Interface *i;
for ( i=list.first(); i != 0; i=list.next() )
- delete i;
+ delete i;
}
/**
* Change the current profile
@@ -46,14 +45,11 @@ bool WLANModule::isOwner(Interface *i){
WExtensions we(i->getInterfaceName());
if(!we.doesHaveWirelessExtensions())
return false;
- //if(i->getInterfaceName() == "eth0" || i->getInterfaceName() == "wlan0"){
- i->setHardwareName("802.11b");
- list.append(i);
- return true;
- //}
- //return false;
+ i->setHardwareName("802.11b");
+ list.append(i);
+ return true;
}
/**
* Create, set tabWiget and return the WLANConfigure Module
@@ -74,10 +70,10 @@ QWidget *WLANModule::configure(Interface *, QTabWidget **tabWidget){
QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){
WExtensions we(i->getInterfaceName());
if(!we.doesHaveWirelessExtensions())
return NULL;
-
- WlanInfo *info = new WlanInfo(0, "wireless info");
+
+ WlanInfo *info = new WlanInfo(0, "wireless info", Qt::WDestructiveClose);
(*tabWidget) = info->tabWidget;
info->essidLabel->setText(we.essid());
info->apLabel->setText(we.ap());
@@ -91,8 +87,12 @@ QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){
info->signalProgressBar->setProgress(signal);
info->noiseProgressBar->setProgress(noise);
info->qualityProgressBar->setProgress(quality);
info->rateLabel->setText(QString("%1 Mb/s").arg(we.rate()));
+ //WlanInfo info (0, "wireless info", true);
+ //info.show();
+ //return NULL;
+
return info;
}
/**
diff --git a/noncore/settings/networksettings/TODO b/noncore/settings/networksettings/TODO
index 7a71142..d61c510 100644
--- a/noncore/settings/networksettings/TODO
+++ b/noncore/settings/networksettings/TODO
@@ -1,11 +1,9 @@
WLAN needs to be re-written to not use Config
--remove WLAN Config item
--sub class out the wlan info
--check if an interface supports wireless extensions before config.
+WHERE Is DHCP info stored???
PPP module needs to be written
Write a class that parses /proc and not ifconfig
-Possible other modules: ipsec, bluetooth
+Possible other modules: ipsec, bluetooth, ipchains
diff --git a/noncore/settings/networksettings/interface.cpp b/noncore/settings/networksettings/interface.cpp
index a84b91f..929b3a1 100644
--- a/noncore/settings/networksettings/interface.cpp
+++ b/noncore/settings/networksettings/interface.cpp
@@ -5,9 +5,9 @@
#include <qfileinfo.h>
#include <qtextstream.h>
#define IFCONFIG "/sbin/ifconfig"
-#define HDCP_INFO_DIR "/etc/dhcpc"
+#define DHCP_INFO_DIR "/etc/dhcpc"
#include <stdio.h>
#include <stdlib.h>
@@ -170,9 +170,9 @@ bool Interface::refresh(){
leaseObtained = "";
leaseExpires = "";
dhcp = false;
- QString dhcpDirectory(HDCP_INFO_DIR);
+ QString dhcpDirectory(DHCP_INFO_DIR);
QDir d(dhcpDirectory);
if(!d.exists(dhcpDirectory))
dhcpDirectory = "/var/run";
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index 9d81ab1..c86acdc 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -77,8 +77,9 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par
/**
* Deconstructor. Save profiles. Delete loaded libraries.
*/
MainWindowImp::~MainWindowImp(){
+ qDebug("start Saving mainwindow");
// Save profiles.
Config cfg("NetworkSetup");
cfg.setGroup("General");
cfg.writeEntry("Profiles", profiles.join(" "));
@@ -95,8 +96,9 @@ MainWindowImp::~MainWindowImp(){
for( it = libraries.begin(); it != libraries.end(); ++it ){
delete it.key();
delete it.data();
}
+ qDebug("done Saving mainwindow");
}
/**
* Load all modules that are found in the path
diff --git a/noncore/settings/networksettings/wlan/wextensions.cpp b/noncore/settings/networksettings/wlan/wextensions.cpp
index ef4ba8f..e545bd1 100644
--- a/noncore/settings/networksettings/wlan/wextensions.cpp
+++ b/noncore/settings/networksettings/wlan/wextensions.cpp
@@ -156,9 +156,9 @@ bool WExtensions::stats(int &signal, int &noise, int &quality){
if ( ( signal > IW_UPPER ) || ( signal < IW_LOWER ) )
qDebug( "WIFIAPPLET: Doh! Strength %d > estimated max!\n", signal );
if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) )
qDebug( "WIFIAPPLET: Doh! Noise %d > estimated max!\n", noise );
- qDebug(QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1());
+ //qDebug(QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1());
signal = ( ( signal-IW_LOWER ) * 100 ) / IW_UPPER;
noise = ( ( noise-IW_LOWER ) * 100 ) / IW_UPPER;
quality = ( quality*100 ) / 92;
return true;
diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp
index ea19207..94c7518 100644
--- a/noncore/settings/networksettings/wlan/wlanimp.cpp
+++ b/noncore/settings/networksettings/wlan/wlanimp.cpp
@@ -15,9 +15,9 @@
#include <qradiobutton.h>
#include <qcheckbox.h>
#include <qregexp.h>
-WLANImp::WLANImp( QWidget* parent, const char* name):WLAN(parent, name){
+WLANImp::WLANImp( QWidget* parent, const char* name):WLAN(parent, name, Qt::WDestructiveClose){
config = new Config("wireless");
readConfig();
}
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp
index 73e753c..7507c54 100644
--- a/noncore/settings/networksettings/wlan/wlanmodule.cpp
+++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp
@@ -9,17 +9,16 @@
/**
* Constructor, find all of the possible interfaces
*/
WLANModule::WLANModule() : Module() {
- // get output from iwconfig
}
/**
*/
WLANModule::~WLANModule(){
Interface *i;
for ( i=list.first(); i != 0; i=list.next() )
- delete i;
+ delete i;
}
/**
* Change the current profile
@@ -46,14 +45,11 @@ bool WLANModule::isOwner(Interface *i){
WExtensions we(i->getInterfaceName());
if(!we.doesHaveWirelessExtensions())
return false;
- //if(i->getInterfaceName() == "eth0" || i->getInterfaceName() == "wlan0"){
- i->setHardwareName("802.11b");
- list.append(i);
- return true;
- //}
- //return false;
+ i->setHardwareName("802.11b");
+ list.append(i);
+ return true;
}
/**
* Create, set tabWiget and return the WLANConfigure Module
@@ -74,10 +70,10 @@ QWidget *WLANModule::configure(Interface *, QTabWidget **tabWidget){
QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){
WExtensions we(i->getInterfaceName());
if(!we.doesHaveWirelessExtensions())
return NULL;
-
- WlanInfo *info = new WlanInfo(0, "wireless info");
+
+ WlanInfo *info = new WlanInfo(0, "wireless info", Qt::WDestructiveClose);
(*tabWidget) = info->tabWidget;
info->essidLabel->setText(we.essid());
info->apLabel->setText(we.ap());
@@ -91,8 +87,12 @@ QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){
info->signalProgressBar->setProgress(signal);
info->noiseProgressBar->setProgress(noise);
info->qualityProgressBar->setProgress(quality);
info->rateLabel->setText(QString("%1 Mb/s").arg(we.rate()));
+ //WlanInfo info (0, "wireless info", true);
+ //info.show();
+ //return NULL;
+
return info;
}
/**