Rename KApplication to TDEApplication to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 81ad4ed9d5
commit 9be14601e7

@ -44,7 +44,7 @@ int main(int argc, char **argv)
about.addAuthor( "Pawel Nawrocki", 0, "pnawrocki@interia.pl" ); about.addAuthor( "Pawel Nawrocki", 0, "pnawrocki@interia.pl" );
TDECmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app; TDEApplication app;
WirelessAssistant *mainWin = 0; WirelessAssistant *mainWin = 0;
mainWin = new WirelessAssistant(); mainWin = new WirelessAssistant();
mainWin->setCaption( TQString("%1 %2").arg(description).arg(version) ); mainWin->setCaption( TQString("%1 %2").arg(description).arg(version) );

@ -84,7 +84,7 @@ WirelessAssistant::WirelessAssistant(TQWidget* parent, const char* name, bool mo
this, TQT_SLOT(enableAllMessages()) ); this, TQT_SLOT(enableAllMessages()) );
/// Global KDE Options /// Global KDE Options
connect( KApplication::kApplication(), TQT_SIGNAL(settingsChanged(int)), connect( TDEApplication::kApplication(), TQT_SIGNAL(settingsChanged(int)),
this, TQT_SLOT(updateConfiguration(int)) ); this, TQT_SLOT(updateConfiguration(int)) );
setMouseBehaviour(); setMouseBehaviour();
@ -320,7 +320,7 @@ void WirelessAssistant::netScan( const WANetParams & np )
if (DelayBeforeScanning>0) { if (DelayBeforeScanning>0) {
statusLabel->setText(i18n("Waiting before scanning...")); statusLabel->setText(i18n("Waiting before scanning..."));
statusLabel->repaint(); statusLabel->repaint();
KApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); TDEApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
usleep(DelayBeforeScanning * 1000000); // delay * 1000ms usleep(DelayBeforeScanning * 1000000); // delay * 1000ms
} }
} }
@ -779,7 +779,7 @@ void WirelessAssistant::netDisconnect( const bool & quiet )
TQTimer* tmr = new TQTimer(); TQTimer* tmr = new TQTimer();
tmr->start(1500, true); //wait 1.5sec for dhcp client to really shutdown, single shot. tmr->start(1500, true); //wait 1.5sec for dhcp client to really shutdown, single shot.
while ( tmr->isActive() ) { while ( tmr->isActive() ) {
KApplication::eventLoop()->processEvents( TQEventLoop::AllEvents ); TDEApplication::eventLoop()->processEvents( TQEventLoop::AllEvents );
usleep(75*1000); //75msec on Linux usleep(75*1000); //75msec on Linux
} }
delete tmr; delete tmr;
@ -839,7 +839,7 @@ TQListViewItem* WirelessAssistant::getItemByEssid( const TQString & essid )
void WirelessAssistant::updateConfiguration(int category) void WirelessAssistant::updateConfiguration(int category)
{ {
if (category == KApplication::SETTINGS_MOUSE) { if (category == TDEApplication::SETTINGS_MOUSE) {
setMouseBehaviour(); setMouseBehaviour();
return; return;
} }
@ -950,7 +950,7 @@ TQString WirelessAssistant::runCommand( const TQStringList & cmd, int timeout, b
int i = 0; int i = 0;
while ( p->isRunning() ) { // PROCESS USER EVENTS while ( p->isRunning() ) { // PROCESS USER EVENTS
KApplication::eventLoop()->processEvents( TQEventLoop::AllEvents ); TDEApplication::eventLoop()->processEvents( TQEventLoop::AllEvents );
usleep(75*1000); //75msec on Linux (75000msec on Windows...) usleep(75*1000); //75msec on Linux (75000msec on Windows...)
if (i==27) { // ca 2sec have passed and the process is still running. Replace the 'Close' button with 'Stop'. if (i==27) { // ca 2sec have passed and the process is still running. Replace the 'Close' button with 'Stop'.
disconnect(buttonClose, TQT_SIGNAL(clicked()), disconnect(buttonClose, TQT_SIGNAL(clicked()),
@ -1006,7 +1006,7 @@ void WirelessAssistant::setUi(int uiState)
buttonScan->setEnabled( false ); buttonScan->setEnabled( false );
buttonConnect->setEnabled( false ); buttonConnect->setEnabled( false );
buttonOptions->setEnabled( false ); buttonOptions->setEnabled( false );
KApplication::setOverrideCursor( TQCursor(TQt::BusyCursor) ); TDEApplication::setOverrideCursor( TQCursor(TQt::BusyCursor) );
} else { } else {
if (devCombo->count() > 0) { if (devCombo->count() > 0) {
devCombo->setEnabled( true ); devCombo->setEnabled( true );
@ -1015,7 +1015,7 @@ void WirelessAssistant::setUi(int uiState)
if (netList->childCount() > 0) if (netList->childCount() > 0)
buttonConnect->setEnabled( true ); buttonConnect->setEnabled( true );
buttonOptions->setEnabled( true ); buttonOptions->setEnabled( true );
KApplication::restoreOverrideCursor(); TDEApplication::restoreOverrideCursor();
} }
} }
@ -1234,7 +1234,7 @@ bool WirelessAssistant::setWpaClientEnabled( bool e, const TQString& iface, TQSt
while ( !(o =runCommand( TQStringList(Commands.wpa_cli) << TQString("-i%1").arg(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++) { for (int c = 0; c < 15; c++) {
usleep(75*1000); //75msec usleep(75*1000); //75msec
KApplication::eventLoop()->processEvents( TQEventLoop::AllEvents ); TDEApplication::eventLoop()->processEvents( TQEventLoop::AllEvents );
i++; i++;
} }
if (i>400) { //more than 30sec have passed if (i>400) { //more than 30sec have passed

Loading…
Cancel
Save