diff --git a/src/main.cpp b/src/main.cpp index ec72c06..cdc8fc6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -47,7 +47,7 @@ int main(int argc, char **argv) KApplication app; WirelessAssistant *mainWin = 0; mainWin = new WirelessAssistant(); - mainWin->setCaption( TQString("%1 %2").tqarg(description).tqarg(version) ); + mainWin->setCaption( TQString("%1 %2").arg(description).arg(version) ); app.setMainWidget( mainWin ); mainWin->show(); diff --git a/src/netlistviewitem.cpp b/src/netlistviewitem.cpp index 45a8968..178b7e3 100644 --- a/src/netlistviewitem.cpp +++ b/src/netlistviewitem.cpp @@ -26,7 +26,7 @@ #include #include -void NetListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) +void NetListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) { /// HACK fixes: higher item (connected) is drawn using regular height upon widget change (widgetStack); if ( height()!=mHeight ) @@ -165,7 +165,7 @@ void NetListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column } default: - KListViewItem::paintCell(p, cg, column, width, tqalignment); + KListViewItem::paintCell(p, cg, column, width, alignment); } //switch } diff --git a/src/netlistviewitem.h b/src/netlistviewitem.h index 5b55f0a..b3ca41c 100644 --- a/src/netlistviewitem.h +++ b/src/netlistviewitem.h @@ -65,9 +65,9 @@ public: void setChannel(const TQString& theValue) { - if ( mChannel != theValue ) { //tqrepaint only if difference visible in quality stars + if ( mChannel != theValue ) { //repaint only if difference visible in quality stars mChannel = theValue; - tqrepaint(); + repaint(); } } @@ -111,7 +111,7 @@ public: mHeight-=10; } setHeight( mHeight ); - tqrepaint(); + repaint(); } @@ -122,9 +122,9 @@ public: void setQuality(const int& theValue) { - if ( int(mQuality/8) != int(theValue/8) ) { //tqrepaint only if difference visible in quality stars + if ( int(mQuality/8) != int(theValue/8) ) { //repaint only if difference visible in quality stars mQuality = theValue; - tqrepaint(); + repaint(); } else mQuality = theValue; } @@ -150,7 +150,7 @@ public: private: - virtual void paintCell (TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment); + virtual void paintCell (TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment); virtual int width(const TQFontMetrics &fm, const TQListView *lv, int column) const; virtual TQString key( int column, bool ascending ) const; diff --git a/src/netparams.h b/src/netparams.h index fbc2b7b..966dd08 100644 --- a/src/netparams.h +++ b/src/netparams.h @@ -79,7 +79,7 @@ public: r = true; } if ( (hiddenEssid) && (!wasHiddenEssid) ) - if ( KMessageBox::questionYesNo(0, i18n("

The network has stopped broadcasting its ESSID since the last time you were connected.

Would you like to use '%1' as an ESSID for this network?

NOTE: If you answer No, a dialog will appear where you will be able to specify a different ESSID.

").tqarg(essid) ) != 3 ) // !=YES + if ( KMessageBox::questionYesNo(0, i18n("

The network has stopped broadcasting its ESSID since the last time you were connected.

Would you like to use '%1' as an ESSID for this network?

NOTE: If you answer No, a dialog will appear where you will be able to specify a different ESSID.

