author | benmeyer <benmeyer> | 2002-10-16 21:00:21 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-16 21:00:21 (UTC) |
commit | 8834d3ee866fe9f0c093bf50fa78b4e0f5d2018c (patch) (unidiff) | |
tree | 6b0468933071ea8a0398ca3aaeb18cf8e2c23d86 | |
parent | 47769211862108250127a0c5c413c38c530c8fd8 (diff) | |
download | opie-8834d3ee866fe9f0c093bf50fa78b4e0f5d2018c.zip opie-8834d3ee866fe9f0c093bf50fa78b4e0f5d2018c.tar.gz opie-8834d3ee866fe9f0c093bf50fa78b4e0f5d2018c.tar.bz2 |
fix segfault
-rw-r--r-- | noncore/net/networksetup/wlan/wlanimp.cpp | 4 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlanmodule.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanmodule.cpp | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/noncore/net/networksetup/wlan/wlanimp.cpp b/noncore/net/networksetup/wlan/wlanimp.cpp index 60ffeeb..806643d 100644 --- a/noncore/net/networksetup/wlan/wlanimp.cpp +++ b/noncore/net/networksetup/wlan/wlanimp.cpp | |||
@@ -91,34 +91,34 @@ bool WLANImp::writeConfig() | |||
91 | config.writeEntry( "dot11WEPDefaultKeyID", 2 ); | 91 | config.writeEntry( "dot11WEPDefaultKeyID", 2 ); |
92 | } else if( keyRadio3->isChecked() ){ | 92 | } else if( keyRadio3->isChecked() ){ |
93 | config.writeEntry( "dot11WEPDefaultKeyID", 3 ); | 93 | config.writeEntry( "dot11WEPDefaultKeyID", 3 ); |
94 | } | 94 | } |
95 | config.writeEntry( "dot11WEPDefaultKey0", keyLineEdit0->text() ); | 95 | config.writeEntry( "dot11WEPDefaultKey0", keyLineEdit0->text() ); |
96 | config.writeEntry( "dot11WEPDefaultKey1", keyLineEdit1->text() ); | 96 | config.writeEntry( "dot11WEPDefaultKey1", keyLineEdit1->text() ); |
97 | config.writeEntry( "dot11WEPDefaultKey2", keyLineEdit2->text() ); | 97 | config.writeEntry( "dot11WEPDefaultKey2", keyLineEdit2->text() ); |
98 | config.writeEntry( "dot11WEPDefaultKey3", keyLineEdit3->text() ); | 98 | config.writeEntry( "dot11WEPDefaultKey3", keyLineEdit3->text() ); |
99 | return writeWirelessOpts( config ); | 99 | return writeWirelessOpts( config ); |
100 | // return TRUE; | 100 | // return TRUE; |
101 | } | 101 | } |
102 | 102 | ||
103 | /** | 103 | /** |
104 | */ | 104 | */ |
105 | void WLANImp::accept() | 105 | void WLANImp::accept() |
106 | { | 106 | { |
107 | if ( writeConfig() ) | 107 | if ( writeConfig() ) |
108 | QDialog::accept(); | 108 | QDialog::accept(); |
109 | } | 109 | } |
110 | 110 | ||
111 | void WLANImp::done ( int r ) | 111 | void WLANImp::done ( int r ) |
112 | { | 112 | { |
113 | QDialog::done ( r ); | 113 | QDialog::done ( r ); |
114 | close ( ); | 114 | close ( ); |
115 | } | 115 | } |
116 | 116 | ||
117 | bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) | 117 | bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) |
118 | { | 118 | { |
119 | qWarning( "WLANImp::writeWirelessOpts entered." ); | 119 | qWarning( "WLANImp::writeWirelessOpts entered." ); |
120 | QString prev = "/etc/pcmcia/wireless.opts"; | 120 | QString prev = "/etc/pcmcia/wireless.opts"; |
121 | QFile prevFile(prev); | 121 | QFile prevFile(prev); |
122 | if ( !prevFile.open( IO_ReadOnly ) ) | 122 | if ( !prevFile.open( IO_ReadOnly ) ) |
123 | return FALSE; | 123 | return FALSE; |
124 | 124 | ||
diff --git a/noncore/net/networksetup/wlan/wlanmodule.cpp b/noncore/net/networksetup/wlan/wlanmodule.cpp index 321fa11..98d2eb6 100644 --- a/noncore/net/networksetup/wlan/wlanmodule.cpp +++ b/noncore/net/networksetup/wlan/wlanmodule.cpp | |||
@@ -22,34 +22,34 @@ QString WLANModule::getPixmapName(Interface* ){ | |||
22 | * Check to see if the interface i is owned by this module. | 22 | * Check to see if the interface i is owned by this module. |
23 | * @param Interface* interface to check against | 23 | * @param Interface* interface to check against |
24 | * @return bool true if i is owned by this module, false otherwise. | 24 | * @return bool true if i is owned by this module, false otherwise. |
25 | */ | 25 | */ |
26 | bool WLANModule::isOwner(Interface *i){ | 26 | bool WLANModule::isOwner(Interface *i){ |
27 | if(i->getInterfaceName() == "eth0" || i->getInterfaceName() == "wlan0") | 27 | if(i->getInterfaceName() == "eth0" || i->getInterfaceName() == "wlan0") |
28 | return true; | 28 | return true; |
29 | return false; | 29 | return false; |
30 | } | 30 | } |
31 | 31 | ||
32 | /** | 32 | /** |
33 | * Create, set tabWiget and return the WLANConfigure Module | 33 | * Create, set tabWiget and return the WLANConfigure Module |
34 | * @param tabWidget a pointer to the tab widget that this configure has. | 34 | * @param tabWidget a pointer to the tab widget that this configure has. |
35 | * @return QWidget* pointer to the tab widget in this modules configure. | 35 | * @return QWidget* pointer to the tab widget in this modules configure. |
36 | */ | 36 | */ |
37 | QWidget *WLANModule::configure(QTabWidget **tabWidget){ | 37 | QWidget *WLANModule::configure(QTabWidget **tabWidget){ |
38 | Config cfg("wireless"); | 38 | Config *cfg = new Config("wireless"); |
39 | WLANImp *wlanconfig = new WLANImp(cfg); | 39 | WLANImp *wlanconfig = new WLANImp(*cfg); |
40 | (*tabWidget) = wlanconfig->tabWidget; | 40 | (*tabWidget) = wlanconfig->tabWidget; |
41 | return wlanconfig; | 41 | return wlanconfig; |
42 | } | 42 | } |
43 | 43 | ||
44 | /** | 44 | /** |
45 | * Create, set tabWiget and return the Information Module | 45 | * Create, set tabWiget and return the Information Module |
46 | * @param tabWidget a pointer to the tab widget that this information has. | 46 | * @param tabWidget a pointer to the tab widget that this information has. |
47 | * @return QWidget* pointer to the tab widget in this modules info. | 47 | * @return QWidget* pointer to the tab widget in this modules info. |
48 | */ | 48 | */ |
49 | QWidget *WLANModule::information(QTabWidget **tabWidget){ | 49 | QWidget *WLANModule::information(QTabWidget **tabWidget){ |
50 | return NULL; | 50 | return NULL; |
51 | } | 51 | } |
52 | 52 | ||
53 | /** | 53 | /** |
54 | * Get all active (up or down) interfaces | 54 | * Get all active (up or down) interfaces |
55 | * @return QList<Interface> A list of interfaces that exsist that havn't | 55 | * @return QList<Interface> A list of interfaces that exsist that havn't |
diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp index 60ffeeb..806643d 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp.cpp | |||
@@ -91,34 +91,34 @@ bool WLANImp::writeConfig() | |||
91 | config.writeEntry( "dot11WEPDefaultKeyID", 2 ); | 91 | config.writeEntry( "dot11WEPDefaultKeyID", 2 ); |
92 | } else if( keyRadio3->isChecked() ){ | 92 | } else if( keyRadio3->isChecked() ){ |
93 | config.writeEntry( "dot11WEPDefaultKeyID", 3 ); | 93 | config.writeEntry( "dot11WEPDefaultKeyID", 3 ); |
94 | } | 94 | } |
95 | config.writeEntry( "dot11WEPDefaultKey0", keyLineEdit0->text() ); | 95 | config.writeEntry( "dot11WEPDefaultKey0", keyLineEdit0->text() ); |
96 | config.writeEntry( "dot11WEPDefaultKey1", keyLineEdit1->text() ); | 96 | config.writeEntry( "dot11WEPDefaultKey1", keyLineEdit1->text() ); |
97 | config.writeEntry( "dot11WEPDefaultKey2", keyLineEdit2->text() ); | 97 | config.writeEntry( "dot11WEPDefaultKey2", keyLineEdit2->text() ); |
98 | config.writeEntry( "dot11WEPDefaultKey3", keyLineEdit3->text() ); | 98 | config.writeEntry( "dot11WEPDefaultKey3", keyLineEdit3->text() ); |
99 | return writeWirelessOpts( config ); | 99 | return writeWirelessOpts( config ); |
100 | // return TRUE; | 100 | // return TRUE; |
101 | } | 101 | } |
102 | 102 | ||
103 | /** | 103 | /** |
104 | */ | 104 | */ |
105 | void WLANImp::accept() | 105 | void WLANImp::accept() |
106 | { | 106 | { |
107 | if ( writeConfig() ) | 107 | if ( writeConfig() ) |
108 | QDialog::accept(); | 108 | QDialog::accept(); |
109 | } | 109 | } |
110 | 110 | ||
111 | void WLANImp::done ( int r ) | 111 | void WLANImp::done ( int r ) |
112 | { | 112 | { |
113 | QDialog::done ( r ); | 113 | QDialog::done ( r ); |
114 | close ( ); | 114 | close ( ); |
115 | } | 115 | } |
116 | 116 | ||
117 | bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) | 117 | bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) |
118 | { | 118 | { |
119 | qWarning( "WLANImp::writeWirelessOpts entered." ); | 119 | qWarning( "WLANImp::writeWirelessOpts entered." ); |
120 | QString prev = "/etc/pcmcia/wireless.opts"; | 120 | QString prev = "/etc/pcmcia/wireless.opts"; |
121 | QFile prevFile(prev); | 121 | QFile prevFile(prev); |
122 | if ( !prevFile.open( IO_ReadOnly ) ) | 122 | if ( !prevFile.open( IO_ReadOnly ) ) |
123 | return FALSE; | 123 | return FALSE; |
124 | 124 | ||
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp index 321fa11..98d2eb6 100644 --- a/noncore/settings/networksettings/wlan/wlanmodule.cpp +++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp | |||
@@ -22,34 +22,34 @@ QString WLANModule::getPixmapName(Interface* ){ | |||
22 | * Check to see if the interface i is owned by this module. | 22 | * Check to see if the interface i is owned by this module. |
23 | * @param Interface* interface to check against | 23 | * @param Interface* interface to check against |
24 | * @return bool true if i is owned by this module, false otherwise. | 24 | * @return bool true if i is owned by this module, false otherwise. |
25 | */ | 25 | */ |
26 | bool WLANModule::isOwner(Interface *i){ | 26 | bool WLANModule::isOwner(Interface *i){ |
27 | if(i->getInterfaceName() == "eth0" || i->getInterfaceName() == "wlan0") | 27 | if(i->getInterfaceName() == "eth0" || i->getInterfaceName() == "wlan0") |
28 | return true; | 28 | return true; |
29 | return false; | 29 | return false; |
30 | } | 30 | } |
31 | 31 | ||
32 | /** | 32 | /** |
33 | * Create, set tabWiget and return the WLANConfigure Module | 33 | * Create, set tabWiget and return the WLANConfigure Module |
34 | * @param tabWidget a pointer to the tab widget that this configure has. | 34 | * @param tabWidget a pointer to the tab widget that this configure has. |
35 | * @return QWidget* pointer to the tab widget in this modules configure. | 35 | * @return QWidget* pointer to the tab widget in this modules configure. |
36 | */ | 36 | */ |
37 | QWidget *WLANModule::configure(QTabWidget **tabWidget){ | 37 | QWidget *WLANModule::configure(QTabWidget **tabWidget){ |
38 | Config cfg("wireless"); | 38 | Config *cfg = new Config("wireless"); |
39 | WLANImp *wlanconfig = new WLANImp(cfg); | 39 | WLANImp *wlanconfig = new WLANImp(*cfg); |
40 | (*tabWidget) = wlanconfig->tabWidget; | 40 | (*tabWidget) = wlanconfig->tabWidget; |
41 | return wlanconfig; | 41 | return wlanconfig; |
42 | } | 42 | } |
43 | 43 | ||
44 | /** | 44 | /** |
45 | * Create, set tabWiget and return the Information Module | 45 | * Create, set tabWiget and return the Information Module |
46 | * @param tabWidget a pointer to the tab widget that this information has. | 46 | * @param tabWidget a pointer to the tab widget that this information has. |
47 | * @return QWidget* pointer to the tab widget in this modules info. | 47 | * @return QWidget* pointer to the tab widget in this modules info. |
48 | */ | 48 | */ |
49 | QWidget *WLANModule::information(QTabWidget **tabWidget){ | 49 | QWidget *WLANModule::information(QTabWidget **tabWidget){ |
50 | return NULL; | 50 | return NULL; |
51 | } | 51 | } |
52 | 52 | ||
53 | /** | 53 | /** |
54 | * Get all active (up or down) interfaces | 54 | * Get all active (up or down) interfaces |
55 | * @return QList<Interface> A list of interfaces that exsist that havn't | 55 | * @return QList<Interface> A list of interfaces that exsist that havn't |