author | kergoth <kergoth> | 2002-10-19 20:58:09 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-10-19 20:58:09 (UTC) |
commit | d7449e1e0070a068c5e83366cb75b64142b71b89 (patch) (unidiff) | |
tree | 0049f8b29e274c2b973ac74ce8f8a93b8bc38a77 | |
parent | 8c9e2e893540c0a405637f10ac2f656df69991a7 (diff) | |
download | opie-d7449e1e0070a068c5e83366cb75b64142b71b89.zip opie-d7449e1e0070a068c5e83366cb75b64142b71b89.tar.gz opie-d7449e1e0070a068c5e83366cb75b64142b71b89.tar.bz2 |
Cleaned up Config handling a bit.
-rw-r--r-- | noncore/net/networksetup/wlan/wlanimp.cpp | 83 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlanimp.h | 10 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlanmodule.cpp | 3 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp.cpp | 83 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp.h | 10 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanmodule.cpp | 3 |
6 files changed, 96 insertions, 96 deletions
diff --git a/noncore/net/networksetup/wlan/wlanimp.cpp b/noncore/net/networksetup/wlan/wlanimp.cpp index 517604f..3b0e0b7 100644 --- a/noncore/net/networksetup/wlan/wlanimp.cpp +++ b/noncore/net/networksetup/wlan/wlanimp.cpp | |||
@@ -18,3 +18,4 @@ | |||
18 | 18 | ||
19 | WLANImp::WLANImp( Config &cfg, QWidget* parent, const char* name):WLAN(parent, name),config(cfg){ | 19 | WLANImp::WLANImp( QWidget* parent, const char* name):WLAN(parent, name){ |
20 | config = new Config("wireless"); | ||
20 | readConfig(); | 21 | readConfig(); |
@@ -25,4 +26,4 @@ void WLANImp::readConfig() | |||
25 | qWarning( "WLANImp::readConfig() called." ); | 26 | qWarning( "WLANImp::readConfig() called." ); |
26 | config.setGroup( "Properties" ); | 27 | config->setGroup( "Properties" ); |
27 | QString ssid = config.readEntry( "SSID", "any" ); | 28 | QString ssid = config->readEntry( "SSID", "any" ); |
28 | if( ssid == "any" || ssid == "ANY" ){ | 29 | if( ssid == "any" || ssid == "ANY" ){ |
@@ -33,3 +34,3 @@ void WLANImp::readConfig() | |||
33 | } | 34 | } |
34 | QString mode = config.readEntry( "Mode", "Managed" ); | 35 | QString mode = config->readEntry( "Mode", "Managed" ); |
35 | if( mode == "adhoc" ) { | 36 | if( mode == "adhoc" ) { |
@@ -39,8 +40,8 @@ void WLANImp::readConfig() | |||
39 | } | 40 | } |
40 | networkChannel->setValue( config.readNumEntry( "CHANNEL", 1 ) ); | 41 | networkChannel->setValue( config->readNumEntry( "CHANNEL", 1 ) ); |
41 | // config.readEntry( "RATE", "auto" ); | 42 | // config->readEntry( "RATE", "auto" ); |
42 | config.readEntry( "dot11PrivacyInvoked" ) == "true" ? wepEnabled->setChecked( true ) : wepEnabled->setChecked( false ); | 43 | config->readEntry( "dot11PrivacyInvoked" ) == "true" ? wepEnabled->setChecked( true ) : wepEnabled->setChecked( false ); |
43 | config.readEntry( "AuthType", "opensystem" ); | 44 | config->readEntry( "AuthType", "opensystem" ); |
44 | config.readEntry( "PRIV_KEY128", "false" ) == "false" ? key40->setChecked( true ) : key128->setChecked( true ); | 45 | config->readEntry( "PRIV_KEY128", "false" ) == "false" ? key40->setChecked( true ) : key128->setChecked( true ); |
45 | int defaultkey = config.readNumEntry( "dot11WEPDefaultKeyID", 0 ); | 46 | int defaultkey = config->readNumEntry( "dot11WEPDefaultKeyID", 0 ); |
46 | switch( defaultkey ){ | 47 | switch( defaultkey ){ |
@@ -59,6 +60,6 @@ void WLANImp::readConfig() | |||
59 | } | 60 | } |
60 | keyLineEdit0->setText(config.readEntry( "dot11WEPDefaultKey0" )); | 61 | keyLineEdit0->setText(config->readEntry( "dot11WEPDefaultKey0" )); |
61 | keyLineEdit1->setText(config.readEntry( "dot11WEPDefaultKey1" )); | 62 | keyLineEdit1->setText(config->readEntry( "dot11WEPDefaultKey1" )); |
62 | keyLineEdit2->setText(config.readEntry( "dot11WEPDefaultKey2" )); | 63 | keyLineEdit2->setText(config->readEntry( "dot11WEPDefaultKey2" )); |
63 | keyLineEdit3->setText(config.readEntry( "dot11WEPDefaultKey3" )); | 64 | keyLineEdit3->setText(config->readEntry( "dot11WEPDefaultKey3" )); |
64 | return; | 65 | return; |
@@ -69,32 +70,32 @@ bool WLANImp::writeConfig() | |||
69 | qWarning( "WLANImp::writeConfig() called." ); | 70 | qWarning( "WLANImp::writeConfig() called." ); |
70 | config.setGroup( "Properties" ); | 71 | config->setGroup( "Properties" ); |
71 | if( essNon->isChecked() ) { | 72 | if( essNon->isChecked() ) { |
72 | config.writeEntry( "SSID", "any" ); | 73 | config->writeEntry( "SSID", "any" ); |
73 | } else { | 74 | } else { |
74 | config.writeEntry( "SSID", essSpecificLineEdit->text() ); | 75 | config->writeEntry( "SSID", essSpecificLineEdit->text() ); |
75 | } | 76 | } |
76 | if( networkInfrastructure->isChecked() ){ | 77 | if( networkInfrastructure->isChecked() ){ |
77 | config.writeEntry( "Mode", "Managed" ); | 78 | config->writeEntry( "Mode", "Managed" ); |
78 | } else if( network802->isChecked() ){ | 79 | } else if( network802->isChecked() ){ |
79 | config.writeEntry( "Mode", "adhoc" ); | 80 | config->writeEntry( "Mode", "adhoc" ); |
80 | } | 81 | } |
81 | config.writeEntry( "CHANNEL", networkChannel->value() ); | 82 | config->writeEntry( "CHANNEL", networkChannel->value() ); |
82 | // config.readEntry( "RATE", "auto" ); | 83 | // config->readEntry( "RATE", "auto" ); |
83 | wepEnabled->isChecked() ? config.writeEntry( "dot11PrivacyInvoked", "true" ) : config.writeEntry( "dot11PrivacyInvoked", "false" ); | 84 | wepEnabled->isChecked() ? config->writeEntry( "dot11PrivacyInvoked", "true" ) : config->writeEntry( "dot11PrivacyInvoked", "false" ); |
84 | authOpen->isChecked() ? config.writeEntry( "AuthType", "opensystem" ) : config.writeEntry( "AuthType", "sharedkey" ); | 85 | authOpen->isChecked() ? config->writeEntry( "AuthType", "opensystem" ) : config->writeEntry( "AuthType", "sharedkey" ); |
85 | key40->isChecked() ? config.writeEntry( "PRIV_KEY128", "false" ) : config.writeEntry( "PRIV_KEY128", "true" ); | 86 | key40->isChecked() ? config->writeEntry( "PRIV_KEY128", "false" ) : config->writeEntry( "PRIV_KEY128", "true" ); |
86 | if( keyRadio0->isChecked() ){ | 87 | if( keyRadio0->isChecked() ){ |
87 | config.writeEntry( "dot11WEPDefaultKeyID", 0 ); | 88 | config->writeEntry( "dot11WEPDefaultKeyID", 0 ); |
88 | } else if( keyRadio1->isChecked() ){ | 89 | } else if( keyRadio1->isChecked() ){ |
89 | config.writeEntry( "dot11WEPDefaultKeyID", 1 ); | 90 | config->writeEntry( "dot11WEPDefaultKeyID", 1 ); |
90 | } else if( keyRadio2->isChecked() ){ | 91 | } else if( keyRadio2->isChecked() ){ |
91 | config.writeEntry( "dot11WEPDefaultKeyID", 2 ); | 92 | config->writeEntry( "dot11WEPDefaultKeyID", 2 ); |
92 | } else if( keyRadio3->isChecked() ){ | 93 | } else if( keyRadio3->isChecked() ){ |
93 | config.writeEntry( "dot11WEPDefaultKeyID", 3 ); | 94 | config->writeEntry( "dot11WEPDefaultKeyID", 3 ); |
94 | } | 95 | } |
95 | config.writeEntry( "dot11WEPDefaultKey0", keyLineEdit0->text() ); | 96 | config->writeEntry( "dot11WEPDefaultKey0", keyLineEdit0->text() ); |
96 | config.writeEntry( "dot11WEPDefaultKey1", keyLineEdit1->text() ); | 97 | config->writeEntry( "dot11WEPDefaultKey1", keyLineEdit1->text() ); |
97 | config.writeEntry( "dot11WEPDefaultKey2", keyLineEdit2->text() ); | 98 | config->writeEntry( "dot11WEPDefaultKey2", keyLineEdit2->text() ); |
98 | config.writeEntry( "dot11WEPDefaultKey3", keyLineEdit3->text() ); | 99 | config->writeEntry( "dot11WEPDefaultKey3", keyLineEdit3->text() ); |
99 | return writeWirelessOpts( config ); | 100 | return writeWirelessOpts( ); |
100 | } | 101 | } |
@@ -115,3 +116,3 @@ void WLANImp::done ( int r ) | |||
115 | 116 | ||
116 | bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) | 117 | bool WLANImp::writeWirelessOpts( QString scheme ) |
117 | { | 118 | { |
@@ -133,3 +134,3 @@ bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) | |||
133 | 134 | ||
134 | config.setGroup("Properties"); | 135 | config->setGroup("Properties"); |
135 | 136 | ||
@@ -161,3 +162,3 @@ bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) | |||
161 | }; | 162 | }; |
162 | QString readmode = config.readEntry( "Mode", "Managed" ); | 163 | QString readmode = config->readEntry( "Mode", "Managed" ); |
163 | QString mode; | 164 | QString mode; |
@@ -170,3 +171,3 @@ bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) | |||
170 | if( wepEnabled->isChecked() ){ | 171 | if( wepEnabled->isChecked() ){ |
171 | int defaultkey = config.readNumEntry( "dot11WEPDefaultKeyID", 0 ); | 172 | int defaultkey = config->readNumEntry( "dot11WEPDefaultKeyID", 0 ); |
172 | switch( defaultkey ){ | 173 | switch( defaultkey ){ |
@@ -185,3 +186,3 @@ bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) | |||
185 | } | 186 | } |
186 | if( config.readEntry( "AuthType", "opensystem" ) == "opensystem") | 187 | if( config->readEntry( "AuthType", "opensystem" ) == "opensystem") |
187 | key += " open"; | 188 | key += " open"; |
@@ -189,3 +190,3 @@ bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) | |||
189 | out << scheme << ",*,*,*)" << "\n" | 190 | out << scheme << ",*,*,*)" << "\n" |
190 | << " ESSID=" << Global::shellQuote( config.readEntry( "SSID", "any" ) ) << "\n" | 191 | << " ESSID=" << Global::shellQuote( config->readEntry( "SSID", "any" ) ) << "\n" |
191 | << " MODE=" << mode << "\n" | 192 | << " MODE=" << mode << "\n" |
@@ -195,6 +196,6 @@ bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) | |||
195 | if( mode != "Managed" ) | 196 | if( mode != "Managed" ) |
196 | out << " CHANNEL=" << config.readNumEntry( "CHANNEL", 1 ) << "\n"; | 197 | out << " CHANNEL=" << config->readNumEntry( "CHANNEL", 1 ) << "\n"; |
197 | const char** f = txtfields; | 198 | const char** f = txtfields; |
198 | while (*f) { | 199 | while (*f) { |
199 | out << " " << *f << "=" << config.readEntry(*f,"") << "\n"; | 200 | out << " " << *f << "=" << config->readEntry(*f,"") << "\n"; |
200 | ++f; | 201 | ++f; |
diff --git a/noncore/net/networksetup/wlan/wlanimp.h b/noncore/net/networksetup/wlan/wlanimp.h index 8e355ce..79e931d 100644 --- a/noncore/net/networksetup/wlan/wlanimp.h +++ b/noncore/net/networksetup/wlan/wlanimp.h | |||
@@ -5,3 +5,3 @@ | |||
5 | 5 | ||
6 | class Config; | 6 | #include <qpe/config.h> |
7 | 7 | ||
@@ -11,3 +11,3 @@ class WLANImp : public WLAN { | |||
11 | public: | 11 | public: |
12 | WLANImp( Config& cfg, QWidget* parent = 0, const char* name = 0); | 12 | WLANImp( QWidget* parent = 0, const char* name = 0); |
13 | 13 | ||
@@ -20,5 +20,5 @@ private: | |||
20 | bool writeConfig(); | 20 | bool writeConfig(); |
21 | bool writeWirelessOpts( Config &cfg, QString scheme = "*" ); | 21 | bool writeWirelessOpts( QString scheme = "*" ); |
22 | bool writeWlanngOpts( Config &cfg, QString scheme = "*" ); | 22 | bool writeWlanngOpts( QString scheme = "*" ); |
23 | Config& config; | 23 | Config* config; |
24 | }; | 24 | }; |
diff --git a/noncore/net/networksetup/wlan/wlanmodule.cpp b/noncore/net/networksetup/wlan/wlanmodule.cpp index f12e608..cbb520d 100644 --- a/noncore/net/networksetup/wlan/wlanmodule.cpp +++ b/noncore/net/networksetup/wlan/wlanmodule.cpp | |||
@@ -65,4 +65,3 @@ bool WLANModule::isOwner(Interface *i){ | |||
65 | QWidget *WLANModule::configure(Interface *i, QTabWidget **tabWidget){ | 65 | QWidget *WLANModule::configure(Interface *i, QTabWidget **tabWidget){ |
66 | Config *cfg = new Config("wireless config"); | 66 | WLANImp *wlanconfig = new WLANImp( ); |
67 | WLANImp *wlanconfig = new WLANImp(*cfg); | ||
68 | (*tabWidget) = wlanconfig->tabWidget; | 67 | (*tabWidget) = wlanconfig->tabWidget; |
diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp index 517604f..3b0e0b7 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp.cpp | |||
@@ -18,3 +18,4 @@ | |||
18 | 18 | ||
19 | WLANImp::WLANImp( Config &cfg, QWidget* parent, const char* name):WLAN(parent, name),config(cfg){ | 19 | WLANImp::WLANImp( QWidget* parent, const char* name):WLAN(parent, name){ |
20 | config = new Config("wireless"); | ||
20 | readConfig(); | 21 | readConfig(); |
@@ -25,4 +26,4 @@ void WLANImp::readConfig() | |||
25 | qWarning( "WLANImp::readConfig() called." ); | 26 | qWarning( "WLANImp::readConfig() called." ); |
26 | config.setGroup( "Properties" ); | 27 | config->setGroup( "Properties" ); |
27 | QString ssid = config.readEntry( "SSID", "any" ); | 28 | QString ssid = config->readEntry( "SSID", "any" ); |
28 | if( ssid == "any" || ssid == "ANY" ){ | 29 | if( ssid == "any" || ssid == "ANY" ){ |
@@ -33,3 +34,3 @@ void WLANImp::readConfig() | |||
33 | } | 34 | } |
34 | QString mode = config.readEntry( "Mode", "Managed" ); | 35 | QString mode = config->readEntry( "Mode", "Managed" ); |
35 | if( mode == "adhoc" ) { | 36 | if( mode == "adhoc" ) { |
@@ -39,8 +40,8 @@ void WLANImp::readConfig() | |||
39 | } | 40 | } |
40 | networkChannel->setValue( config.readNumEntry( "CHANNEL", 1 ) ); | 41 | networkChannel->setValue( config->readNumEntry( "CHANNEL", 1 ) ); |
41 | // config.readEntry( "RATE", "auto" ); | 42 | // config->readEntry( "RATE", "auto" ); |
42 | config.readEntry( "dot11PrivacyInvoked" ) == "true" ? wepEnabled->setChecked( true ) : wepEnabled->setChecked( false ); | 43 | config->readEntry( "dot11PrivacyInvoked" ) == "true" ? wepEnabled->setChecked( true ) : wepEnabled->setChecked( false ); |
43 | config.readEntry( "AuthType", "opensystem" ); | 44 | config->readEntry( "AuthType", "opensystem" ); |
44 | config.readEntry( "PRIV_KEY128", "false" ) == "false" ? key40->setChecked( true ) : key128->setChecked( true ); | 45 | config->readEntry( "PRIV_KEY128", "false" ) == "false" ? key40->setChecked( true ) : key128->setChecked( true ); |
45 | int defaultkey = config.readNumEntry( "dot11WEPDefaultKeyID", 0 ); | 46 | int defaultkey = config->readNumEntry( "dot11WEPDefaultKeyID", 0 ); |
46 | switch( defaultkey ){ | 47 | switch( defaultkey ){ |
@@ -59,6 +60,6 @@ void WLANImp::readConfig() | |||
59 | } | 60 | } |
60 | keyLineEdit0->setText(config.readEntry( "dot11WEPDefaultKey0" )); | 61 | keyLineEdit0->setText(config->readEntry( "dot11WEPDefaultKey0" )); |
61 | keyLineEdit1->setText(config.readEntry( "dot11WEPDefaultKey1" )); | 62 | keyLineEdit1->setText(config->readEntry( "dot11WEPDefaultKey1" )); |
62 | keyLineEdit2->setText(config.readEntry( "dot11WEPDefaultKey2" )); | 63 | keyLineEdit2->setText(config->readEntry( "dot11WEPDefaultKey2" )); |
63 | keyLineEdit3->setText(config.readEntry( "dot11WEPDefaultKey3" )); | 64 | keyLineEdit3->setText(config->readEntry( "dot11WEPDefaultKey3" )); |
64 | return; | 65 | return; |
@@ -69,32 +70,32 @@ bool WLANImp::writeConfig() | |||
69 | qWarning( "WLANImp::writeConfig() called." ); | 70 | qWarning( "WLANImp::writeConfig() called." ); |
70 | config.setGroup( "Properties" ); | 71 | config->setGroup( "Properties" ); |
71 | if( essNon->isChecked() ) { | 72 | if( essNon->isChecked() ) { |
72 | config.writeEntry( "SSID", "any" ); | 73 | config->writeEntry( "SSID", "any" ); |
73 | } else { | 74 | } else { |
74 | config.writeEntry( "SSID", essSpecificLineEdit->text() ); | 75 | config->writeEntry( "SSID", essSpecificLineEdit->text() ); |
75 | } | 76 | } |
76 | if( networkInfrastructure->isChecked() ){ | 77 | if( networkInfrastructure->isChecked() ){ |
77 | config.writeEntry( "Mode", "Managed" ); | 78 | config->writeEntry( "Mode", "Managed" ); |
78 | } else if( network802->isChecked() ){ | 79 | } else if( network802->isChecked() ){ |
79 | config.writeEntry( "Mode", "adhoc" ); | 80 | config->writeEntry( "Mode", "adhoc" ); |
80 | } | 81 | } |
81 | config.writeEntry( "CHANNEL", networkChannel->value() ); | 82 | config->writeEntry( "CHANNEL", networkChannel->value() ); |
82 | // config.readEntry( "RATE", "auto" ); | 83 | // config->readEntry( "RATE", "auto" ); |
83 | wepEnabled->isChecked() ? config.writeEntry( "dot11PrivacyInvoked", "true" ) : config.writeEntry( "dot11PrivacyInvoked", "false" ); | 84 | wepEnabled->isChecked() ? config->writeEntry( "dot11PrivacyInvoked", "true" ) : config->writeEntry( "dot11PrivacyInvoked", "false" ); |
84 | authOpen->isChecked() ? config.writeEntry( "AuthType", "opensystem" ) : config.writeEntry( "AuthType", "sharedkey" ); | 85 | authOpen->isChecked() ? config->writeEntry( "AuthType", "opensystem" ) : config->writeEntry( "AuthType", "sharedkey" ); |
85 | key40->isChecked() ? config.writeEntry( "PRIV_KEY128", "false" ) : config.writeEntry( "PRIV_KEY128", "true" ); | 86 | key40->isChecked() ? config->writeEntry( "PRIV_KEY128", "false" ) : config->writeEntry( "PRIV_KEY128", "true" ); |
86 | if( keyRadio0->isChecked() ){ | 87 | if( keyRadio0->isChecked() ){ |
87 | config.writeEntry( "dot11WEPDefaultKeyID", 0 ); | 88 | config->writeEntry( "dot11WEPDefaultKeyID", 0 ); |
88 | } else if( keyRadio1->isChecked() ){ | 89 | } else if( keyRadio1->isChecked() ){ |
89 | config.writeEntry( "dot11WEPDefaultKeyID", 1 ); | 90 | config->writeEntry( "dot11WEPDefaultKeyID", 1 ); |
90 | } else if( keyRadio2->isChecked() ){ | 91 | } else if( keyRadio2->isChecked() ){ |
91 | config.writeEntry( "dot11WEPDefaultKeyID", 2 ); | 92 | config->writeEntry( "dot11WEPDefaultKeyID", 2 ); |
92 | } else if( keyRadio3->isChecked() ){ | 93 | } else if( keyRadio3->isChecked() ){ |
93 | config.writeEntry( "dot11WEPDefaultKeyID", 3 ); | 94 | config->writeEntry( "dot11WEPDefaultKeyID", 3 ); |
94 | } | 95 | } |
95 | config.writeEntry( "dot11WEPDefaultKey0", keyLineEdit0->text() ); | 96 | config->writeEntry( "dot11WEPDefaultKey0", keyLineEdit0->text() ); |
96 | config.writeEntry( "dot11WEPDefaultKey1", keyLineEdit1->text() ); | 97 | config->writeEntry( "dot11WEPDefaultKey1", keyLineEdit1->text() ); |
97 | config.writeEntry( "dot11WEPDefaultKey2", keyLineEdit2->text() ); | 98 | config->writeEntry( "dot11WEPDefaultKey2", keyLineEdit2->text() ); |
98 | config.writeEntry( "dot11WEPDefaultKey3", keyLineEdit3->text() ); | 99 | config->writeEntry( "dot11WEPDefaultKey3", keyLineEdit3->text() ); |
99 | return writeWirelessOpts( config ); | 100 | return writeWirelessOpts( ); |
100 | } | 101 | } |
@@ -115,3 +116,3 @@ void WLANImp::done ( int r ) | |||
115 | 116 | ||
116 | bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) | 117 | bool WLANImp::writeWirelessOpts( QString scheme ) |
117 | { | 118 | { |
@@ -133,3 +134,3 @@ bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) | |||
133 | 134 | ||
134 | config.setGroup("Properties"); | 135 | config->setGroup("Properties"); |
135 | 136 | ||
@@ -161,3 +162,3 @@ bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) | |||
161 | }; | 162 | }; |
162 | QString readmode = config.readEntry( "Mode", "Managed" ); | 163 | QString readmode = config->readEntry( "Mode", "Managed" ); |
163 | QString mode; | 164 | QString mode; |
@@ -170,3 +171,3 @@ bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) | |||
170 | if( wepEnabled->isChecked() ){ | 171 | if( wepEnabled->isChecked() ){ |
171 | int defaultkey = config.readNumEntry( "dot11WEPDefaultKeyID", 0 ); | 172 | int defaultkey = config->readNumEntry( "dot11WEPDefaultKeyID", 0 ); |
172 | switch( defaultkey ){ | 173 | switch( defaultkey ){ |
@@ -185,3 +186,3 @@ bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) | |||
185 | } | 186 | } |
186 | if( config.readEntry( "AuthType", "opensystem" ) == "opensystem") | 187 | if( config->readEntry( "AuthType", "opensystem" ) == "opensystem") |
187 | key += " open"; | 188 | key += " open"; |
@@ -189,3 +190,3 @@ bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) | |||
189 | out << scheme << ",*,*,*)" << "\n" | 190 | out << scheme << ",*,*,*)" << "\n" |
190 | << " ESSID=" << Global::shellQuote( config.readEntry( "SSID", "any" ) ) << "\n" | 191 | << " ESSID=" << Global::shellQuote( config->readEntry( "SSID", "any" ) ) << "\n" |
191 | << " MODE=" << mode << "\n" | 192 | << " MODE=" << mode << "\n" |
@@ -195,6 +196,6 @@ bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) | |||
195 | if( mode != "Managed" ) | 196 | if( mode != "Managed" ) |
196 | out << " CHANNEL=" << config.readNumEntry( "CHANNEL", 1 ) << "\n"; | 197 | out << " CHANNEL=" << config->readNumEntry( "CHANNEL", 1 ) << "\n"; |
197 | const char** f = txtfields; | 198 | const char** f = txtfields; |
198 | while (*f) { | 199 | while (*f) { |
199 | out << " " << *f << "=" << config.readEntry(*f,"") << "\n"; | 200 | out << " " << *f << "=" << config->readEntry(*f,"") << "\n"; |
200 | ++f; | 201 | ++f; |
diff --git a/noncore/settings/networksettings/wlan/wlanimp.h b/noncore/settings/networksettings/wlan/wlanimp.h index 8e355ce..79e931d 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.h +++ b/noncore/settings/networksettings/wlan/wlanimp.h | |||
@@ -5,3 +5,3 @@ | |||
5 | 5 | ||
6 | class Config; | 6 | #include <qpe/config.h> |
7 | 7 | ||
@@ -11,3 +11,3 @@ class WLANImp : public WLAN { | |||
11 | public: | 11 | public: |
12 | WLANImp( Config& cfg, QWidget* parent = 0, const char* name = 0); | 12 | WLANImp( QWidget* parent = 0, const char* name = 0); |
13 | 13 | ||
@@ -20,5 +20,5 @@ private: | |||
20 | bool writeConfig(); | 20 | bool writeConfig(); |
21 | bool writeWirelessOpts( Config &cfg, QString scheme = "*" ); | 21 | bool writeWirelessOpts( QString scheme = "*" ); |
22 | bool writeWlanngOpts( Config &cfg, QString scheme = "*" ); | 22 | bool writeWlanngOpts( QString scheme = "*" ); |
23 | Config& config; | 23 | Config* config; |
24 | }; | 24 | }; |
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp index f12e608..cbb520d 100644 --- a/noncore/settings/networksettings/wlan/wlanmodule.cpp +++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp | |||
@@ -65,4 +65,3 @@ bool WLANModule::isOwner(Interface *i){ | |||
65 | QWidget *WLANModule::configure(Interface *i, QTabWidget **tabWidget){ | 65 | QWidget *WLANModule::configure(Interface *i, QTabWidget **tabWidget){ |
66 | Config *cfg = new Config("wireless config"); | 66 | WLANImp *wlanconfig = new WLANImp( ); |
67 | WLANImp *wlanconfig = new WLANImp(*cfg); | ||
68 | (*tabWidget) = wlanconfig->tabWidget; | 67 | (*tabWidget) = wlanconfig->tabWidget; |