").arg(essid) ) != 3 ) // !=YES r = true; wasHiddenEssid = hiddenEssid; diff --git a/src/ui_NetParamsEdit.ui b/src/ui_NetParamsEdit.ui index ea80838..2a0778b 100644 --- a/src/ui_NetParamsEdit.ui +++ b/src/ui_NetParamsEdit.ui @@ -74,7 +74,7 @@ Expanding - + 20 20 @@ -184,7 +184,7 @@ -tqlayout3 +layout3 @@ -327,7 +327,7 @@ Expanding - + 20 21 @@ -357,7 +357,7 @@ Expanding - + 21 40 @@ -377,7 +377,7 @@ -tqlayout33 +layout33 @@ -419,7 +419,7 @@ -tqlayout34 +layout34 @@ -467,7 +467,7 @@ Expanding - + 131 21 @@ -502,7 +502,7 @@ -tqlayout35 +layout35 @@ -589,7 +589,7 @@ -tqlayout6 +layout6 @@ -605,7 +605,7 @@ Expanding - + 130 20 @@ -663,7 +663,7 @@ -tqlayout7 +layout7 @@ -699,7 +699,7 @@ -tqlayout6_2 +layout6_2 @@ -715,7 +715,7 @@ Expanding - + 130 20 @@ -773,7 +773,7 @@ -tqlayout7_2 +layout7_2 @@ -809,7 +809,7 @@ -tqlayout6_3 +layout6_3 @@ -825,7 +825,7 @@ Expanding - + 130 20 @@ -883,7 +883,7 @@ -tqlayout7_3 +layout7_3 @@ -919,7 +919,7 @@ -tqlayout6_3_2 +layout6_3_2 @@ -935,7 +935,7 @@ Expanding - + 130 20 @@ -993,7 +993,7 @@ -tqlayout7_3_2 +layout7_3_2 @@ -1026,7 +1026,7 @@ Expanding - + 31 20 diff --git a/src/ui_NetParamsWizard.ui b/src/ui_NetParamsWizard.ui index 1c933c4..0d1ec56 100644 --- a/src/ui_NetParamsWizard.ui +++ b/src/ui_NetParamsWizard.ui @@ -46,7 +46,7 @@ <p>You will be asked a few questions necessary to configure this connection.</p> <p><i>Press Next to continue.</i></p> - + WordBreak|AlignTop @@ -85,7 +85,7 @@ Expanding - + 21 100 @@ -99,7 +99,7 @@ ESSID: - + AlignVCenter|AlignRight @@ -118,7 +118,7 @@ Expanding - + 101 21 @@ -135,7 +135,7 @@ Expanding - + 61 21 @@ -168,7 +168,7 @@ Expanding - + 80 21 @@ -185,7 +185,7 @@ Expanding - + 60 31 @@ -202,7 +202,7 @@ Expanding - + 21 20 @@ -283,7 +283,7 @@ -tqlayout12 +layout12 @@ -312,7 +312,7 @@ Secondary DNS: - + AlignVCenter|AlignRight @@ -339,7 +339,7 @@ IP: - + AlignVCenter|AlignRight @@ -350,7 +350,7 @@ Netmask: - + AlignVCenter|AlignRight @@ -369,7 +369,7 @@ Primary DNS: - + AlignVCenter|AlignRight @@ -380,7 +380,7 @@ Gateway: - + AlignVCenter|AlignRight @@ -404,7 +404,7 @@ Domain: - + AlignVCenter|AlignRight @@ -415,7 +415,7 @@ Broadcast: - + AlignVCenter|AlignRight @@ -431,7 +431,7 @@ Expanding - + 60 31 @@ -448,7 +448,7 @@ Expanding - + 50 21 @@ -465,7 +465,7 @@ Expanding - + 21 16 @@ -551,7 +551,7 @@ Expanding - + 122 31 @@ -568,7 +568,7 @@ Expanding - + 150 21 @@ -593,7 +593,7 @@ Expanding - + 31 16 @@ -610,7 +610,7 @@ Expanding - + 50 21 @@ -627,7 +627,7 @@ Expanding - + 30 21 @@ -641,7 +641,7 @@ WEP key: - + AlignVCenter|AlignRight @@ -649,7 +649,7 @@ wepKey - + 140 0 @@ -690,7 +690,7 @@ Expanding - + 31 54 @@ -707,7 +707,7 @@ Expanding - + 80 21 @@ -724,7 +724,7 @@ Expanding - + 49 21 @@ -746,7 +746,7 @@ WPA Key: - + AlignVCenter|AlignRight @@ -754,7 +754,7 @@ wpaKey - + 140 0 @@ -790,7 +790,7 @@ Expanding - + 80 21 @@ -807,7 +807,7 @@ Expanding - + 60 31 @@ -868,7 +868,7 @@ <p>You have successfully finished configuring this connection.</p> <p><b>Press Finish to connect!</b></p> - + WordBreak|AlignTop diff --git a/src/ui_main.ui b/src/ui_main.ui index 8db0707..0c0083a 100644 --- a/src/ui_main.ui +++ b/src/ui_main.ui @@ -23,7 +23,7 @@ buttonOptions - + 0 0 @@ -75,7 +75,7 @@ false - + 120 0 @@ -129,7 +129,7 @@ Expanding - + 21 120 @@ -138,7 +138,7 @@ -tqlayout16 +layout16 @@ -184,7 +184,7 @@ 0 - + 0 20 @@ -209,7 +209,7 @@ 0 - + 60 0 @@ -350,7 +350,7 @@ 0 - + 0 20 @@ -362,11 +362,11 @@ Ready - + WordBreak|AlignVCenter -<p><b>tqStatus Bar</b></p> +<p><b>Status Bar</b></p> <p>Messages describing current process are shown in this area.</p> @@ -385,7 +385,7 @@ -tqlayout20 +layout20 @@ -455,7 +455,7 @@ -tqlayout17 +layout17 @@ -463,7 +463,7 @@ -tqlayout12 +layout12 @@ -505,7 +505,7 @@ -tqlayout13 +layout13 @@ -521,7 +521,7 @@ Fixed - + 21 20 @@ -538,7 +538,7 @@ Fixed - + 21 20 @@ -549,7 +549,7 @@ -tqlayout14 +layout14 @@ -609,7 +609,7 @@ -tqlayout15 +layout15 @@ -625,7 +625,7 @@ Expanding - + 101 21 @@ -642,7 +642,7 @@ Expanding - + 118 21 @@ -663,7 +663,7 @@ -tqlayout19 +layout19 @@ -679,7 +679,7 @@ Expanding - + 201 21 @@ -713,7 +713,7 @@ Expanding - + 20 31 @@ -745,7 +745,7 @@ setDeviceList() -updatetqStatus(char sts) +updateStatus(char sts) diff --git a/src/ui_netparamsedit.cpp b/src/ui_netparamsedit.cpp index 1b757a8..757dde9 100644 --- a/src/ui_netparamsedit.cpp +++ b/src/ui_netparamsedit.cpp @@ -81,7 +81,7 @@ void ui_NetParamsEdit::setValues( const WANetParams & np ) } } if (np.wpa) { - labelWpaSettings->setText( TQString("%1").tqarg( np.wpaSettings.join("
") ) ); + labelWpaSettings->setText( TQString("%1").arg( np.wpaSettings.join("
") ) ); if ( np.wpaKey.left(2)=="s:" ) { //ASCII key checkWpaAscii->setChecked(true); wpaKey->setText( np.wpaKey.right(np.wpaKey.length()-2) ); diff --git a/src/ui_netparamswizard.cpp b/src/ui_netparamswizard.cpp index de8c39f..42a93d2 100644 --- a/src/ui_netparamswizard.cpp +++ b/src/ui_netparamswizard.cpp @@ -55,7 +55,7 @@ void ui_NetParamsWizard::setWepEnabled( bool w ) void ui_NetParamsWizard::setWpaEnabled( bool w, TQStringList settings ) { setAppropriate( page(5), w ); - if (w) labelWpaSettings->setText( TQString("%1").tqarg( settings.join("
") ) ); + if (w) labelWpaSettings->setText( TQString("%1").arg( settings.join("
") ) ); } diff --git a/src/waconfig.cpp b/src/waconfig.cpp index bb8cc97..4dc5d41 100644 --- a/src/waconfig.cpp +++ b/src/waconfig.cpp @@ -16,7 +16,7 @@ WAConfig *WAConfig::self() } WAConfig::WAConfig( ) - : KConfigSkeleton( TQString::tqfromLatin1( "wlassistantrc" ) ) + : KConfigSkeleton( TQString::fromLatin1( "wlassistantrc" ) ) { mSelf = this; } diff --git a/src/wlassistant.cpp b/src/wlassistant.cpp index caafb37..5677de9 100644 --- a/src/wlassistant.cpp +++ b/src/wlassistant.cpp @@ -101,7 +101,7 @@ WirelessAssistant::~WirelessAssistant() void WirelessAssistant::init() { statusLabel->setText(i18n("Initializing...")); - statusLabel->tqrepaint(); + statusLabel->repaint(); //////////////////////////////////////// ///// CHECK FOR SYSFS (KERNEL 2.6) ///// @@ -191,13 +191,13 @@ void WirelessAssistant::init() timerGui = new TQTimer(); timerConnectionCheck = new TQTimer(); connect( timerGui, TQT_SIGNAL(timeout()), TQT_SLOT(updateConnectedItem()) ); - connect( timerConnectionCheck, TQT_SIGNAL(timeout()), TQT_SLOT(checkConnectiontqStatus()) ); + connect( timerConnectionCheck, TQT_SIGNAL(timeout()), TQT_SLOT(checkConnectionStatus()) ); //////////////////////// ///// DETECT & SET PATHS ///// if (!Commands.allFound) { //all ok or ONLY dhcpcd not found (i.e. dhclient present). std::cout << "Missing executables (" << Commands.notFound.join("', '").ascii() << "). Exiting." << std::endl; - KMessageBox::error(0, i18n("Executable(s) '%1' could not be found.\nWireless Assistant will now quit.").tqarg(Commands.notFound.join("', '")) ); + KMessageBox::error(0, i18n("Executable(s) '%1' could not be found.\nWireless Assistant will now quit.").arg(Commands.notFound.join("', '")) ); close(); return; } @@ -213,7 +213,7 @@ void WirelessAssistant::init() TQTimer::singleShot( 0, this, TQT_SLOT(netScan()) ); } -void WirelessAssistant::checkConnectiontqStatus() +void WirelessAssistant::checkConnectionStatus() { TQListViewItem* lvi; if (groupAPs) lvi = getItemByEssid( WATools::essid(NetParams.iface.ascii())); @@ -235,7 +235,7 @@ void WirelessAssistant::checkConnectiontqStatus() } else if (connectedItem) { //connection LOST setConnectedItem(0); timerConnectionCheck->stop(); - if ( autoReconnect || KMessageBox::questionYesNo(0, i18n("Connection to '%1' has been lost!\nWould you like to reconnect?").tqarg(NetParams.essid), i18n("Connection Lost") , KStdGuiItem::yes(), KStdGuiItem::no() ) == KMessageBox::Yes ) { + if ( autoReconnect || KMessageBox::questionYesNo(0, i18n("Connection to '%1' has been lost!\nWould you like to reconnect?").arg(NetParams.essid), i18n("Connection Lost") , KStdGuiItem::yes(), KStdGuiItem::no() ) == KMessageBox::Yes ) { netDisconnect( true ); netConnect(); } @@ -249,7 +249,7 @@ void WirelessAssistant::removeNetParams() TQString ap = nvi->ap(); TQString essid = nvi->essid(); for (TQStringList::Iterator nps = NetParamsList.begin(); nps != NetParamsList.end(); nps++) { if ( (*nps).section(",",2,2)==ap && (*nps).section(",",1,1)==essid) { - if ( KMessageBox::warningContinueCancel(0, i18n("

