summaryrefslogtreecommitdiff
authorzecke <zecke>2004-09-10 11:16:54 (UTC)
committer zecke <zecke>2004-09-10 11:16:54 (UTC)
commit59dbb076579e0387f960525b415511946eb83b17 (patch) (unidiff)
treedc8caeebf7e5a1968a399838b53cb09a1537d9ec
parentb8baf551919868737c6f56a05e6efa1bad4d97ac (diff)
downloadopie-59dbb076579e0387f960525b415511946eb83b17.zip
opie-59dbb076579e0387f960525b415511946eb83b17.tar.gz
opie-59dbb076579e0387f960525b415511946eb83b17.tar.bz2
Fix the issues the compilers bothers
remove unused parameters, give return values on return
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.cpp2
-rw-r--r--noncore/settings/networksettings/mainwindow/addconnectionimp.cpp2
-rw-r--r--noncore/settings/networksettings/ppp/connect.cpp3
-rw-r--r--noncore/settings/networksettings/ppp/devices.cpp2
-rw-r--r--noncore/settings/networksettings/ppp/edit.cpp2
-rw-r--r--noncore/settings/networksettings/ppp/interfaceinformationppp.cpp2
-rw-r--r--noncore/settings/networksettings/ppp/pppmodule.cpp3
-rw-r--r--noncore/settings/networksettings/ppp/pppmodule.h2
-rw-r--r--noncore/settings/networksettings/wlan/keyedit.cpp4
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp2.cpp1
10 files changed, 12 insertions, 11 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
index 8498759..62b1b7a 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
+++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
@@ -4,49 +4,49 @@
4#include <qcheckbox.h> 4#include <qcheckbox.h>
5#include <qlineedit.h> 5#include <qlineedit.h>
6#include <qspinbox.h> 6#include <qspinbox.h>
7#include <qgroupbox.h> 7#include <qgroupbox.h>
8#include <qlabel.h> 8#include <qlabel.h>
9 9
10#include <qmessagebox.h> 10#include <qmessagebox.h>
11 11
12#include <opie2/oprocess.h> 12#include <opie2/oprocess.h>
13 13
14#ifdef QWS 14#ifdef QWS
15#include <opie2/owait.h> 15#include <opie2/owait.h>
16#include <opie2/odebug.h> 16#include <opie2/odebug.h>
17#include <qpe/global.h> 17#include <qpe/global.h>
18#include <qapplication.h> 18#include <qapplication.h>
19#endif 19#endif
20 20
21#define DNSSCRIPT "changedns" 21#define DNSSCRIPT "changedns"
22 22
23/** 23/**
24 * Constuctor. Set up the connection. A profile must be set. 24 * Constuctor. Set up the connection. A profile must be set.
25 */ 25 */
26using namespace Opie::Ui; 26using namespace Opie::Ui;
27using namespace Opie::Core; 27using namespace Opie::Core;
28InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, Interfaces *j, WFlags fl) : InterfaceSetup(parent, name, fl), interface(i), interfaces(j), delInterfaces(false){ 28InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, Interfaces *j, WFlags fl) : InterfaceSetup(parent, name, fl), interfaces(j), interface(i), delInterfaces(false){
29 if (j == 0) { 29 if (j == 0) {
30 delInterfaces = true; 30 delInterfaces = true;
31 interfaces = new Interfaces; 31 interfaces = new Interfaces;
32 } 32 }
33} 33}
34 34
35/** 35/**
36 * Destructor 36 * Destructor
37 */ 37 */
38InterfaceSetupImp::~InterfaceSetupImp(){ 38InterfaceSetupImp::~InterfaceSetupImp(){
39 if(delInterfaces) { 39 if(delInterfaces) {
40 delete interfaces; 40 delete interfaces;
41 } 41 }
42} 42}
43 43
44/** 44/**
45 * Save the current settings, then write out the interfaces file and close. 45 * Save the current settings, then write out the interfaces file and close.
46 */ 46 */
47bool InterfaceSetupImp::saveChanges(){ 47bool InterfaceSetupImp::saveChanges(){
48 bool error; 48 bool error;
49 QString iface = interfaces->getInterfaceName(error); 49 QString iface = interfaces->getInterfaceName(error);
50 odebug << "InterfaceSetupImp::saveChanges saves interface " << iface.latin1() << "" << oendl; 50 odebug << "InterfaceSetupImp::saveChanges saves interface " << iface.latin1() << "" << oendl;
51 if(!saveSettings()) 51 if(!saveSettings())
52 return false; 52 return false;
diff --git a/noncore/settings/networksettings/mainwindow/addconnectionimp.cpp b/noncore/settings/networksettings/mainwindow/addconnectionimp.cpp
index f18d8d1..84f1cf6 100644
--- a/noncore/settings/networksettings/mainwindow/addconnectionimp.cpp
+++ b/noncore/settings/networksettings/mainwindow/addconnectionimp.cpp
@@ -12,30 +12,30 @@
12 * Constructor 12 * Constructor
13 */ 13 */
14AddConnectionImp::AddConnectionImp(QWidget *parent, const char *name, WFlags f):AddConnection(parent, name, f){ 14AddConnectionImp::AddConnectionImp(QWidget *parent, const char *name, WFlags f):AddConnection(parent, name, f){
15 connect(registeredServicesList, SIGNAL(selectionChanged()), this, SLOT(changed())); 15 connect(registeredServicesList, SIGNAL(selectionChanged()), this, SLOT(changed()));
16 registeredServicesList->header()->hide(); 16 registeredServicesList->header()->hide();
17}; 17};
18 18
19/** 19/**
20 * The current item changed, update the discription. 20 * The current item changed, update the discription.
21 */ 21 */
22void AddConnectionImp::changed(){ 22void AddConnectionImp::changed(){
23 QListViewItem *item = registeredServicesList->currentItem(); 23 QListViewItem *item = registeredServicesList->currentItem();
24 if(item) 24 if(item)
25 help->setText(list[item->text(0)]); 25 help->setText(list[item->text(0)]);
26} 26}
27 27
28/** 28/**
29 * Save a copy of newList for the discriptions and append them all to the view 29 * Save a copy of newList for the discriptions and append them all to the view
30 * @param newList the new list of possible interfaces 30 * @param newList the new list of possible interfaces
31 */ 31 */
32void AddConnectionImp::addConnections(const QMap<QString, QString> &newList){ 32void AddConnectionImp::addConnections(const QMap<QString, QString> &newList){
33 list = newList; 33 list = newList;
34 QMap<QString, QString>::Iterator it; 34 QMap<QString, QString>::Iterator it;
35 for( it = list.begin(); it != list.end(); ++it ) 35 for( it = list.begin(); it != list.end(); ++it )
36 QListViewItem *item = new QListViewItem(registeredServicesList, it.key()); 36 (void)new QListViewItem(registeredServicesList, it.key());
37 registeredServicesList->setCurrentItem(registeredServicesList->firstChild()); 37 registeredServicesList->setCurrentItem(registeredServicesList->firstChild());
38} 38}
39 39
40// addserviceimp.cpp 40// addserviceimp.cpp
41 41
diff --git a/noncore/settings/networksettings/ppp/connect.cpp b/noncore/settings/networksettings/ppp/connect.cpp
index 24d33f4..128877a 100644
--- a/noncore/settings/networksettings/ppp/connect.cpp
+++ b/noncore/settings/networksettings/ppp/connect.cpp
@@ -192,49 +192,50 @@ void ConnectWidget::init() {
192 firstrunID = true; 192 firstrunID = true;
193 firstrunPW = true; 193 firstrunPW = true;
194// stats->totalbytes = 0; 194// stats->totalbytes = 0;
195 dialnumber = 0; 195 dialnumber = 0;
196 196
197// p_kppp->con_speed = ""; 197// p_kppp->con_speed = "";
198 198
199// p_kppp->setQuitOnDisconnect (p_kppp->quitOnDisconnect() || _ifaceppp->data()->quit_on_disconnect()); 199// p_kppp->setQuitOnDisconnect (p_kppp->quitOnDisconnect() || _ifaceppp->data()->quit_on_disconnect());
200 200
201 comlist = &_ifaceppp->data()->scriptType(); 201 comlist = &_ifaceppp->data()->scriptType();
202 arglist = &_ifaceppp->data()->script(); 202 arglist = &_ifaceppp->data()->script();
203 203
204 QString tit = QObject::tr("Connecting to: %1").arg(_ifaceppp->data()->accname()); 204 QString tit = QObject::tr("Connecting to: %1").arg(_ifaceppp->data()->accname());
205 setCaption(tit); 205 setCaption(tit);
206 206
207 qApp->processEvents(); 207 qApp->processEvents();
208 208
209 // run the "before-connect" command 209 // run the "before-connect" command
210 if (!_ifaceppp->data()->command_before_connect().isEmpty()) { 210 if (!_ifaceppp->data()->command_before_connect().isEmpty()) {
211 messg->setText(QObject::tr("Running pre-startup command...")); 211 messg->setText(QObject::tr("Running pre-startup command..."));
212 emit debugMessage(QObject::tr("Running pre-startup command...")); 212 emit debugMessage(QObject::tr("Running pre-startup command..."));
213 213
214 qApp->processEvents(); 214 qApp->processEvents();
215 QApplication::flushX(); 215 QApplication::flushX();
216 pid_t id = execute_command(_ifaceppp->data()->command_before_connect()); 216 (void)execute_command(_ifaceppp->data()->command_before_connect());
217
217// int i, status; 218// int i, status;
218 219
219// do { 220// do {
220// qApp->processEvents(); 221// qApp->processEvents();
221// i = waitpid(id, &status, WNOHANG); 222// i = waitpid(id, &status, WNOHANG);
222// usleep(100000); 223// usleep(100000);
223// } while (i == 0 && errno == 0); 224// } while (i == 0 && errno == 0);
224 } 225 }
225 226
226 int lock = _ifaceppp->modem()->lockdevice(); 227 int lock = _ifaceppp->modem()->lockdevice();
227 228
228 if (lock == 1) { 229 if (lock == 1) {
229 messg->setText(QObject::tr("Modem device is locked.")); 230 messg->setText(QObject::tr("Modem device is locked."));
230 vmain = 20; // wait until cancel is pressed 231 vmain = 20; // wait until cancel is pressed
231 return; 232 return;
232 } 233 }
233 234
234 if (lock == -1) { 235 if (lock == -1) {
235 messg->setText(QObject::tr("Unable to create modem lock file.")); 236 messg->setText(QObject::tr("Unable to create modem lock file."));
236 vmain = 20; // wait until cancel is pressed 237 vmain = 20; // wait until cancel is pressed
237 return; 238 return;
238 } 239 }
239 240
240 if(_ifaceppp->modem()->opentty()) { 241 if(_ifaceppp->modem()->opentty()) {
diff --git a/noncore/settings/networksettings/ppp/devices.cpp b/noncore/settings/networksettings/ppp/devices.cpp
index 42de44c..e2c67d8 100644
--- a/noncore/settings/networksettings/ppp/devices.cpp
+++ b/noncore/settings/networksettings/ppp/devices.cpp
@@ -66,49 +66,49 @@ DevicesWidget::DevicesWidget( InterfacePPP* ip, QWidget *parent, const char *nam
66 "settings of the selected device are copied\n" 66 "settings of the selected device are copied\n"
67 "to a new device, that you can modify to fit your\n" 67 "to a new device, that you can modify to fit your\n"
68 "needs")); 68 "needs"));
69 QWhatsThis::add(delete_b, 69 QWhatsThis::add(delete_b,
70 tr("<p>Deletes the selected device\n\n" 70 tr("<p>Deletes the selected device\n\n"
71 "<font color=\"red\"><b>Use with care!</b></font>")); 71 "<font color=\"red\"><b>Use with care!</b></font>"));
72 72
73 copy_b->setEnabled( false ); //FIXME 73 copy_b->setEnabled( false ); //FIXME
74// delete_b->setEnabled( false ); //FIXME 74// delete_b->setEnabled( false ); //FIXME
75 75
76 QStringList tmp = _pppdata->getDevicesNamesList(); 76 QStringList tmp = _pppdata->getDevicesNamesList();
77 odebug << "DevicesWidget::DevicesWidget got devices " << tmp.join("--").latin1() << "" << oendl; 77 odebug << "DevicesWidget::DevicesWidget got devices " << tmp.join("--").latin1() << "" << oendl;
78 listListbox->insertStringList(tmp); 78 listListbox->insertStringList(tmp);
79 79
80 for (uint i = 0; i < listListbox->count(); i++){ 80 for (uint i = 0; i < listListbox->count(); i++){
81 odebug << "listListbox->text(i) " << listListbox->text(i).latin1() << " == _pppdata->devname() " << _pppdata->devname().latin1() << "" << oendl; 81 odebug << "listListbox->text(i) " << listListbox->text(i).latin1() << " == _pppdata->devname() " << _pppdata->devname().latin1() << "" << oendl;
82 if ( listListbox->text(i) == _pppdata->devname() ) 82 if ( listListbox->text(i) == _pppdata->devname() )
83 listListbox->setCurrentItem( i ); 83 listListbox->setCurrentItem( i );
84 } 84 }
85} 85}
86 86
87 87
88 88
89void DevicesWidget::slotListBoxSelect(int idx) { 89void DevicesWidget::slotListBoxSelect(int idx) {
90 bool ok = _pppdata->setDevice( listListbox->text(idx) ); 90 _pppdata->setDevice( listListbox->text(idx) );
91 delete_b->setEnabled((bool)(idx != -1)); 91 delete_b->setEnabled((bool)(idx != -1));
92 edit_b->setEnabled((bool)(idx != -1)); 92 edit_b->setEnabled((bool)(idx != -1));
93//FIXME copy_b->setEnabled((bool)(idx != -1)); 93//FIXME copy_b->setEnabled((bool)(idx != -1));
94} 94}
95 95
96void DevicesWidget::edit() { 96void DevicesWidget::edit() {
97 _pppdata->setDevice(listListbox->text(listListbox->currentItem())); 97 _pppdata->setDevice(listListbox->text(listListbox->currentItem()));
98 98
99 int result = doTab(); 99 int result = doTab();
100 100
101 if(result == QDialog::Accepted) { 101 if(result == QDialog::Accepted) {
102 listListbox->changeItem(_pppdata->devname(),listListbox->currentItem()); 102 listListbox->changeItem(_pppdata->devname(),listListbox->currentItem());
103 _pppdata->save(); 103 _pppdata->save();
104 } 104 }
105} 105}
106 106
107 107
108void DevicesWidget::create() { 108void DevicesWidget::create() {
109 109
110// if(listListbox->count() == MAX_ACCOUNTS) { 110// if(listListbox->count() == MAX_ACCOUNTS) {
111// QMessageBox::information(this, "sorry", 111// QMessageBox::information(this, "sorry",
112// tr("Maximum number of accounts reached.")); 112// tr("Maximum number of accounts reached."));
113// return; 113// return;
114// } 114// }
diff --git a/noncore/settings/networksettings/ppp/edit.cpp b/noncore/settings/networksettings/ppp/edit.cpp
index 3b2393c..6c9735c 100644
--- a/noncore/settings/networksettings/ppp/edit.cpp
+++ b/noncore/settings/networksettings/ppp/edit.cpp
@@ -1181,31 +1181,31 @@ PhoneNumberDialog::PhoneNumberDialog(QWidget *parent)
1181 QLabel *label = new QLabel(this, tr("Enter a phone number:")); 1181 QLabel *label = new QLabel(this, tr("Enter a phone number:"));
1182 layout->addWidget( label ); 1182 layout->addWidget( label );
1183 1183
1184 le = new QLineEdit(this, "lineEdit"); 1184 le = new QLineEdit(this, "lineEdit");
1185 layout->addWidget( le ); 1185 layout->addWidget( le );
1186 1186
1187 connect(le, SIGNAL(textChanged(const QString&)), 1187 connect(le, SIGNAL(textChanged(const QString&)),
1188 this, SLOT(textChanged(const QString&))); 1188 this, SLOT(textChanged(const QString&)));
1189 1189
1190 le->setFocus(); 1190 le->setFocus();
1191 textChanged(""); 1191 textChanged("");
1192 1192
1193 1193
1194} 1194}
1195 1195
1196 1196
1197QString PhoneNumberDialog::phoneNumber() 1197QString PhoneNumberDialog::phoneNumber()
1198{ 1198{
1199 QString s = le->text(); 1199 QString s = le->text();
1200 1200
1201 return s; 1201 return s;
1202} 1202}
1203 1203
1204 1204
1205void PhoneNumberDialog::textChanged(const QString &s) 1205void PhoneNumberDialog::textChanged(const QString &)
1206{ 1206{
1207 // enableButtonOK(s.length() > 0); 1207 // enableButtonOK(s.length() > 0);
1208} 1208}
1209 1209
1210 1210
1211//#include "edit.moc" 1211//#include "edit.moc"
diff --git a/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp b/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp
index 4755aed..56e1c1f 100644
--- a/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp
+++ b/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp
@@ -1,45 +1,45 @@
1#include "interfaceinformationppp.h" 1#include "interfaceinformationppp.h"
2#include "connect.h" 2#include "connect.h"
3#include "conwindow.h" 3#include "conwindow.h"
4 4
5/* OPIE */ 5/* OPIE */
6#include <opie2/odebug.h> 6#include <opie2/odebug.h>
7using namespace Opie::Core; 7using namespace Opie::Core;
8 8
9/* QT */ 9/* QT */
10#include <qpushbutton.h> 10#include <qpushbutton.h>
11#include <qlabel.h> 11#include <qlabel.h>
12#include <qmessagebox.h> 12#include <qmessagebox.h>
13#include <qabstractlayout.h> 13#include <qabstractlayout.h>
14 14
15#ifdef QWS 15#ifdef QWS
16#else 16#else
17 #define showMaximized show 17 #define showMaximized show
18#endif 18#endif
19 19
20/** 20/**
21 * Constructor for the InterfaceInformationImp class. This class pretty much 21 * Constructor for the InterfaceInformationImp class. This class pretty much
22 * just display's information about the interface that is passed to it. 22 * just display's information about the interface that is passed to it.
23 */ 23 */
24InterfaceInformationPPP::InterfaceInformationPPP(QWidget *parent, const char *name, Interface *i, WFlags f) 24InterfaceInformationPPP::InterfaceInformationPPP(QWidget *parent, const char *name, Interface *i, WFlags )
25 :InterfaceInformationImp(parent, name, i, Qt::WStyle_ContextHelp) 25 :InterfaceInformationImp(parent, name, i, Qt::WStyle_ContextHelp)
26{ 26{
27 odebug << "InterfaceInformationPPP::InterfaceInformationPPP " << name << "" << oendl; 27 odebug << "InterfaceInformationPPP::InterfaceInformationPPP " << name << "" << oendl;
28 con = new ConnectWidget( (InterfacePPP*)i, this, "con" ); 28 con = new ConnectWidget( (InterfacePPP*)i, this, "con" );
29 con->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding, 29 con->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding,
30 QSizePolicy::Fixed) ); 30 QSizePolicy::Fixed) );
31 31
32 macAddressLabel->hide(); 32 macAddressLabel->hide();
33 subnetMaskLabel->hide(); 33 subnetMaskLabel->hide();
34 broadcastLabel->hide(); 34 broadcastLabel->hide();
35 TextLabel23->hide(); 35 TextLabel23->hide();
36 TextLabel21->hide(); 36 TextLabel21->hide();
37 TextLabel24->hide(); 37 TextLabel24->hide();
38 38
39 InterfaceInformationLayout->addWidget( con, 1, 0 ); 39 InterfaceInformationLayout->addWidget( con, 1, 0 );
40 connect(i, SIGNAL(begin_connect()),con, SLOT(preinit())); 40 connect(i, SIGNAL(begin_connect()),con, SLOT(preinit()));
41 connect(i, SIGNAL(hangup_now() ), con, SLOT(cancelbutton() ) ); 41 connect(i, SIGNAL(hangup_now() ), con, SLOT(cancelbutton() ) );
42} 42}
43 43
44 44
45 45
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp
index fb279ee..dec0177 100644
--- a/noncore/settings/networksettings/ppp/pppmodule.cpp
+++ b/noncore/settings/networksettings/ppp/pppmodule.cpp
@@ -156,54 +156,55 @@ QWidget *PPPModule::configure(Interface *i)
156 * @return QWidget* pointer to this modules info. 156 * @return QWidget* pointer to this modules info.
157 */ 157 */
158QWidget *PPPModule::information(Interface *i) 158QWidget *PPPModule::information(Interface *i)
159{ 159{
160 // We don't have any advanced pppd information widget yet :-D 160 // We don't have any advanced pppd information widget yet :-D
161 // TODO ^ 161 // TODO ^
162 162
163 return new InterfaceInformationPPP( 0, "InterfaceInformationPPP", i ); 163 return new InterfaceInformationPPP( 0, "InterfaceInformationPPP", i );
164} 164}
165 165
166/** 166/**
167 * Get all active (up or down) interfaces 167 * Get all active (up or down) interfaces
168 * @return QList<Interface> A list of interfaces that exsist that havn't 168 * @return QList<Interface> A list of interfaces that exsist that havn't
169 * been called by isOwner() 169 * been called by isOwner()
170 */ 170 */
171QList<Interface> PPPModule::getInterfaces() 171QList<Interface> PPPModule::getInterfaces()
172{ 172{
173 // List all of the files in the peer directory 173 // List all of the files in the peer directory
174 odebug << "PPPModule::getInterfaces" << oendl; 174 odebug << "PPPModule::getInterfaces" << oendl;
175 return list; 175 return list;
176} 176}
177 177
178/** 178/**
179 * Attempt to add a new interface as defined by name 179 * Attempt to add a new interface as defined by name
180 * @param name the name of the type of interface that should be created given 180 * @param newInterface the name of the type of interface that should be created given
181 * by possibleNewInterfaces(); 181 * by possibleNewInterfaces();
182 * @return Interface* NULL if it was unable to be created. 182 * @return Interface* NULL if it was unable to be created.
183 */ 183 */
184Interface *PPPModule::addNewInterface(const QString &newInterface) 184Interface *PPPModule::addNewInterface(const QString &newInterface)
185{ 185{
186 Q_CONST_UNUSED( newInterface )
186 187
187 InterfacePPP *ifaceppp; 188 InterfacePPP *ifaceppp;
188 Interface *iface; 189 Interface *iface;
189 ifaceppp = new InterfacePPP(); 190 ifaceppp = new InterfacePPP();
190 PPPConfigWidget imp(ifaceppp, 0, "PPPConfigImp", true); 191 PPPConfigWidget imp(ifaceppp, 0, "PPPConfigImp", true);
191 192
192 if( QPEApplication::execDialog( &imp ) == QDialog::Accepted ) 193 if( QPEApplication::execDialog( &imp ) == QDialog::Accepted )
193 { 194 {
194 iface = (InterfacePPP*) ifaceppp; 195 iface = (InterfacePPP*) ifaceppp;
195 iface->setModuleOwner( this ); 196 iface->setModuleOwner( this );
196 list.append( iface ); 197 list.append( iface );
197 return iface; 198 return iface;
198 } 199 }
199 else 200 else
200 { 201 {
201 delete ifaceppp; 202 delete ifaceppp;
202 iface = NULL; 203 iface = NULL;
203 } 204 }
204 return iface; 205 return iface;
205} 206}
206 207
207/** 208/**
208 * Attempts to remove the interface, doesn't delete i 209 * Attempts to remove the interface, doesn't delete i
209 * @return bool true if successful, false otherwise. 210 * @return bool true if successful, false otherwise.
diff --git a/noncore/settings/networksettings/ppp/pppmodule.h b/noncore/settings/networksettings/ppp/pppmodule.h
index de649e4..1ecbf7a 100644
--- a/noncore/settings/networksettings/ppp/pppmodule.h
+++ b/noncore/settings/networksettings/ppp/pppmodule.h
@@ -1,43 +1,43 @@
1#ifndef PPP_MODULE_H 1#ifndef PPP_MODULE_H
2#define PPP_MODULE_H 2#define PPP_MODULE_H
3 3
4#include "module.h" 4#include "module.h"
5 5
6class PPPModule : Module { 6class PPPModule : Module {
7 7
8signals: 8signals:
9 void updateInterface(Interface *i); 9 void updateInterface(Interface *i);
10 10
11public: 11public:
12 PPPModule(); 12 PPPModule();
13 ~PPPModule(); 13 ~PPPModule();
14 14
15 virtual const QString type() {return "ppp";}; 15 virtual const QString type() {return "ppp";};
16 virtual void setProfile(const QString &newProfile); 16 virtual void setProfile(const QString &newProfile);
17 virtual bool isOwner(Interface *); 17 virtual bool isOwner(Interface *);
18 virtual QWidget *configure(Interface *i); 18 virtual QWidget *configure(Interface *i);
19 virtual QWidget *information(Interface *i); 19 virtual QWidget *information(Interface *i);
20 virtual QList<Interface> getInterfaces(); 20 virtual QList<Interface> getInterfaces();
21 virtual void possibleNewInterfaces(QMap<QString, QString> &); 21 virtual void possibleNewInterfaces(QMap<QString, QString> &);
22 virtual Interface *addNewInterface(const QString &name); 22 virtual Interface *addNewInterface(const QString &name);
23 virtual bool remove(Interface* i); 23 virtual bool remove(Interface* i);
24 virtual QString getPixmapName(Interface* i); 24 virtual QString getPixmapName(Interface* i);
25 virtual void receive(const QCString &msg, const QByteArray &arg) {}; 25 virtual void receive(const QCString &, const QByteArray &) {};
26 26
27private: 27private:
28 QList<Interface> list; 28 QList<Interface> list;
29 QString profile; 29 QString profile;
30 30
31}; 31};
32 32
33extern "C" 33extern "C"
34{ 34{
35 void* create_plugin() { 35 void* create_plugin() {
36 return new PPPModule(); 36 return new PPPModule();
37 } 37 }
38}; 38};
39 39
40#endif 40#endif
41 41
42// pppmodule.h 42// pppmodule.h
43 43
diff --git a/noncore/settings/networksettings/wlan/keyedit.cpp b/noncore/settings/networksettings/wlan/keyedit.cpp
index 13a1c3b..62f8960 100644
--- a/noncore/settings/networksettings/wlan/keyedit.cpp
+++ b/noncore/settings/networksettings/wlan/keyedit.cpp
@@ -1,22 +1,22 @@
1#include "keyedit.h" 1#include "keyedit.h"
2#include <qlineedit.h> 2#include <qlineedit.h>
3 3
4KeyEdit::KeyEdit(QWidget* parent, const char* name) : 4KeyEdit::KeyEdit(QWidget* parent, const char* name) :
5 QLineEdit(parent, name) 5 QLineEdit(parent, name)
6{ 6{
7 setEchoMode(Password); 7 setEchoMode(Password);
8} 8}
9 9
10KeyEdit::~KeyEdit() 10KeyEdit::~KeyEdit()
11{ 11{
12} 12}
13 13
14void KeyEdit::focusInEvent(QFocusEvent *event) 14void KeyEdit::focusInEvent(QFocusEvent *)
15{ 15{
16 setEchoMode(Normal); 16 setEchoMode(Normal);
17} 17}
18 18
19void KeyEdit::focusOutEvent(QFocusEvent *event) 19void KeyEdit::focusOutEvent(QFocusEvent *)
20{ 20{
21 setEchoMode(Password); 21 setEchoMode(Password);
22} 22}
diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp
index d36a702..5cb78cf 100644
--- a/noncore/settings/networksettings/wlan/wlanimp2.cpp
+++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp
@@ -95,49 +95,48 @@ void WLANImp::parseOpts() {
95 opt = interfaces->getInterfaceOption("wireless_mode", error).simplifyWhiteSpace(); 95 opt = interfaces->getInterfaceOption("wireless_mode", error).simplifyWhiteSpace();
96 96
97 for ( int i = 0; i < mode->count(); i++) 97 for ( int i = 0; i < mode->count(); i++)
98 if ( mode->text( i ) == opt ) mode->setCurrentItem( i ); 98 if ( mode->text( i ) == opt ) mode->setCurrentItem( i );
99 99
100 opt = interfaces->getInterfaceOption("wireless_ap", error).simplifyWhiteSpace(); 100 opt = interfaces->getInterfaceOption("wireless_ap", error).simplifyWhiteSpace();
101 if (! opt.isNull()) { 101 if (! opt.isNull()) {
102 specifyAp->setChecked(true); 102 specifyAp->setChecked(true);
103 macEdit->setText(opt); 103 macEdit->setText(opt);
104 } 104 }
105 105
106 opt = interfaces->getInterfaceOption("wireless_channel", error).simplifyWhiteSpace(); 106 opt = interfaces->getInterfaceOption("wireless_channel", error).simplifyWhiteSpace();
107 if (! opt.isNull()) { 107 if (! opt.isNull()) {
108 specifyChan->setChecked(true); 108 specifyChan->setChecked(true);
109 networkChannel->setValue(opt.toInt()); 109 networkChannel->setValue(opt.toInt());
110 } 110 }
111 111
112 opt = interfaces->getInterfaceOption("wireless_key", error).simplifyWhiteSpace(); 112 opt = interfaces->getInterfaceOption("wireless_key", error).simplifyWhiteSpace();
113 if (opt.isNull()) 113 if (opt.isNull())
114 opt = interfaces->getInterfaceOption("wireless_enc", error).simplifyWhiteSpace(); 114 opt = interfaces->getInterfaceOption("wireless_enc", error).simplifyWhiteSpace();
115 parseKeyStr(opt); 115 parseKeyStr(opt);
116} 116}
117 117
118void WLANImp::parseKeyStr(QString keystr) { 118void WLANImp::parseKeyStr(QString keystr) {
119 int loc = 0;
120 int index = 1; 119 int index = 1;
121 QString key; 120 QString key;
122 QStringList keys = QStringList::split(QRegExp("\\s+"), keystr); 121 QStringList keys = QStringList::split(QRegExp("\\s+"), keystr);
123 int enc = -1; // encryption state 122 int enc = -1; // encryption state
124 123
125 for (QStringList::Iterator it = keys.begin(); it != keys.end(); ++it) { 124 for (QStringList::Iterator it = keys.begin(); it != keys.end(); ++it) {
126 if ((*it).left(3) == "off") { 125 if ((*it).left(3) == "off") {
127 // encryption disabled 126 // encryption disabled
128 enc = 0; 127 enc = 0;
129 } else if ((*it).left(2) == "on") { 128 } else if ((*it).left(2) == "on") {
130 // encryption enabled 129 // encryption enabled
131 enc = 1; 130 enc = 1;
132 } else if ((*it).left(4) == "open") { 131 } else if ((*it).left(4) == "open") {
133 // open mode, accept non encrypted packets 132 // open mode, accept non encrypted packets
134 acceptNonEnc->setChecked(true); 133 acceptNonEnc->setChecked(true);
135 } else if ((*it).left(10) == "restricted") { 134 } else if ((*it).left(10) == "restricted") {
136 // restricted mode, only accept encrypted packets 135 // restricted mode, only accept encrypted packets
137 rejectNonEnc->setChecked(true); 136 rejectNonEnc->setChecked(true);
138 } else if ((*it).left(3) == "key") { 137 } else if ((*it).left(3) == "key") {
139 // new set of options 138 // new set of options
140 } else if ((*it).left(1) == "[") { 139 } else if ((*it).left(1) == "[") {
141 index = (*it).mid(1, 1).toInt(); 140 index = (*it).mid(1, 1).toInt();
142 // switch current key to index 141 // switch current key to index
143 switch (index) { 142 switch (index) {