Rename KApplication to TDEApplication to avoid conflicts with KDE4

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

@ -44,7 +44,7 @@ int main(int argc, char **argv)
about.addAuthor( "Pawel Nawrocki", 0, "pnawrocki@interia.pl" );
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
TDEApplication app;
WirelessAssistant *mainWin = 0;
mainWin = new WirelessAssistant();
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()) );
/// Global KDE Options
connect( KApplication::kApplication(), TQT_SIGNAL(settingsChanged(int)),
connect( TDEApplication::kApplication(), TQT_SIGNAL(settingsChanged(int)),
this, TQT_SLOT(updateConfiguration(int)) );
setMouseBehaviour();
@ -320,7 +320,7 @@ void WirelessAssistant::netScan( const WANetParams & np )
if (DelayBeforeScanning>0) {
statusLabel->setText(i18n("Waiting before scanning..."));
statusLabel->repaint();
KApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
TDEApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
usleep(DelayBeforeScanning * 1000000); // delay * 1000ms
}
}
@ -779,7 +779,7 @@ void WirelessAssistant::netDisconnect( const bool & quiet )
TQTimer* tmr = new TQTimer();
tmr->start(1500, true); //wait 1.5sec for dhcp client to really shutdown, single shot.
while ( tmr->isActive() ) {
KApplication::eventLoop()->processEvents( TQEventLoop::AllEvents );
TDEApplication::eventLoop()->processEvents( TQEventLoop::AllEvents );
usleep(75*1000); //75msec on Linux
}
delete tmr;
@ -839,7 +839,7 @@ TQListViewItem* WirelessAssistant::getItemByEssid( const TQString & essid )
void WirelessAssistant::updateConfiguration(int category)
{
if (category == KApplication::SETTINGS_MOUSE) {
if (category == TDEApplication::SETTINGS_MOUSE) {
setMouseBehaviour();
return;
}
@ -950,7 +950,7 @@ TQString WirelessAssistant::runCommand( const TQStringList & cmd, int timeout, b
int i = 0;
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...)
if (i==27) { // ca 2sec have passed and the process is still running. Replace the 'Close' button with 'Stop'.
disconnect(buttonClose, TQT_SIGNAL(clicked()),
@ -1006,7 +1006,7 @@ void WirelessAssistant::setUi(int uiState)
buttonScan->setEnabled( false );
buttonConnect->setEnabled( false );
buttonOptions->setEnabled( false );
KApplication::setOverrideCursor( TQCursor(TQt::BusyCursor) );
TDEApplication::setOverrideCursor( TQCursor(TQt::BusyCursor) );
} else {
if (devCombo->count() > 0) {
devCombo->setEnabled( true );
@ -1015,7 +1015,7 @@ void WirelessAssistant::setUi(int uiState)
if (netList->childCount() > 0)
buttonConnect->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") ) {
for (int c = 0; c < 15; c++) {
usleep(75*1000); //75msec
KApplication::eventLoop()->processEvents( TQEventLoop::AllEvents );
TDEApplication::eventLoop()->processEvents( TQEventLoop::AllEvents );
i++;
}
if (i>400) { //more than 30sec have passed

Loading…
Cancel
Save