10 files changed, 40 insertions, 39 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 @@ -20,17 +20,17 @@ #define DNSSCRIPT "changedns" /** * Constuctor. Set up the connection. A profile must be set. */ using namespace Opie::Ui; using namespace Opie::Core; -InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, Interfaces *j, WFlags fl) : InterfaceSetup(parent, name, fl), interface(i), interfaces(j), delInterfaces(false){ +InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, Interfaces *j, WFlags fl) : InterfaceSetup(parent, name, fl), interfaces(j), interface(i), delInterfaces(false){ if (j == 0) { delInterfaces = true; interfaces = new Interfaces; } } /** * Destructor @@ -42,17 +42,17 @@ InterfaceSetupImp::~InterfaceSetupImp(){ } /** * Save the current settings, then write out the interfaces file and close. */ bool InterfaceSetupImp::saveChanges(){ bool error; QString iface = interfaces->getInterfaceName(error); - odebug << "InterfaceSetupImp::saveChanges saves interface " << iface.latin1() << "" << oendl; + odebug << "InterfaceSetupImp::saveChanges saves interface " << iface.latin1() << "" << oendl; if(!saveSettings()) return false; interfaces->write(); if (interface->getStatus()) { QString ifup; ifup += "ifdown "; @@ -68,17 +68,17 @@ bool InterfaceSetupImp::saveChanges(){ OWait *owait = new OWait(); Global::statusMessage( tr( "Restarting interface" ) ); owait->show(); qApp->processEvents(); if (!restart.start(OProcess::Block, OProcess::NoCommunication) ) { - owarn << "unstable to spawn ifdown/ifup" << oendl; + owarn << "unstable to spawn ifdown/ifup" << oendl; } owait->hide(); delete owait; interface->refresh(); } return true; @@ -153,27 +153,27 @@ void InterfaceSetupImp::setProfile(const QString &profile){ // See if we have to make a interface. if(!interfaces->setInterface(newInterfaceName)){ // Add making for this new interface if need too if(profile != ""){ interfaces->copyInterface(interface->getInterfaceName(), newInterfaceName); if(!interfaces->setMapping(interface->getInterfaceName())){ interfaces->addMapping(interface->getInterfaceName()); if(!interfaces->setMapping(interface->getInterfaceName())){ - odebug << "InterfaceSetupImp: Added Mapping, but still can't setInterface." << oendl; + odebug << "InterfaceSetupImp: Added Mapping, but still can't setInterface." << oendl; return; } } interfaces->setMap("map", newInterfaceName); interfaces->setScript("getprofile.sh"); } else{ interfaces->addInterface(newInterfaceName, INTERFACES_FAMILY_INET, INTERFACES_METHOD_DHCP); if(!interfaces->setInterface(newInterfaceName)){ - odebug << "InterfaceSetupImp: Added interface, but still can't setInterface." << oendl; + odebug << "InterfaceSetupImp: Added interface, but still can't setInterface." << oendl; return; } } } // We must have a valid interface to get this far so read some settings. // DHCP @@ -181,29 +181,29 @@ void InterfaceSetupImp::setProfile(const QString &profile){ if(interfaces->getInterfaceMethod(error) == INTERFACES_METHOD_DHCP) dhcpCheckBox->setChecked(true); else dhcpCheckBox->setChecked(false); // IP Information autoStart->setChecked(interfaces->isAuto(interface->getInterfaceName())); QString dns = interfaces->getInterfaceOption("up "DNSSCRIPT" -a", error); - odebug << "dns >" << dns.latin1() << "<" << oendl; + odebug << "dns >" << dns.latin1() << "<" << oendl; if(dns.contains(" ")){ firstDNSLineEdit->setText(dns.mid(0, dns.find(" "))); secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length())); }else firstDNSLineEdit->setText(dns); ipAddressEdit->setText(interfaces->getInterfaceOption("address", error)); subnetMaskEdit->setText(interfaces->getInterfaceOption("netmask", error)); if (subnetMaskEdit->text().isEmpty()) subnetMaskEdit->setText( "255.255.255.0" ); gatewayEdit->setText(interfaces->getInterfaceOption("gateway", error)); - owarn << "InterfaceSetupImp::setProfile(" << profile.latin1() << ")\n" << oendl; - owarn << "InterfaceSetupImp::setProfile: iface is " << interfaces->getInterfaceName(error).latin1() << "\n" << oendl; + owarn << "InterfaceSetupImp::setProfile(" << profile.latin1() << ")\n" << oendl; + owarn << "InterfaceSetupImp::setProfile: iface is " << interfaces->getInterfaceName(error).latin1() << "\n" << oendl; } // interfacesetup.cpp 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 @@ -5,37 +5,37 @@ #else #include <qptrlist.h> #endif #include <qlabel.h> #include <qheader.h> /** * Constructor - */ + */ AddConnectionImp::AddConnectionImp(QWidget *parent, const char *name, WFlags f):AddConnection(parent, name, f){ connect(registeredServicesList, SIGNAL(selectionChanged()), this, SLOT(changed())); registeredServicesList->header()->hide(); }; /** * The current item changed, update the discription. - */ + */ void AddConnectionImp::changed(){ QListViewItem *item = registeredServicesList->currentItem(); if(item) help->setText(list[item->text(0)]); } /** * Save a copy of newList for the discriptions and append them all to the view * @param newList the new list of possible interfaces - */ + */ void AddConnectionImp::addConnections(const QMap<QString, QString> &newList){ list = newList; QMap<QString, QString>::Iterator it; for( it = list.begin(); it != list.end(); ++it ) - QListViewItem *item = new QListViewItem(registeredServicesList, it.key()); + (void)new QListViewItem(registeredServicesList, it.key()); registeredServicesList->setCurrentItem(registeredServicesList->firstChild()); } // addserviceimp.cpp 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 @@ -208,17 +208,18 @@ void ConnectWidget::init() { // run the "before-connect" command if (!_ifaceppp->data()->command_before_connect().isEmpty()) { messg->setText(QObject::tr("Running pre-startup command...")); emit debugMessage(QObject::tr("Running pre-startup command...")); qApp->processEvents(); QApplication::flushX(); - pid_t id = execute_command(_ifaceppp->data()->command_before_connect()); + (void)execute_command(_ifaceppp->data()->command_before_connect()); + // int i, status; // do { // qApp->processEvents(); // i = waitpid(id, &status, WNOHANG); // usleep(100000); // } while (i == 0 && errno == 0); } @@ -468,17 +469,17 @@ void ConnectWidget::timerEvent(QTimerEvent *) { timeout_timer->stop(); timeout_timer->start(scriptTimeout); if((unsigned) scriptindex < comlist->count()) { scriptCommand = *(comlist->at(scriptindex)); scriptArgument = *(arglist->at(scriptindex)); } else { - odebug << "End of script" << oendl; + odebug << "End of script" << oendl; vmain = 10; return; } if (scriptCommand == "Scan") { QString bm = QObject::tr("Scanning %1").arg(scriptArgument); messg->setText(bm); emit debugMessage(bm); @@ -834,27 +835,27 @@ void ConnectWidget::timerEvent(QTimerEvent *) { /* Er, there _is_ not QTimer::singleShot() in Modem::readtty(), and closing the thing prevents pppd from using it later. */ //_ifaceppp->modem()->closetty(); killTimer( main_timer_ID ); if_timeout_timer->start(_ifaceppp->data()->pppdTimeout()*1000); - odebug << "started if timeout timer with " << _ifaceppp->data()->pppdTimeout()*1000 << "" << oendl; + odebug << "started if timeout timer with " << _ifaceppp->data()->pppdTimeout()*1000 << "" << oendl; // find out PPP interface and notify the stats module // stats->setUnit(pppInterfaceNumber()); qApp->flushX(); semaphore = true; result = execppp(); emit debugMessage(QObject::tr("Starting pppd...")); - odebug << "execppp() returned with return-code " << result << "" << oendl; + odebug << "execppp() returned with return-code " << result << "" << oendl; if(result) { if(!_ifaceppp->data()->autoDNS()) adddns( _ifaceppp ); // O.K we are done here, let's change over to the if_waiting loop // where we wait for the ppp if (interface) to come up. @@ -1060,17 +1061,17 @@ void ConnectWidget::setExpect(const QString &n) { // check if the expected string is in the read buffer already. checkBuffers(); } void ConnectWidget::if_waiting_timed_out() { if_timer->stop(); if_timeout_timer->stop(); - odebug << "if_waiting_timed_out()" << oendl; + odebug << "if_waiting_timed_out()" << oendl; _ifaceppp->data()->setpppdError(E_IF_TIMEOUT); // let's kill the stuck pppd _ifaceppp->modem()->killPPPDaemon(); emit stopAccounting(); // p_kppp->con_win->stopClock(); @@ -1267,17 +1268,17 @@ bool ConnectWidget::execppp() { QMessageBox::critical(this, "error", QObject::tr( "pppd command + command-line arguments exceed " "2024 characters in length." )); return false; // nonsensically long command which would bust my buffer buf. } - owarn << "Command IS: " << command.latin1() << "" << oendl; + owarn << "Command IS: " << command.latin1() << "" << oendl; qApp->flushX(); return _ifaceppp->modem()->execPPPDaemon(command); } void ConnectWidget::closeEvent( QCloseEvent *e ) { 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 @@ -69,30 +69,30 @@ DevicesWidget::DevicesWidget( InterfacePPP* ip, QWidget *parent, const char *nam QWhatsThis::add(delete_b, tr("<p>Deletes the selected device\n\n" "<font color=\"red\"><b>Use with care!</b></font>")); copy_b->setEnabled( false ); //FIXME // delete_b->setEnabled( false ); //FIXME QStringList tmp = _pppdata->getDevicesNamesList(); - odebug << "DevicesWidget::DevicesWidget got devices " << tmp.join("--").latin1() << "" << oendl; + odebug << "DevicesWidget::DevicesWidget got devices " << tmp.join("--").latin1() << "" << oendl; listListbox->insertStringList(tmp); for (uint i = 0; i < listListbox->count(); i++){ - odebug << "listListbox->text(i) " << listListbox->text(i).latin1() << " == _pppdata->devname() " << _pppdata->devname().latin1() << "" << oendl; + odebug << "listListbox->text(i) " << listListbox->text(i).latin1() << " == _pppdata->devname() " << _pppdata->devname().latin1() << "" << oendl; if ( listListbox->text(i) == _pppdata->devname() ) listListbox->setCurrentItem( i ); } } void DevicesWidget::slotListBoxSelect(int idx) { - bool ok = _pppdata->setDevice( listListbox->text(idx) ); + _pppdata->setDevice( listListbox->text(idx) ); delete_b->setEnabled((bool)(idx != -1)); edit_b->setEnabled((bool)(idx != -1)); //FIXME copy_b->setEnabled((bool)(idx != -1)); } void DevicesWidget::edit() { _pppdata->setDevice(listListbox->text(listListbox->currentItem())); 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 @@ -1197,15 +1197,15 @@ PhoneNumberDialog::PhoneNumberDialog(QWidget *parent) QString PhoneNumberDialog::phoneNumber() { QString s = le->text(); return s; } -void PhoneNumberDialog::textChanged(const QString &s) +void PhoneNumberDialog::textChanged(const QString &) { // enableButtonOK(s.length() > 0); } //#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 @@ -16,20 +16,20 @@ using namespace Opie::Core; #else #define showMaximized show #endif /** * Constructor for the InterfaceInformationImp class. This class pretty much * just display's information about the interface that is passed to it. */ -InterfaceInformationPPP::InterfaceInformationPPP(QWidget *parent, const char *name, Interface *i, WFlags f) +InterfaceInformationPPP::InterfaceInformationPPP(QWidget *parent, const char *name, Interface *i, WFlags ) :InterfaceInformationImp(parent, name, i, Qt::WStyle_ContextHelp) { - odebug << "InterfaceInformationPPP::InterfaceInformationPPP " << name << "" << oendl; + odebug << "InterfaceInformationPPP::InterfaceInformationPPP " << name << "" << oendl; con = new ConnectWidget( (InterfacePPP*)i, this, "con" ); con->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed) ); macAddressLabel->hide(); subnetMaskLabel->hide(); broadcastLabel->hide(); TextLabel23->hide(); 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 @@ -58,54 +58,54 @@ PPPModule::PPPModule() : Module() { InterfaceKeeper inFace; QMap<QString,Connection> running = inFace.interfaces(); QStringList handledInterfaceNames; QMap<QString,QString> ifaces = PPPData::getConfiguredInterfaces(); QMap<QString,QString>::Iterator it; InterfacePPP *iface; - odebug << "getting interfaces" << oendl; + odebug << "getting interfaces" << oendl; for( it = ifaces.begin(); it != ifaces.end(); ++it ) { - odebug << "ifaces " << it.key().latin1() << " " << it.data().latin1() << "" << oendl; + odebug << "ifaces " << it.key().latin1() << " " << it.data().latin1() << "" << oendl; iface = new InterfacePPP( 0, it.key() ); iface->setHardwareName( it.data() ); list.append( (Interface*)iface ); // check if (*it) is one of the running ifaces if ( running.contains( it.data() ) ) { - odebug << "iface is running " << it.key().latin1() << "" << oendl; + odebug << "iface is running " << it.key().latin1() << "" << oendl; handledInterfaceNames << running[it.data()].device; iface->setStatus( true ); iface->setPPPDpid( running[it.data()].pid ); iface->modem()->setPPPDevice( running[it.data()].device ); iface->refresh(); } } setHandledInterfaceNames( handledInterfaceNames ); } /** * Delete any interfaces that we own. */ PPPModule::~PPPModule() { - odebug << "PPPModule::~PPPModule() " << oendl; + odebug << "PPPModule::~PPPModule() " << oendl; QMap<QString,QString> ifaces; InterfaceKeeper keeper; Interface *i; for ( i=list.first(); i != 0; i=list.next() ) { /* if online save the state */ if ( i->getStatus() ) { - odebug << "Iface " << i->getHardwareName().latin1() << " is still up" << oendl; + odebug << "Iface " << i->getHardwareName().latin1() << " is still up" << oendl; InterfacePPP* ppp = static_cast<InterfacePPP*>(i); keeper.addInterface( ppp->pppPID(), ppp->pppDev(), ppp->getHardwareName() ); } ifaces.insert( i->getInterfaceName(), i->getHardwareName() ); delete i; } PPPData::setConfiguredInterfaces( ifaces ); } @@ -139,17 +139,17 @@ bool PPPModule::isOwner(Interface *i) } /** * Create, and return the WLANConfigure Module * @return QWidget* pointer to this modules configure. */ QWidget *PPPModule::configure(Interface *i) { - odebug << "return ModemWidget" << oendl; + odebug << "return ModemWidget" << oendl; PPPConfigWidget *pppconfig = new PPPConfigWidget( (InterfacePPP*)i, 0, "PPPConfig", false, ::Qt::WDestructiveClose | ::Qt::WStyle_ContextHelp); return pppconfig; } /** * Create, and return the Information Module @@ -166,28 +166,29 @@ QWidget *PPPModule::information(Interface *i) /** * Get all active (up or down) interfaces * @return QList<Interface> A list of interfaces that exsist that havn't * been called by isOwner() */ QList<Interface> PPPModule::getInterfaces() { // List all of the files in the peer directory - odebug << "PPPModule::getInterfaces" << oendl; + odebug << "PPPModule::getInterfaces" << oendl; return list; } /** * Attempt to add a new interface as defined by name - * @param name the name of the type of interface that should be created given + * @param newInterface the name of the type of interface that should be created given * by possibleNewInterfaces(); * @return Interface* NULL if it was unable to be created. */ Interface *PPPModule::addNewInterface(const QString &newInterface) { + Q_CONST_UNUSED( newInterface ) InterfacePPP *ifaceppp; Interface *iface; ifaceppp = new InterfacePPP(); PPPConfigWidget imp(ifaceppp, 0, "PPPConfigImp", true); if( QPEApplication::execDialog( &imp ) == QDialog::Accepted ) { @@ -259,28 +260,28 @@ namespace QStringList lst = cfg.groupList(); for (QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { Connection con; cfg.setGroup( (*it) ); con.name = (*it); con.pid = cfg.readNumEntry("pid"); con.device = cfg.readEntry("device"); - odebug << " " << con.name.latin1() << " " << con.device.latin1() << " " << con.pid << "" << oendl; + odebug << " " << con.name.latin1() << " " << con.device.latin1() << " " << con.pid << "" << oendl; if ( con.pid != -1 && isAvailable( con.pid ) ) ifaces.insert( con.name, con ); } return ifaces; } bool InterfaceKeeper::isAvailable( pid_t p)const { if (::kill(p, 0 ) == 0 || errno != ESRCH ) { - odebug << "isAvailable " << p << "" << oendl; + odebug << "isAvailable " << p << "" << oendl; return true; } - odebug << "notAvailable " << p << "" << oendl; + odebug << "notAvailable " << p << "" << oendl; return false; } } 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 @@ -17,17 +17,17 @@ public: virtual bool isOwner(Interface *); virtual QWidget *configure(Interface *i); virtual QWidget *information(Interface *i); virtual QList<Interface> getInterfaces(); virtual void possibleNewInterfaces(QMap<QString, QString> &); virtual Interface *addNewInterface(const QString &name); virtual bool remove(Interface* i); virtual QString getPixmapName(Interface* i); - virtual void receive(const QCString &msg, const QByteArray &arg) {}; + virtual void receive(const QCString &, const QByteArray &) {}; private: QList<Interface> list; QString profile; }; extern "C" 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 @@ -6,17 +6,17 @@ KeyEdit::KeyEdit(QWidget* parent, const char* name) : { setEchoMode(Password); } KeyEdit::~KeyEdit() { } -void KeyEdit::focusInEvent(QFocusEvent *event) +void KeyEdit::focusInEvent(QFocusEvent *) { setEchoMode(Normal); } -void KeyEdit::focusOutEvent(QFocusEvent *event) +void KeyEdit::focusOutEvent(QFocusEvent *) { setEchoMode(Password); } 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 @@ -111,17 +111,16 @@ void WLANImp::parseOpts() { opt = interfaces->getInterfaceOption("wireless_key", error).simplifyWhiteSpace(); if (opt.isNull()) opt = interfaces->getInterfaceOption("wireless_enc", error).simplifyWhiteSpace(); parseKeyStr(opt); } void WLANImp::parseKeyStr(QString keystr) { - int loc = 0; int index = 1; QString key; QStringList keys = QStringList::split(QRegExp("\\s+"), keystr); int enc = -1; // encryption state for (QStringList::Iterator it = keys.begin(); it != keys.end(); ++it) { if ((*it).left(3) == "off") { // encryption disabled |