Settings for network '%1' are about to be deleted.

Would you like to continue?

").tqarg(essid)) == KMessageBox::Continue ) { + if ( KMessageBox::warningContinueCancel(0, i18n("

Settings for network '%1' are about to be deleted.

Would you like to continue?

").arg(essid)) == KMessageBox::Continue ) { if (nvi->hidden()) // hiddenEssid = 1 nvi->setEssid(""); NetParamsList.remove(nps); @@ -282,7 +282,7 @@ void WirelessAssistant::setDNS( const WANetParams & np ) f.close(); } else { std::cout << "dns setup error: " << f.name().ascii() << " is not writeable." << std::endl; - KMessageBox::error(0, i18n("

File '%1' could not be opened for writing.

Nameserver(s) and/or domain are not set.

").tqarg(f.name()) ); + KMessageBox::error(0, i18n("

File '%1' could not be opened for writing.

Nameserver(s) and/or domain are not set.

").arg(f.name()) ); } } @@ -291,7 +291,7 @@ void WirelessAssistant::netScan() timerConnectionCheck->stop(); //stop while scanning. netScan( NetParams ); if (netList->childCount() > 0) { - TQTimer::singleShot( 0, this, TQT_SLOT(checkConnectiontqStatus()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(checkConnectionStatus()) ); timerConnectionCheck->start(WA_CONNECTION_CHECK_INTERVAL); } } @@ -314,19 +314,19 @@ void WirelessAssistant::netScan( const WANetParams & np ) } if ( !WATools::isUp(np.iface.ascii()) ) { - statusLabel->setText(i18n("Bringing interface %1 up...").tqarg(np.iface.ascii())); + statusLabel->setText(i18n("Bringing interface %1 up...").arg(np.iface.ascii())); //runCommand( Commands.cmd("ifup",np) ); WATools::setUp(true, np.iface.ascii()); if (DelayBeforeScanning>0) { statusLabel->setText(i18n("Waiting before scanning...")); - statusLabel->tqrepaint(); + statusLabel->repaint(); KApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); usleep(DelayBeforeScanning * 1000000); // delay * 1000ms } } statusLabel->setText(i18n("Scanning...")); - statusLabel->tqrepaint(); + statusLabel->repaint(); netList->clear(); @@ -570,7 +570,7 @@ void WirelessAssistant::netConnect() setNetParamsFromList( netList->selectedItem() ); //can't connect if WPA needed, and wpa_supplicant and wpa_cli not available if ( NetParams.wpa && !wpaAvailable ) { - KMessageBox::error(0, i18n("

