author | benmeyer <benmeyer> | 2002-10-22 21:04:58 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-22 21:04:58 (UTC) |
commit | c306ba7e1c73ec200b1621d224fc77f45e798e13 (patch) (side-by-side diff) | |
tree | 1eb110c64b99c2e6ea2f8ab44c053f1e65f320f3 | |
parent | 1e1b3e398d6b978a9c2bbd85d8f6b7aafbf72b2f (diff) | |
download | opie-c306ba7e1c73ec200b1621d224fc77f45e798e13.zip opie-c306ba7e1c73ec200b1621d224fc77f45e798e13.tar.gz opie-c306ba7e1c73ec200b1621d224fc77f45e798e13.tar.bz2 |
Fix segfault
-rw-r--r-- | noncore/net/networksetup/TODO | 6 | ||||
-rw-r--r-- | noncore/net/networksetup/interface.cpp | 4 | ||||
-rw-r--r-- | noncore/net/networksetup/mainwindowimp.cpp | 2 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wextensions.cpp | 2 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlanimp.cpp | 2 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlanmodule.cpp | 10 | ||||
-rw-r--r-- | noncore/settings/networksettings/TODO | 6 | ||||
-rw-r--r-- | noncore/settings/networksettings/interface.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/networksettings/mainwindowimp.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wextensions.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanmodule.cpp | 10 |
12 files changed, 26 insertions, 26 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 @@ -6,7 +6,7 @@ #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> @@ -171,7 +171,7 @@ bool Interface::refresh(){ 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 @@ -78,6 +78,7 @@ 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");
@@ -96,6 +97,7 @@ MainWindowImp::~MainWindowImp(){ delete it.key();
delete it.data();
}
+ qDebug("done Saving mainwindow");
}
/**
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 @@ -157,7 +157,7 @@ bool WExtensions::stats(int &signal, int &noise, int &quality){ 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; 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 @@ -16,7 +16,7 @@ #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 @@ -10,7 +10,6 @@ * Constructor, find all of the possible interfaces */ WLANModule::WLANModule() : Module() { - // get output from iwconfig } /** @@ -47,12 +46,9 @@ bool WLANModule::isOwner(Interface *i){ if(!we.doesHaveWirelessExtensions()) return false; - //if(i->getInterfaceName() == "eth0" || i->getInterfaceName() == "wlan0"){ i->setHardwareName("802.11b"); list.append(i); return true; - //} - //return false; } /** @@ -76,7 +72,7 @@ QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){ 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()); @@ -92,6 +88,10 @@ QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){ 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 @@ -6,7 +6,7 @@ #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> @@ -171,7 +171,7 @@ bool Interface::refresh(){ 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 @@ -78,6 +78,7 @@ 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");
@@ -96,6 +97,7 @@ MainWindowImp::~MainWindowImp(){ delete it.key();
delete it.data();
}
+ qDebug("done Saving mainwindow");
}
/**
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 @@ -157,7 +157,7 @@ bool WExtensions::stats(int &signal, int &noise, int &quality){ 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; 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 @@ -16,7 +16,7 @@ #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 @@ -10,7 +10,6 @@ * Constructor, find all of the possible interfaces */ WLANModule::WLANModule() : Module() { - // get output from iwconfig } /** @@ -47,12 +46,9 @@ bool WLANModule::isOwner(Interface *i){ if(!we.doesHaveWirelessExtensions()) return false; - //if(i->getInterfaceName() == "eth0" || i->getInterfaceName() == "wlan0"){ i->setHardwareName("802.11b"); list.append(i); return true; - //} - //return false; } /** @@ -76,7 +72,7 @@ QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){ 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()); @@ -92,6 +88,10 @@ QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){ 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; } |