Rename KApplication to TDEApplication to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 50d6569cde
commit 3e4d718796

@ -14,7 +14,7 @@ class rssIface : virtual public DCOPObject
K_DCOP K_DCOP
public: public:
rssIface( KApplication *app) rssIface( TDEApplication *app)
{ {
// get our DCOP client and attach so that we may use it // get our DCOP client and attach so that we may use it
DCOPClient *client = app->dcopClient(); DCOPClient *client = app->dcopClient();
@ -25,7 +25,7 @@ public:
if (!client->isApplicationRegistered("rssservice")) if (!client->isApplicationRegistered("rssservice"))
{ {
kdDebug() << "Could not find service so I am starting it..." << endl; kdDebug() << "Could not find service so I am starting it..." << endl;
if(KApplication::startServiceByName("rssservice",TQStringList(), &error, &appID )) if(TDEApplication::startServiceByName("rssservice",TQStringList(), &error, &appID ))
{ {
kdDebug() << "Starting rssservice failed with message: " << error << endl; kdDebug() << "Starting rssservice failed with message: " << error << endl;
exit(0); exit(0);
@ -69,7 +69,7 @@ public:
*/ */
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
KApplication *app = new KApplication(argc, argv, "client", false); TDEApplication *app = new TDEApplication(argc, argv, "client", false);
app->exec(); app->exec();
} }

@ -134,7 +134,7 @@ int main( int argc, char **argv )
KGlobal::locale()->setMainCatalogue( "dcoprss" ); KGlobal::locale()->setMainCatalogue( "dcoprss" );
KAboutData aboutData( "feedbrowser", I18N_NOOP( "Feed Browser" ), "0.1" ); KAboutData aboutData( "feedbrowser", I18N_NOOP( "Feed Browser" ), "0.1" );
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication app; TDEApplication app;
FeedBrowserDlg *dlg = new FeedBrowserDlg( 0 ); FeedBrowserDlg *dlg = new FeedBrowserDlg( 0 );
app.setMainWidget( dlg ); app.setMainWidget( dlg );
dlg->show(); dlg->show();

@ -278,7 +278,7 @@ void DictApplet::sendCommand(const TQCString &fun, const TQString &data)
DCOPClient *client = kapp->dcopClient(); DCOPClient *client = kapp->dcopClient();
if (!client->isApplicationRegistered("kdict")) { if (!client->isApplicationRegistered("kdict")) {
KApplication::startServiceByDesktopName("kdict"); TDEApplication::startServiceByDesktopName("kdict");
waiting = 1; waiting = 1;
delayedFunc = fun.copy(); delayedFunc = fun.copy();
delayedData = data; delayedData = data;

@ -351,12 +351,12 @@ extern "C"
{ {
int KDE_EXPORT kdemain( int argc, char **argv ) int KDE_EXPORT kdemain( int argc, char **argv )
{ {
// KApplication is necessary to use other ioslaves // TDEApplication is necessary to use other ioslaves
putenv(strdup("SESSION_MANAGER=")); putenv(strdup("SESSION_MANAGER="));
TDECmdLineArgs::init(argc, argv, "kio_zeroconf", 0, 0, 0, 0); TDECmdLineArgs::init(argc, argv, "kio_zeroconf", 0, 0, 0, 0);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication::disableAutoDcopRegistration(); TDEApplication::disableAutoDcopRegistration();
KApplication app; TDEApplication app;
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
ZeroConfProtocol slave( args->arg(0), args->arg(1), args->arg(2) ); ZeroConfProtocol slave( args->arg(0), args->arg(1), args->arg(2) );
slave.dispatchLoop(); slave.dispatchLoop();

@ -119,7 +119,7 @@ void KGetLinkView::slotStartLeech()
if ( !p_dcopServer->isApplicationRegistered( "kget" ) ) if ( !p_dcopServer->isApplicationRegistered( "kget" ) )
{ {
KApplication::startServiceByDesktopName( "kget" ); TDEApplication::startServiceByDesktopName( "kget" );
} }
kapp->updateRemoteUserTimestamp( "kget" ); kapp->updateRemoteUserTimestamp( "kget" );

@ -44,7 +44,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
KApplication app(false, false); TDEApplication app(false, false);
DCOPClient *dcopClient = app.dcopClient(); DCOPClient *dcopClient = app.dcopClient();
dcopClient->attach(); dcopClient->attach();

@ -308,7 +308,7 @@ void NewsScroller::mouseMoveEvent(TQMouseEvent *e)
else else
dragDistance = TQABS(e->y() - m_dragPos.y()); dragDistance = TQABS(e->y() - m_dragPos.y());
m_mouseDrag = (e->state() & Qt::LeftButton != 0) && m_mouseDrag = (e->state() & Qt::LeftButton != 0) &&
dragDistance >= KGlobal::config()->readNumEntry("StartDragDist", KApplication::startDragDistance()); dragDistance >= KGlobal::config()->readNumEntry("StartDragDist", TDEApplication::startDragDistance());
if (m_mouseDrag) // Stop the scroller if we just started a drag. if (m_mouseDrag) // Stop the scroller if we just started a drag.
m_scrollTimer->stop(); m_scrollTimer->stop();
} else { } else {

@ -183,9 +183,9 @@ void ChatWindowStyleRendering_Test::allTests()
// change user data dir to avoid messing with user's .kde dir // change user data dir to avoid messing with user's .kde dir
setenv( "TDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); setenv( "TDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true );
KApplication::disableAutoDcopRegistration(); TDEApplication::disableAutoDcopRegistration();
//TDECmdLineArgs::init(argc,argv,"testkopetemessage", 0, 0, 0, 0); //TDECmdLineArgs::init(argc,argv,"testkopetemessage", 0, 0, 0, 0);
KApplication app; TDEApplication app;
chatPart = new ChatMessagePart(d->fakeChatSession, 0, 0); chatPart = new ChatMessagePart(d->fakeChatSession, 0, 0);

@ -71,7 +71,7 @@ KopeteApplication::KopeteApplication()
* When the messagebox is finished the loop_level will drop down to zero and * When the messagebox is finished the loop_level will drop down to zero and
* TQApplication thinks the application shuts down (this is usually the case * TQApplication thinks the application shuts down (this is usually the case
* when the loop_level goes down to zero) . So it emits aboutToQuit(), to * when the loop_level goes down to zero) . So it emits aboutToQuit(), to
* which KApplication is connected and re-emits shutdown() , to which again * which TDEApplication is connected and re-emits shutdown() , to which again
* KMainWindow (a KopeteWindow instance exists already) is connected. KMainWindow's * KMainWindow (a KopeteWindow instance exists already) is connected. KMainWindow's
* shuttingDown() slot calls queryExit() which results in KopeteWindow::queryExit() * shuttingDown() slot calls queryExit() which results in KopeteWindow::queryExit()
* calling unloadPlugins() . This of course is wrong and just shouldn't happen. * calling unloadPlugins() . This of course is wrong and just shouldn't happen.

@ -112,8 +112,8 @@ void GlobalStatusMessageIconLabel::mouseReleaseEvent( TQMouseEvent *event )
* shuts down the PluginManager in queryExit(). When the PluginManager has completed its * shuts down the PluginManager in queryExit(). When the PluginManager has completed its
* shutdown, the app is finally deref()ed, and the contactlist and accountmanager * shutdown, the app is finally deref()ed, and the contactlist and accountmanager
* are saved. * are saved.
* and calling KApplication::quit() * and calling TDEApplication::quit()
* 2) session - KopeteWindow and all chatwindows are closed by KApplication session management. * 2) session - KopeteWindow and all chatwindows are closed by TDEApplication session management.
* quit Then the shutdown proceeds as above. * quit Then the shutdown proceeds as above.
* *
* queryClose() is honoured so group chats and chats receiving recent messages can interrupt * queryClose() is honoured so group chats and chats receiving recent messages can interrupt

@ -251,12 +251,12 @@ public:
KopetePasswordSetRequest( Kopete::Password &pass, const TQString &newPass ) KopetePasswordSetRequest( Kopete::Password &pass, const TQString &newPass )
: KopetePasswordRequest( 0, pass ), mNewPass( newPass ) : KopetePasswordRequest( 0, pass ), mNewPass( newPass )
{ {
if ( KApplication *app = KApplication::kApplication() ) if ( TDEApplication *app = TDEApplication::kApplication() )
app->ref(); app->ref();
} }
~KopetePasswordSetRequest() ~KopetePasswordSetRequest()
{ {
if ( KApplication *app = KApplication::kApplication() ) if ( TDEApplication *app = TDEApplication::kApplication() )
app->deref(); app->deref();
kdDebug( 14010 ) << k_funcinfo << "job complete" << endl; kdDebug( 14010 ) << k_funcinfo << "job complete" << endl;
} }
@ -315,12 +315,12 @@ public:
KopetePasswordClearRequest( Kopete::Password &pass ) KopetePasswordClearRequest( Kopete::Password &pass )
: KopetePasswordRequest( 0, pass ) : KopetePasswordRequest( 0, pass )
{ {
if ( KApplication *app = KApplication::kApplication() ) if ( TDEApplication *app = TDEApplication::kApplication() )
app->ref(); app->ref();
} }
~KopetePasswordClearRequest() ~KopetePasswordClearRequest()
{ {
if ( KApplication *app = KApplication::kApplication() ) if ( TDEApplication *app = TDEApplication::kApplication() )
app->deref(); app->deref();
kdDebug( 14010 ) << k_funcinfo << "job complete" << endl; kdDebug( 14010 ) << k_funcinfo << "job complete" << endl;
} }

@ -198,7 +198,7 @@ private slots:
void slotShutdownTimeout(); void slotShutdownTimeout();
/** /**
* Common entry point to deref() the KApplication. Used both by the clean * Common entry point to deref() the TDEApplication. Used both by the clean
* shutdown and the timeout condition of slotShutdownTimeout() * shutdown and the timeout condition of slotShutdownTimeout()
*/ */
void slotShutdownDone(); void slotShutdownDone();

@ -83,7 +83,7 @@ bool isHostReachable(const TQString &host)
TQDataStream stream(params, IO_WriteOnly); TQDataStream stream(params, IO_WriteOnly);
stream << host; stream << host;
if ( KApplication::kApplication()->dcopClient()->call( "kded", "networkstatus", "status(TQString)", params, replyType, reply ) && (replyType == "int") ) if ( TDEApplication::kApplication()->dcopClient()->call( "kded", "networkstatus", "status(TQString)", params, replyType, reply ) && (replyType == "int") )
{ {
int result; int result;
TQDataStream stream2( reply, IO_ReadOnly ); TQDataStream stream2( reply, IO_ReadOnly );

@ -88,7 +88,7 @@ void Kopete::Command::processCommand( const TQString &args, Kopete::ChatSession
"\"%1\" has a maximum of %n arguments.", m_minArgs) "\"%1\" has a maximum of %n arguments.", m_minArgs)
.arg( text() ), manager, gui ); .arg( text() ), manager, gui );
} }
else if( !KApplication::kApplication()->authorizeKAction( name() ) ) else if( !TDEApplication::kApplication()->authorizeKAction( name() ) )
{ {
printError( i18n("You are not authorized to perform the command \"%1\".").arg(text()), manager, gui ); printError( i18n("You are not authorized to perform the command \"%1\".").arg(text()), manager, gui );
} }

@ -53,8 +53,8 @@ void KopeteEmoticonTest::allTests()
// change user data dir to avoid messing with user's .kde dir // change user data dir to avoid messing with user's .kde dir
setenv( "TDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); setenv( "TDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true );
//KApplication::disableAutoDcopRegistration(); //TDEApplication::disableAutoDcopRegistration();
//KApplication app; //TDEApplication app;
testEmoticonParser(); testEmoticonParser();
} }

@ -64,7 +64,7 @@ KopeteMessage_Test::KopeteMessage_Test()
void KopeteMessage_Test::allTests() void KopeteMessage_Test::allTests()
{ {
KApplication::disableAutoDcopRegistration(); TDEApplication::disableAutoDcopRegistration();
//TDECmdLineArgs::init(argc,argv,"testkopetemessage", 0, 0, 0, 0); //TDECmdLineArgs::init(argc,argv,"testkopetemessage", 0, 0, 0, 0);
// At least Kopete::Message::asXML() seems to require that a TQApplication // At least Kopete::Message::asXML() seems to require that a TQApplication
@ -72,7 +72,7 @@ void KopeteMessage_Test::allTests()
// version does. // version does.
if (!kapp) if (!kapp)
new KApplication(); new TDEApplication();
testPrimitives(); testPrimitives();
testLinkParser(); testLinkParser();

@ -71,7 +71,7 @@ int main( int argc, char *argv[] )
TDECmdLineArgs::addCmdLineOptions( opts ); TDECmdLineArgs::addCmdLineOptions( opts );
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
KApplication app( "kopetepasswordtest" ); TDEApplication app( "kopetepasswordtest" );
bool setPassword = args->isSet("set"); bool setPassword = args->isSet("set");
TQString newPwd = args->getOption("set"); TQString newPwd = args->getOption("set");

@ -65,7 +65,7 @@ int main( int argc, char *argv[] )
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
KCmdLineOptions opts[] = { {"+action",0,0}, KCmdLineLastOption }; KCmdLineOptions opts[] = { {"+action",0,0}, KCmdLineLastOption };
TDECmdLineArgs::addCmdLineOptions( opts ); TDECmdLineArgs::addCmdLineOptions( opts );
KApplication app( "kopetewallettest" ); TDEApplication app( "kopetewallettest" );
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

@ -33,7 +33,7 @@ int main( int argc, char** argv ) {
TDECmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
KApplication app; TDEApplication app;
KUnitTest::Runner::registerTester("ClientTest", new ClientTest); KUnitTest::Runner::registerTester("ClientTest", new ClientTest);

@ -44,7 +44,7 @@ KSSLSocket::KSSLSocket() : KExtendedSocket()
{ {
d = new KSSLSocketPrivate; d = new KSSLSocketPrivate;
d->kssl = 0; d->kssl = 0;
d->dcc = KApplication::kApplication()->dcopClient(); d->dcc = TDEApplication::kApplication()->dcopClient();
d->cc = new KSSLCertificateCache; d->cc = new KSSLCertificateCache;
d->cc->reload(); d->cc->reload();
@ -186,7 +186,7 @@ void KSSLSocket::showInfoDialog()
{ {
if (!d->dcc->isApplicationRegistered("kio_uiserver")) if (!d->dcc->isApplicationRegistered("kio_uiserver"))
{ {
KApplication::startServiceByDesktopPath("kio_uiserver.desktop",TQStringList()); TDEApplication::startServiceByDesktopPath("kio_uiserver.desktop",TQStringList());
} }
TQByteArray data, ignore; TQByteArray data, ignore;
@ -235,7 +235,7 @@ int KSSLSocket::messageBox( KIO::SlaveBase::MessageBoxType type, const TQString
if (!d->dcc->isApplicationRegistered("kio_uiserver")) if (!d->dcc->isApplicationRegistered("kio_uiserver"))
{ {
KApplication::startServiceByDesktopPath("kio_uiserver.desktop",TQStringList()); TDEApplication::startServiceByDesktopPath("kio_uiserver.desktop",TQStringList());
} }
d->dcc->call("kio_uiserver", "UIServer", d->dcc->call("kio_uiserver", "UIServer",

@ -380,7 +380,7 @@ extern "C"
int kdemain ( int argc, char **argv ) int kdemain ( int argc, char **argv )
{ {
KApplication app(argc, argv, "kio_jabberdisco", false, true); TDEApplication app(argc, argv, "kio_jabberdisco", false, true);
kdDebug(JABBER_DISCO_DEBUG) << k_funcinfo << endl; kdDebug(JABBER_DISCO_DEBUG) << k_funcinfo << endl;

@ -238,7 +238,7 @@ void AIMContact::userInfoUpdated( const TQString& contact, const UserDetails& de
if ( !mAccount->engine()->hasIconConnection() ) if ( !mAccount->engine()->hasIconConnection() )
mAccount->engine()->requestServerRedirect( 0x0010 ); mAccount->engine()->requestServerRedirect( 0x0010 );
int time = ( KApplication::random() % 10 ) * 1000; int time = ( TDEApplication::random() % 10 ) * 1000;
kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating buddy icon in " << time/1000 << " seconds" << endl; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating buddy icon in " << time/1000 << " seconds" << endl;
TQTimer::singleShot( time, this, TQT_SLOT( requestBuddyIcon() ) ); TQTimer::singleShot( time, this, TQT_SLOT( requestBuddyIcon() ) );
} }

@ -190,7 +190,7 @@ void ICQContact::userInfoUpdated( const TQString& contact, const UserDetails& de
} }
else else
{ {
int time = ( KApplication::random() % 10 ) * 1000; int time = ( TDEApplication::random() % 10 ) * 1000;
kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating buddy icon in " kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating buddy icon in "
<< time/1000 << " seconds" << endl; << time/1000 << " seconds" << endl;
TQTimer::singleShot( time, this, TQT_SLOT( requestBuddyIcon() ) ); TQTimer::singleShot( time, this, TQT_SLOT( requestBuddyIcon() ) );
@ -235,7 +235,7 @@ void ICQContact::loggedIn()
!m_requestingNickname && m_ssiItem.alias().isEmpty() ) !m_requestingNickname && m_ssiItem.alias().isEmpty() )
{ {
m_requestingNickname = true; m_requestingNickname = true;
int time = ( KApplication::random() % 20 ) * 1000; int time = ( TDEApplication::random() % 20 ) * 1000;
kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating nickname in " << time/1000 << " seconds" << endl; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating nickname in " << time/1000 << " seconds" << endl;
TQTimer::singleShot( time, this, TQT_SLOT( requestShortInfo() ) ); TQTimer::singleShot( time, this, TQT_SLOT( requestShortInfo() ) );
} }

@ -63,8 +63,8 @@ void ChatServiceTask::onGo()
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "sending '" << m_message.textArray() << "' to the " kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "sending '" << m_message.textArray() << "' to the "
<< m_room << " room" << endl; << m_room << " room" << endl;
Buffer* b = new Buffer(); Buffer* b = new Buffer();
b->addDWord( KApplication::random() ); //use kapp since it's convenient b->addDWord( TDEApplication::random() ); //use kapp since it's convenient
b->addDWord( KApplication::random() ); b->addDWord( TDEApplication::random() );
b->addWord( 0x0003 ); //this be message channel 3 mateys! arrr!! b->addWord( 0x0003 ); //this be message channel 3 mateys! arrr!!
b->addDWord( 0x00010000 ); //TLV 1 - this means it's a public message b->addDWord( 0x00010000 ); //TLV 1 - this means it's a public message
b->addDWord( 0x00060000 ); //TLV 6 - enables the server sending you your message back b->addDWord( 0x00060000 ); //TLV 6 - enables the server sending you your message back

@ -207,8 +207,8 @@ void Connection::forcedSend( Transfer* request ) const
void Connection::initSequence() void Connection::initSequence()
{ {
d->snacSequence = ( KApplication::random() & 0xFFFF ); d->snacSequence = ( TDEApplication::random() & 0xFFFF );
d->flapSequence = ( KApplication::random() & 0xFFFF ); d->flapSequence = ( TDEApplication::random() & 0xFFFF );
} }
void Connection::distribute( Transfer * transfer ) const void Connection::distribute( Transfer * transfer ) const

@ -65,8 +65,8 @@ void SendMessageTask::onGo()
if ( snacSubfamily == 0x0006 ) if ( snacSubfamily == 0x0006 )
{ {
DWORD cookie1 = KApplication::random(); DWORD cookie1 = TDEApplication::random();
DWORD cookie2 = KApplication::random(); DWORD cookie2 = TDEApplication::random();
b->addDWord( cookie1 ); b->addDWord( cookie1 );
b->addDWord( cookie2 ); b->addDWord( cookie2 );

@ -111,7 +111,7 @@ bool WinPopupLib::checkMessageDir()
TQString::fromLatin1("Winpopup"), i18n("Create Directory"), i18n("Do Not Create")); TQString::fromLatin1("Winpopup"), i18n("Create Directory"), i18n("Do Not Create"));
if (tmpYesNo == KMessageBox::Yes) { if (tmpYesNo == KMessageBox::Yes) {
TQStringList tdesuArgs = TQStringList(TQString("-c mkdir -p -m 0777 " + WP_POPUP_DIR)); TQStringList tdesuArgs = TQStringList(TQString("-c mkdir -p -m 0777 " + WP_POPUP_DIR));
if (KApplication::tdeinitExecWait("tdesu", tdesuArgs) == 0) return true; if (TDEApplication::tdeinitExecWait("tdesu", tdesuArgs) == 0) return true;
} }
} else { } else {
KFileItem tmpFileItem = KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL::fromPathOrURL(WP_POPUP_DIR)); KFileItem tmpFileItem = KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL::fromPathOrURL(WP_POPUP_DIR));
@ -130,7 +130,7 @@ bool WinPopupLib::checkMessageDir()
TQString::fromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix")); TQString::fromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix"));
if (tmpYesNo == KMessageBox::Yes) { if (tmpYesNo == KMessageBox::Yes) {
TQStringList tdesuArgs = TQStringList(TQString("-c chmod 0777 " + WP_POPUP_DIR)); TQStringList tdesuArgs = TQStringList(TQString("-c chmod 0777 " + WP_POPUP_DIR));
if (KApplication::tdeinitExecWait("tdesu", tdesuArgs) == 0) return true; if (TDEApplication::tdeinitExecWait("tdesu", tdesuArgs) == 0) return true;
} }
} else { } else {
return true; return true;
@ -306,7 +306,7 @@ void WinPopupLib::readMessages(const KFileItemList &items)
TQString::fromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix")); TQString::fromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix"));
if (tmpYesNo == KMessageBox::Yes) { if (tmpYesNo == KMessageBox::Yes) {
TQStringList tdesuArgs = TQStringList(TQString("-c chmod 0666 " + tmpItem->url().path())); TQStringList tdesuArgs = TQStringList(TQString("-c chmod 0666 " + tmpItem->url().path()));
if (KApplication::tdeinitExecWait("tdesu", tdesuArgs) == 0) { if (TDEApplication::tdeinitExecWait("tdesu", tdesuArgs) == 0) {
if (!messageFile.remove()) if (!messageFile.remove())
KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("Still cannot remove it; please fix manually.")); KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("Still cannot remove it; please fix manually."));
} }

@ -140,7 +140,7 @@ void WPProtocol::installSamba()
TQStringList args; TQStringList args;
args += KStandardDirs::findExe("winpopup-install.sh"); args += KStandardDirs::findExe("winpopup-install.sh");
args += KStandardDirs::findExe("winpopup-send.sh"); args += KStandardDirs::findExe("winpopup-send.sh");
if (KApplication::tdeinitExecWait("tdesu", args) == 0) if (TDEApplication::tdeinitExecWait("tdesu", args) == 0)
KMessageBox::information(Kopete::UI::Global::mainWidget(), i18n("The Samba configuration file is modified."), i18n("Configuration Succeeded")); KMessageBox::information(Kopete::UI::Global::mainWidget(), i18n("The Samba configuration file is modified."), i18n("Configuration Succeeded"));
else else
KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("Updating the Samba configuration file failed."), i18n("Configuration Failed")); KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("Updating the Samba configuration file failed."), i18n("Configuration Failed"));

@ -311,7 +311,7 @@ TQString SendFileTask::newYahooTransferId()
for(int i = 0; i < 22; i++) for(int i = 0; i < 22; i++)
{ {
char j = KApplication::random() % 61; char j = TDEApplication::random() % 61;
if(j < 26) if(j < 26)
newId += j + 'a'; newId += j + 'a';

@ -124,7 +124,7 @@
* don't ignore SIGHUP anymore. Forbidding Ctrl-Z is crazy. * don't ignore SIGHUP anymore. Forbidding Ctrl-Z is crazy.
* a bit more respect for Session Managment by adding handlers * a bit more respect for Session Managment by adding handlers
for KApplication::saveYourSelf() and shutDown(). A user for TDEApplication::saveYourSelf() and shutDown(). A user
had reported corrupted config data. had reported corrupted config data.
* made 'Log' a toggle button to represent debug window state * made 'Log' a toggle button to represent debug window state
@ -1182,7 +1182,7 @@
* replaced klocale->translate() with i18n() and every reference to * replaced klocale->translate() with i18n() and every reference to
XPPP with KPPP XPPP with KPPP
* utilize ´kapp´ (defined in kapp.h) instead of the global ´extern * utilize ´kapp´ (defined in kapp.h) instead of the global ´extern
KApplication *app´ TDEApplication *app´
(Sorry about the large amount of changes, but I couldn´t resist to (Sorry about the large amount of changes, but I couldn´t resist to
clean up the code) clean up the code)
@ -1344,7 +1344,7 @@ Wed Mar 18 01:13:50 1998 Harri Porten <porten@tu-harburg.de>
Mon Mar 16 03:37:04 1998 Bernd Johannes Wuebben <wuebben@math.cornell.edu> Mon Mar 16 03:37:04 1998 Bernd Johannes Wuebben <wuebben@math.cornell.edu>
* command line options need to be parse after creating a KApplications * command line options need to be parse after creating a TDEApplications
due to some changes by Matthias in kapp I think. due to some changes by Matthias in kapp I think.
1998-03-15 Mario Weilguni <mweilguni@kde.org> 1998-03-15 Mario Weilguni <mweilguni@kde.org>

@ -274,9 +274,9 @@ KPPPWidget::KPPPWidget( TQWidget *parent, const char *name )
this, TQT_SLOT(startAccounting())); this, TQT_SLOT(startAccounting()));
connect(con, TQT_SIGNAL(stopAccounting()), connect(con, TQT_SIGNAL(stopAccounting()),
this, TQT_SLOT(stopAccounting())); this, TQT_SLOT(stopAccounting()));
connect(KApplication::kApplication(), TQT_SIGNAL(saveYourself()), connect(TDEApplication::kApplication(), TQT_SIGNAL(saveYourself()),
this, TQT_SLOT(saveMyself())); this, TQT_SLOT(saveMyself()));
connect(KApplication::kApplication(), TQT_SIGNAL(shutDown()), connect(TDEApplication::kApplication(), TQT_SIGNAL(shutDown()),
this, TQT_SLOT(shutDown())); this, TQT_SLOT(shutDown()));
debugwindow->setGeometry(desk.center().x()+190, desk.center().y()-55, debugwindow->setGeometry(desk.center().x()+190, desk.center().y()-55,

@ -113,7 +113,7 @@ int main(int argc, char **argv) {
TDECmdLineArgs::addCmdLineOptions( option ); TDECmdLineArgs::addCmdLineOptions( option );
KApplication a; TDEApplication a;
loadLogs(); loadLogs();

@ -212,7 +212,7 @@ int main( int argc, char **argv ) {
KApplication a; TDEApplication a;
// set portable locale for decimal point // set portable locale for decimal point
setlocale(LC_NUMERIC ,"C"); setlocale(LC_NUMERIC ,"C");

@ -191,7 +191,7 @@ void MiniTerm::cancelbutton() {
statusbar->setText(i18n("Hanging up...")); statusbar->setText(i18n("Hanging up..."));
kapp->processEvents(); kapp->processEvents();
KApplication::flushX(); TDEApplication::flushX();
Modem::modem->hangup(); Modem::modem->hangup();
@ -206,7 +206,7 @@ void MiniTerm::resetModem() {
statusbar->setText(i18n("Resetting Modem")); statusbar->setText(i18n("Resetting Modem"));
terminal->newLine(); terminal->newLine();
kapp->processEvents(); kapp->processEvents();
KApplication::flushX(); TDEApplication::flushX();
Modem::modem->hangup(); Modem::modem->hangup();

@ -95,7 +95,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication a; TDEApplication a;
TQString host = TQString(); TQString host = TQString();
Quality quality = QUALITY_UNKNOWN; Quality quality = QUALITY_UNKNOWN;
@ -158,7 +158,7 @@ int main(int argc, char *argv[])
return mc.main(); return mc.main();
} }
MainController::MainController(KApplication *app, WindowMode wm, MainController::MainController(TDEApplication *app, WindowMode wm,
const TQString &host, const TQString &host,
Quality quality, Quality quality,
const TQString &encodings, const TQString &encodings,

@ -23,7 +23,7 @@
#include "kremoteview.h" #include "kremoteview.h"
#include "smartptr.h" #include "smartptr.h"
class KApplication; class TDEApplication;
class MainController : public TQObject { class MainController : public TQObject {
Q_OBJECT Q_OBJECT
@ -38,10 +38,10 @@ private:
TQString m_keymap; TQString m_keymap;
Quality m_quality; Quality m_quality;
KApplication *m_app; TDEApplication *m_app;
public: public:
MainController(KApplication *app, WindowMode wm, MainController(TDEApplication *app, WindowMode wm,
const TQString &host, const TQString &host,
Quality quality, Quality quality,
const TQString &encodings, const TQString &encodings,

@ -200,7 +200,7 @@ void KVncView::configureApp(Quality q, const TQString specialEncodings) {
bool KVncView::checkLocalKRfb() { bool KVncView::checkLocalKRfb() {
if ( m_host != "localhost" && !m_host.isEmpty() ) if ( m_host != "localhost" && !m_host.isEmpty() )
return true; return true;
DCOPClient *d = KApplication::dcopClient(); DCOPClient *d = TDEApplication::dcopClient();
int portNum; int portNum;
TQByteArray sdata, rdata; TQByteArray sdata, rdata;
@ -803,9 +803,9 @@ extern int isQuitFlagSet() {
} }
extern void DrawScreenRegion(int x, int y, int width, int height) { extern void DrawScreenRegion(int x, int y, int width, int height) {
/* KApplication::kApplication()->lock(); /* TDEApplication::kApplication()->lock();
kvncview->drawRegion(x, y, width, height); kvncview->drawRegion(x, y, width, height);
KApplication::kApplication()->unlock(); TDEApplication::kApplication()->unlock();
*/ */
TQApplication::postEvent(kvncview, new ScreenRepaintEvent(x, y, width, height)); TQApplication::postEvent(kvncview, new ScreenRepaintEvent(x, y, width, height));
} }

@ -104,7 +104,7 @@ void KcmKRfb::checkKInetd(bool &kinetdAvailable, bool &krfbAvailable) {
kinetdAvailable = false; kinetdAvailable = false;
krfbAvailable = false; krfbAvailable = false;
DCOPClient *d = KApplication::dcopClient(); DCOPClient *d = TDEApplication::dcopClient();
TQByteArray sdata, rdata; TQByteArray sdata, rdata;
TQCString replyType; TQCString replyType;

@ -51,7 +51,7 @@ Configuration::Configuration(krfb_mode mode) :
portNum(-1), portNum(-1),
kinetdRef("kded", "kinetd") kinetdRef("kded", "kinetd")
{ {
kinetdRef.setDCOPClient(KApplication::dcopClient()); kinetdRef.setDCOPClient(TDEApplication::dcopClient());
loadFromKConfig(); loadFromKConfig();
saveToDialogs(); saveToDialogs();
doKinetdConf(); doKinetdConf();
@ -438,7 +438,7 @@ void Configuration::inviteEmail() {
save(); save();
emit invitationNumChanged(invitationList.size()); emit invitationNumChanged(invitationList.size());
KApplication *app = KApplication::kApplication(); TDEApplication *app = TDEApplication::kApplication();
app->invokeMailer(TQString(), TQString(), TQString(), app->invokeMailer(TQString(), TQString(), TQString(),
i18n("Desktop Sharing (VNC) invitation"), i18n("Desktop Sharing (VNC) invitation"),
i18n("You have been invited to a VNC session. If you have the TDE Remote " i18n("You have been invited to a VNC session. If you have the TDE Remote "

@ -31,12 +31,12 @@ TQString cryptStr(const TQString &aStr) {
} }
// a random string that doesn't contain i, I, o, O, 1, 0 // a random string that doesn't contain i, I, o, O, 1, 0
// based on KApplication::randomString() // based on TDEApplication::randomString()
static TQString readableRandomString(int length) { static TQString readableRandomString(int length) {
TQString str; TQString str;
while (length) while (length)
{ {
int r = KApplication::random() % 62; int r = TDEApplication::random() % 62;
r += 48; r += 48;
if (r > 57) if (r > 57)
r += 7; r += 7;

@ -55,7 +55,7 @@ static KCmdLineOptions options[] =
void checkKInetd(bool &kinetdAvailable, bool &krfbAvailable) { void checkKInetd(bool &kinetdAvailable, bool &krfbAvailable) {
DCOPRef ref("kded", "kinetd"); DCOPRef ref("kded", "kinetd");
ref.setDCOPClient(KApplication::dcopClient()); ref.setDCOPClient(TDEApplication::dcopClient());
DCOPReply r = ref.call("isInstalled", TQString("krfb")); DCOPReply r = ref.call("isInstalled", TQString("krfb"));
if (!r.isValid()) { if (!r.isValid()) {
@ -101,7 +101,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::init(argc, argv, &aboutData); TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
KApplication app; TDEApplication app;
Configuration *config; Configuration *config;
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

@ -118,11 +118,11 @@ class AppLocker
{ {
public: public:
AppLocker() { AppLocker() {
KApplication::kApplication()->lock(); TDEApplication::kApplication()->lock();
} }
~AppLocker() { ~AppLocker() {
KApplication::kApplication()->unlock(); TDEApplication::kApplication()->unlock();
} }
}; };
@ -560,7 +560,7 @@ void RFBController::disableBackground(bool state) {
disableBackgroundState = state; disableBackgroundState = state;
DCOPRef ref("kdesktop", "KBackgroundIface"); DCOPRef ref("kdesktop", "KBackgroundIface");
ref.setDCOPClient(KApplication::dcopClient()); ref.setDCOPClient(TDEApplication::dcopClient());
ref.send("setBackgroundEnabled(bool)", bool(!state)); ref.send("setBackgroundEnabled(bool)", bool(!state));
} }

@ -70,7 +70,7 @@ int main(int argc, char **argv){
aboutData.addAuthor("Andrew Stanley-Jones",I18N_NOOP("Original Author"), "asj-ksirc@cban.com"); aboutData.addAuthor("Andrew Stanley-Jones",I18N_NOOP("Original Author"), "asj-ksirc@cban.com");
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication a(argc, argv); TDEApplication a(argc, argv);
kConfig = a.config(); kConfig = a.config();

@ -32,7 +32,7 @@ private:
int main(int argc, char **argv){ int main(int argc, char **argv){
KApplication a(argc, argv, "dccMgrTest" ); TDEApplication a(argc, argv, "dccMgrTest" );
dccManager kst(0, "toplevel"); dccManager kst(0, "toplevel");
Timer t(&kst); Timer t(&kst);

@ -1962,7 +1962,7 @@ void TextView::contentsMouseReleaseEvent( TQMouseEvent *ev )
if (ev->button() & Qt::MidButton) if (ev->button() & Qt::MidButton)
{ {
emit pasteReq( KApplication::clipboard()->text( TQClipboard::Selection ) ); emit pasteReq( TDEApplication::clipboard()->text( TQClipboard::Selection ) );
return; return;
} }
} }

@ -27,7 +27,7 @@ private:
int main( int argc, char **argv ) int main( int argc, char **argv )
{ {
KApplication app( argc, argv, "kstextviewtest" ); TDEApplication app( argc, argv, "kstextviewtest" );
KSirc::TextView view( 0 ); KSirc::TextView view( 0 );
app.setMainWidget( &view ); app.setMainWidget( &view );

@ -218,7 +218,7 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
/* /*
* Ok, let's look at the basic widget "layout" * Ok, let's look at the basic widget "layout"
* Everything belongs to q TQFrame F, this is use so we * Everything belongs to q TQFrame F, this is use so we
* can give the KApplication a single main client widget, which is needs. * can give the TDEApplication a single main client widget, which is needs.
* *
* A TQVbox and a TQHbox is used to ctronl the 3 sub widget * A TQVbox and a TQHbox is used to ctronl the 3 sub widget
* The Modified TQListBox is then added side by side with the User list box. * The Modified TQListBox is then added side by side with the User list box.
@ -271,7 +271,7 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
// f = new kstInside(top, TQString(TQObject::name()) + "_" + "kstIFrame"); // f = new kstInside(top, TQString(TQObject::name()) + "_" + "kstIFrame");
top->setStretchFactor(pan, 1); top->setStretchFactor(pan, 1);
setCentralWidget(top); // Tell the KApplication what the main widget is. setCentralWidget(top); // Tell the TDEApplication what the main widget is.
logFile = 0; logFile = 0;
if ( ksopts->chan(m_channelInfo).logging && (m_channelInfo.channel() != "!no_channel" )) if ( ksopts->chan(m_channelInfo).logging && (m_channelInfo.channel() != "!no_channel" ))
@ -1497,8 +1497,8 @@ void KSircTopLevel::openQueryFromNick(const TQString &nick)
void KSircTopLevel::pasteToWindow() void KSircTopLevel::pasteToWindow()
{ {
// Ctrl-V // Ctrl-V
//kdDebug(5008) << "Going to paste: " << KApplication::clipboard()->text( TQClipboard::Clipboard ) << endl; //kdDebug(5008) << "Going to paste: " << TDEApplication::clipboard()->text( TQClipboard::Clipboard ) << endl;
slotTextDropped(KApplication::clipboard()->text( TQClipboard::Clipboard ) ); slotTextDropped(TDEApplication::clipboard()->text( TQClipboard::Clipboard ) );
} }
void KSircTopLevel::pasteToNickList(int button, void KSircTopLevel::pasteToNickList(int button,
@ -1510,7 +1510,7 @@ void KSircTopLevel::pasteToNickList(int button,
emit open_toplevel(ci); emit open_toplevel(ci);
TQStringList lines = TQStringList::split( '\n', TQStringList lines = TQStringList::split( '\n',
KApplication::clipboard()->text( TQClipboard::Selection ), TDEApplication::clipboard()->text( TQClipboard::Selection ),
true ); true );
TQStringList::ConstIterator it = lines.begin(); TQStringList::ConstIterator it = lines.begin();
TQStringList::ConstIterator end = lines.end(); TQStringList::ConstIterator end = lines.end();

@ -365,7 +365,7 @@
It sets now $TDEBINDIR, for portable ktalkdrc files. TDEBINDIR It sets now $TDEBINDIR, for portable ktalkdrc files. TDEBINDIR
is determined by a call to the kde_bindir() function. is determined by a call to the kde_bindir() function.
Makefile doesn't define TALKD_CONF anymore for compilation : Makefile doesn't define TALKD_CONF anymore for compilation :
ktalkd now opens ktalkdrc from KApplication::kde_configdir(). ktalkd now opens ktalkdrc from TDEApplication::kde_configdir().
1998-03-26 David Faure <faure@kde.org> (0.5.0) 1998-03-26 David Faure <faure@kde.org> (0.5.0)
ktalkdrc: Extprg is now $TDEDIR/bin/ktalkdlg. ktalkdrc: Extprg is now $TDEDIR/bin/ktalkdlg.

@ -77,7 +77,7 @@ int main (int argc, char **argv)
TDECmdLineArgs::init(argc, argv, "ktalkdlg", description, version ); TDECmdLineArgs::init(argc, argv, "ktalkdlg", description, version );
TDECmdLineArgs::addCmdLineOptions( option ); TDECmdLineArgs::addCmdLineOptions( option );
KLocale::setMainCatalogue( "kcmktalkd" ); KLocale::setMainCatalogue( "kcmktalkd" );
KApplication a; TDEApplication a;
struct timeval clock; struct timeval clock;
struct timezone zone; struct timezone zone;

@ -292,7 +292,7 @@ void LisaSettings::save()
KProcess *proc = new KProcess(); KProcess *proc = new KProcess();
connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(saveDone(KProcess *))); connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(saveDone(KProcess *)));
*proc<<"tdesu"<<"-c"<<suCommand; *proc<<"tdesu"<<"-c"<<suCommand;
KApplication::setOverrideCursor(TQt::waitCursor); TDEApplication::setOverrideCursor(TQt::waitCursor);
setEnabled(false); setEnabled(false);
if ( !proc->start() ) if ( !proc->start() )
delete proc; delete proc;
@ -376,7 +376,7 @@ void LisaSettings::autoSetup()
void LisaSettings::saveDone(KProcess *proc) void LisaSettings::saveDone(KProcess *proc)
{ {
unlink(TQFile::encodeName(m_tmpFilename)); unlink(TQFile::encodeName(m_tmpFilename));
KApplication::restoreOverrideCursor(); TDEApplication::restoreOverrideCursor();
setEnabled(true); setEnabled(true);
KMessageBox::information(0,i18n("The configuration has been saved to /etc/lisarc.\n" KMessageBox::information(0,i18n("The configuration has been saved to /etc/lisarc.\n"
"Make sure that the LISa daemon is started,\n e.g. using an init script when booting.\n" "Make sure that the LISa daemon is started,\n e.g. using an init script when booting.\n"

@ -30,7 +30,7 @@ int main( int argc, char **argv )
{ {
KAboutData aboutData( "testlibrss", "testlibrss", "0.1" ); KAboutData aboutData( "testlibrss", "testlibrss", "0.1" );
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication app; TDEApplication app;
Tester tester; Tester tester;
tester.test(); tester.test();

@ -47,7 +47,7 @@ main (int argc, char *argv[])
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs (); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs ();
args->clear (); args->clear ();
KApplication app; TDEApplication app;
if (app.isRestored ()) if (app.isRestored ())
{ {

Loading…
Cancel
Save