Can not connect to network '%1'.

The network you are trying to connect to requires WPA authentication. The necessary executables wpa_supplicant and wpa_cli could not be found. Install wpa_supplicant and restart Wireless Assistant to connect.

").tqarg(NetParams.essid) ); + KMessageBox::error(0, i18n("

Can not connect to network '%1'.

The network you are trying to connect to requires WPA authentication. The necessary executables wpa_supplicant and wpa_cli could not be found. Install wpa_supplicant and restart Wireless Assistant to connect.

").arg(NetParams.essid) ); timerConnectionCheck->start(WA_CONNECTION_CHECK_INTERVAL); //resume connection checking return; } @@ -579,7 +579,7 @@ void WirelessAssistant::netConnect() if ( (NetParams.essid=="") || (!setNetParamsFromConfig( search )) ) { ui_NetParamsWizard *netwiz = new ui_NetParamsWizard; if (!NetParams.hiddenEssid) - netwiz->setCaption( i18n("%1 - First Connection Wizard").tqarg(NetParams.essid) ); + netwiz->setCaption( i18n("%1 - First Connection Wizard").arg(NetParams.essid) ); netwiz->setEssidEnabled( NetParams.hiddenEssid ); netwiz->setWepEnabled( NetParams.wep ); netwiz->setWpaEnabled( NetParams.wpa, NetParams.wpaSettings ); @@ -650,8 +650,8 @@ void WirelessAssistant::netConnect( const WANetParams & np ) std::cout << "No pre-connection command specified." << std::endl; - statusLabel->setText( i18n("Connecting to '%1'...").tqarg(np.essid) ); - statusLabel->tqrepaint(); + statusLabel->setText( i18n("Connecting to '%1'...").arg(np.essid) ); + statusLabel->repaint(); if (!WATools::isUp(np.iface.ascii()) ) WATools::setUp( true, np.iface.ascii() ); //runCommand( Commands.cmd("ifup", np) ); if ( runCommand( Commands.cmd("iwconfig_set", np) ).find("8B04") > -1 ) { // error 8B04 - Request 'Set Frequency' not supported. @@ -710,7 +710,7 @@ void WirelessAssistant::netConnect( const WANetParams & np ) if (autoQuit) this->close(); groupAPs ? setConnectedItem( np.essid ) : setConnectedItem( np.ap ); - statusLabel->setText( i18n("Successfully connected to '%1'.").tqarg(np.essid) ); + statusLabel->setText( i18n("Successfully connected to '%1'.").arg(np.essid) ); setUi(1); } else { std::cout << "CONNECTION FAILED." << std::endl; @@ -757,7 +757,7 @@ void WirelessAssistant::setConnectedItem( const TQString & netid ) void WirelessAssistant::netDisconnect( const bool & quiet ) { - if ( (quiet) || (KMessageBox::warningContinueCancel(0, i18n("

