author | kergoth <kergoth> | 2002-10-19 21:27:09 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-10-19 21:27:09 (UTC) |
commit | 174ae2b9de0d4d002c549976561e66668453e5a4 (patch) (side-by-side diff) | |
tree | be53f0e8626ac8410b46a32ce70c0858df8dccdb /noncore | |
parent | d7449e1e0070a068c5e83366cb75b64142b71b89 (diff) | |
download | opie-174ae2b9de0d4d002c549976561e66668453e5a4.zip opie-174ae2b9de0d4d002c549976561e66668453e5a4.tar.gz opie-174ae2b9de0d4d002c549976561e66668453e5a4.tar.bz2 |
geh, never code before coffee!
-rw-r--r-- | noncore/net/networksetup/wlan/wlanimp.cpp | 4 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlanimp.h | 1 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp.h | 1 |
4 files changed, 10 insertions, 0 deletions
diff --git a/noncore/net/networksetup/wlan/wlanimp.cpp b/noncore/net/networksetup/wlan/wlanimp.cpp index 3b0e0b7..ea19207 100644 --- a/noncore/net/networksetup/wlan/wlanimp.cpp +++ b/noncore/net/networksetup/wlan/wlanimp.cpp @@ -1,47 +1,51 @@ #include "wlanimp.h" /* Config class */ #include <qpe/config.h> /* Global namespace */ #include <qpe/global.h> /* system() */ #include <stdlib.h> #include <qfile.h> #include <qdir.h> #include <qtextstream.h> #include <qmessagebox.h> #include <qlineedit.h> #include <qspinbox.h> #include <qradiobutton.h> #include <qcheckbox.h> #include <qregexp.h> WLANImp::WLANImp( QWidget* parent, const char* name):WLAN(parent, name){ config = new Config("wireless"); readConfig(); } +WLANImp::~WLANImp( ){ + delete config; +} + void WLANImp::readConfig() { qWarning( "WLANImp::readConfig() called." ); config->setGroup( "Properties" ); QString ssid = config->readEntry( "SSID", "any" ); if( ssid == "any" || ssid == "ANY" ){ essNon->setChecked( true ); } else { essSpecific->setChecked( true ); essSpecificLineEdit->setText( ssid ); } QString mode = config->readEntry( "Mode", "Managed" ); if( mode == "adhoc" ) { network802->setChecked( true ); } else { networkInfrastructure->setChecked( true ); } networkChannel->setValue( config->readNumEntry( "CHANNEL", 1 ) ); // config->readEntry( "RATE", "auto" ); config->readEntry( "dot11PrivacyInvoked" ) == "true" ? wepEnabled->setChecked( true ) : wepEnabled->setChecked( false ); config->readEntry( "AuthType", "opensystem" ); config->readEntry( "PRIV_KEY128", "false" ) == "false" ? key40->setChecked( true ) : key128->setChecked( true ); int defaultkey = config->readNumEntry( "dot11WEPDefaultKeyID", 0 ); switch( defaultkey ){ diff --git a/noncore/net/networksetup/wlan/wlanimp.h b/noncore/net/networksetup/wlan/wlanimp.h index 79e931d..22ce143 100644 --- a/noncore/net/networksetup/wlan/wlanimp.h +++ b/noncore/net/networksetup/wlan/wlanimp.h @@ -1,27 +1,28 @@ #ifndef WLANIMP_H #define WLANIMP_H #include "wlan.h" #include <qpe/config.h> class WLANImp : public WLAN { Q_OBJECT public: WLANImp( QWidget* parent = 0, const char* name = 0); + ~WLANImp( ); protected: void accept(); void done ( int r ); private: void readConfig(); bool writeConfig(); bool writeWirelessOpts( QString scheme = "*" ); bool writeWlanngOpts( QString scheme = "*" ); Config* config; }; #endif diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp index 3b0e0b7..ea19207 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp.cpp @@ -1,47 +1,51 @@ #include "wlanimp.h" /* Config class */ #include <qpe/config.h> /* Global namespace */ #include <qpe/global.h> /* system() */ #include <stdlib.h> #include <qfile.h> #include <qdir.h> #include <qtextstream.h> #include <qmessagebox.h> #include <qlineedit.h> #include <qspinbox.h> #include <qradiobutton.h> #include <qcheckbox.h> #include <qregexp.h> WLANImp::WLANImp( QWidget* parent, const char* name):WLAN(parent, name){ config = new Config("wireless"); readConfig(); } +WLANImp::~WLANImp( ){ + delete config; +} + void WLANImp::readConfig() { qWarning( "WLANImp::readConfig() called." ); config->setGroup( "Properties" ); QString ssid = config->readEntry( "SSID", "any" ); if( ssid == "any" || ssid == "ANY" ){ essNon->setChecked( true ); } else { essSpecific->setChecked( true ); essSpecificLineEdit->setText( ssid ); } QString mode = config->readEntry( "Mode", "Managed" ); if( mode == "adhoc" ) { network802->setChecked( true ); } else { networkInfrastructure->setChecked( true ); } networkChannel->setValue( config->readNumEntry( "CHANNEL", 1 ) ); // config->readEntry( "RATE", "auto" ); config->readEntry( "dot11PrivacyInvoked" ) == "true" ? wepEnabled->setChecked( true ) : wepEnabled->setChecked( false ); config->readEntry( "AuthType", "opensystem" ); config->readEntry( "PRIV_KEY128", "false" ) == "false" ? key40->setChecked( true ) : key128->setChecked( true ); int defaultkey = config->readNumEntry( "dot11WEPDefaultKeyID", 0 ); switch( defaultkey ){ diff --git a/noncore/settings/networksettings/wlan/wlanimp.h b/noncore/settings/networksettings/wlan/wlanimp.h index 79e931d..22ce143 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.h +++ b/noncore/settings/networksettings/wlan/wlanimp.h @@ -1,27 +1,28 @@ #ifndef WLANIMP_H #define WLANIMP_H #include "wlan.h" #include <qpe/config.h> class WLANImp : public WLAN { Q_OBJECT public: WLANImp( QWidget* parent = 0, const char* name = 0); + ~WLANImp( ); protected: void accept(); void done ( int r ); private: void readConfig(); bool writeConfig(); bool writeWirelessOpts( QString scheme = "*" ); bool writeWlanngOpts( QString scheme = "*" ); Config* config; }; #endif |