You are about to disconnect from '%1'.

Would you like to continue?

").tqarg(connectedItem->essid()) )== KMessageBox::Continue ) ) { + if ( (quiet) || (KMessageBox::warningContinueCancel(0, i18n("

You are about to disconnect from '%1'.

Would you like to continue?

").arg(connectedItem->essid()) )== KMessageBox::Continue ) ) { timerConnectionCheck->stop(); //stop while disconnecting. if ( !NetParams.preDisconnectionCommand.isEmpty() ) { @@ -769,13 +769,13 @@ void WirelessAssistant::netDisconnect( const bool & quiet ) statusLabel->setText( i18n("Disconnecting...") ); - statusLabel->tqrepaint(); + statusLabel->repaint(); setConnectedItem( 0 ); if ( NetParams.dhcp ) { if ( dhcpClientRunning() ) { runCommand( Commands.cmd( "kill_dhcp", NetParams ) ); statusLabel->setText( i18n("Waiting for DHCP client to shut down...") ); - statusLabel->tqrepaint(); + statusLabel->repaint(); TQTimer* tmr = new TQTimer(); tmr->start(1500, true); //wait 1.5sec for dhcp client to really shutdown, single shot. while ( tmr->isActive() ) { @@ -960,7 +960,7 @@ TQString WirelessAssistant::runCommand( const TQStringList & cmd, int timeout, b TQToolTip::remove (buttonClose); TQToolTip::add - ( buttonClose, i18n("Terminate current process\n(%1)").tqarg( p->arguments().join(" ") ) ); + ( buttonClose, i18n("Terminate current process\n(%1)").arg( p->arguments().join(" ") ) ); } i++; } @@ -1059,7 +1059,7 @@ void WirelessAssistant::editNetParams() ui_NetParamsEdit *netedit = new ui_NetParamsEdit(); netedit->setValues( NetParams ); - netedit->setCaption( i18n("%1 Settings").tqarg(NetParams.essid) ); + netedit->setCaption( i18n("%1 Settings").arg(NetParams.essid) ); netedit->exec(); if (netedit->result() == TQDialog::Rejected) { delete netedit; @@ -1085,7 +1085,7 @@ bool WirelessAssistant::dhcpClientRunning() TQString pidFile; pidPaths << "/etc/" << "/etc/dhcpc/" << "/var/run/"; if ( Commands.dhcpClient=="dhcpcd" ) - pidFile = TQString("dhcpcd-%1.pid").tqarg(NetParams.iface.ascii()); + pidFile = TQString("dhcpcd-%1.pid").arg(NetParams.iface.ascii()); else pidFile = TQString("dhclient.pid"); @@ -1185,14 +1185,14 @@ bool WirelessAssistant::generateWpaConfigFile( const TQString& essid, const TQSt bool WirelessAssistant::setWpaClientEnabled( bool e, const TQString& iface, TQString driver ) { if (!e) { - if ( runCommand( TQStringList(Commands.wpa_cli) << TQString("-i%1").tqarg(NetParams.iface) << "terminate" ).contains("OK") ) { + if ( runCommand( TQStringList(Commands.wpa_cli) << TQString("-i%1").arg(NetParams.iface) << "terminate" ).contains("OK") ) { TQFile( wpaConfigFile ).remove(); return 1; } else return 0; // wpa client was not running. } - if ( !runCommand( TQStringList(Commands.wpa_cli) << TQString("-i%1").tqarg(NetParams.iface) << "status" ).contains("Failed to connect") ) { + if ( !runCommand( TQStringList(Commands.wpa_cli) << TQString("-i%1").arg(NetParams.iface) << "status" ).contains("Failed to connect") ) { std::cout << "WPA client already running. Reconfiguring..." << std::endl; runCommand( TQStringList(Commands.wpa_cli) << "reconfigure" ); } else { @@ -1215,9 +1215,9 @@ bool WirelessAssistant::setWpaClientEnabled( bool e, const TQString& iface, TQSt wp->clearArguments(); wp->addArgument( Commands.wpa_supplicant ); wp->addArgument( "-W" ); //wait for control interface - wp->addArgument( TQString("-D%1").tqarg(driver) ); - wp->addArgument( TQString("-i%1").tqarg(iface) ); - wp->addArgument( TQString("-c%1").tqarg(wpaConfigFile) ); + wp->addArgument( TQString("-D%1").arg(driver) ); + wp->addArgument( TQString("-i%1").arg(iface) ); + wp->addArgument( TQString("-c%1").arg(wpaConfigFile) ); //std::cout << "Starting WPA client: " << wp->arguments().join(" ").ascii() << std::endl; if ( !wp->start() ) { std::cout << "Failed to start WPA client." << std::endl; @@ -1231,14 +1231,14 @@ bool WirelessAssistant::setWpaClientEnabled( bool e, const TQString& iface, TQSt TQString o; int i = 0; - while ( !(o =runCommand( TQStringList(Commands.wpa_cli) << TQString("-i%1").tqarg(NetParams.iface) << "status" )).contains("Failed to connect") ) { + while ( !(o =runCommand( TQStringList(Commands.wpa_cli) << TQString("-i%1").arg(NetParams.iface) << "status" )).contains("Failed to connect") ) { for (int c = 0; c < 15; c++) { usleep(75*1000); //75msec KApplication::eventLoop()->processEvents( TQEventLoop::AllEvents ); i++; } if (i>400) { //more than 30sec have passed - runCommand( TQStringList(Commands.wpa_cli) << TQString("-i%1").tqarg(NetParams.iface) << "terminate" ); + runCommand( TQStringList(Commands.wpa_cli) << TQString("-i%1").arg(NetParams.iface) << "terminate" ); return 0; } if ( o.contains("wpa_state=COMPLETED") ) { diff --git a/src/wlassistant.h b/src/wlassistant.h index 4951e8f..ec094e8 100644 --- a/src/wlassistant.h +++ b/src/wlassistant.h @@ -112,7 +112,7 @@ protected slots: virtual void removeNetParams(); virtual void updateNetParams(); virtual void itemAction(); - virtual void checkConnectiontqStatus(); + virtual void checkConnectionStatus(); virtual void updateConnectButton(TQListViewItem* lvi); virtual void setMouseBehaviour(); virtual void togglePage(bool options );