Rename KApplication to TDEApplication to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent 6fdacb9c2e
commit 2877440fbd

@ -2287,7 +2287,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
aboutData.addAuthor("Ren" "\xc3\xa9" " M" "\xc3\xa9" "rou", 0, "ochominutosdearco@yahoo.es"); aboutData.addAuthor("Ren" "\xc3\xa9" " M" "\xc3\xa9" "rou", 0, "ochominutosdearco@yahoo.es");
TDECmdLineArgs::init(argc, argv, &aboutData); TDECmdLineArgs::init(argc, argv, &aboutData);
KApplication app; TDEApplication app;
#if 0 #if 0
app->enableSessionManagement(true); app->enableSessionManagement(true);
app->setWmCommand(argv[0]); app->setWmCommand(argv[0]);

@ -29,7 +29,7 @@ int main(int argc, char **argv)
aboutData.addCredit("Benjamin C. Meyer",I18N_NOOP("XMLUI conversion"),"ben+kcharselect@meyerhome.net"); aboutData.addCredit("Benjamin C. Meyer",I18N_NOOP("XMLUI conversion"),"ben+kcharselect@meyerhome.net");
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication app; TDEApplication app;
KConfig *config = kapp->config(); KConfig *config = kapp->config();

@ -120,7 +120,7 @@ void IRKick::doQuit()
case KMessageBox::Yes: theConfig.writeEntry("AutoStart", true); break; case KMessageBox::Yes: theConfig.writeEntry("AutoStart", true); break;
case KMessageBox::Cancel: return; case KMessageBox::Cancel: return;
} }
KApplication::kApplication()->quit(); TDEApplication::kApplication()->quit();
} }
void IRKick::resetModes() void IRKick::resetModes()
@ -152,7 +152,7 @@ void IRKick::slotReloadConfiguration()
void IRKick::slotConfigure() void IRKick::slotConfigure()
{ {
KApplication::startServiceByDesktopName("kcmlirc"); TDEApplication::startServiceByDesktopName("kcmlirc");
} }
void IRKick::updateModeIcons() void IRKick::updateModeIcons()
@ -180,7 +180,7 @@ void IRKick::updateModeIcons()
bool IRKick::getPrograms(const IRAction &action, TQStringList &programs) bool IRKick::getPrograms(const IRAction &action, TQStringList &programs)
{ {
DCOPClient *theDC = KApplication::dcopClient(); DCOPClient *theDC = TDEApplication::dcopClient();
programs.clear(); programs.clear();
if(action.unique()) if(action.unique())
@ -234,7 +234,7 @@ bool IRKick::getPrograms(const IRAction &action, TQStringList &programs)
void IRKick::executeAction(const IRAction &action) void IRKick::executeAction(const IRAction &action)
{ {
DCOPClient *theDC = KApplication::dcopClient(); DCOPClient *theDC = TDEApplication::dcopClient();
TQStringList programs; TQStringList programs;
if(!getPrograms(action, programs)) return; if(!getPrograms(action, programs)) return;
@ -245,7 +245,7 @@ void IRKick::executeAction(const IRAction &action)
if(!sname.isNull()) if(!sname.isNull())
{ {
KPassivePopup::message("IRKick", i18n("Starting <b>%1</b>...").arg(action.application()), SmallIcon("irkick"), theTrayIcon); KPassivePopup::message("IRKick", i18n("Starting <b>%1</b>...").arg(action.application()), SmallIcon("irkick"), theTrayIcon);
KApplication::startServiceByDesktopName(sname); TDEApplication::startServiceByDesktopName(sname);
} }
} }
if(action.isJustStart()) return; if(action.isJustStart()) return;
@ -286,7 +286,7 @@ void IRKick::gotMessage(const TQString &theRemote, const TQString &theButton, in
// send notifier by DCOP to npApp/npModule/npMethod(theRemote, theButton); // send notifier by DCOP to npApp/npModule/npMethod(theRemote, theButton);
TQByteArray data; TQDataStream arg(data, IO_WriteOnly); TQByteArray data; TQDataStream arg(data, IO_WriteOnly);
arg << theRemote << theButton; arg << theRemote << theButton;
KApplication::dcopClient()->send(theApp.utf8(), npModule.utf8(), npMethod.utf8(), data); TDEApplication::dcopClient()->send(theApp.utf8(), npModule.utf8(), npMethod.utf8(), data);
} }
else else
{ {

@ -143,7 +143,7 @@ void AddAction::updateButtonStates()
const TQStringList AddAction::getFunctions(const TQString app, const TQString obj) const TQStringList AddAction::getFunctions(const TQString app, const TQString obj)
{ {
TQStringList ret; TQStringList ret;
DCOPClient *theClient = KApplication::kApplication()->dcopClient(); DCOPClient *theClient = TDEApplication::kApplication()->dcopClient();
QCStringList theApps = theClient->remoteFunctions(app.utf8(), obj.utf8()); QCStringList theApps = theClient->remoteFunctions(app.utf8(), obj.utf8());
for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i) for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i)
if( *i != "QCStringList interfaces()" && if( *i != "QCStringList interfaces()" &&
@ -335,7 +335,7 @@ void AddAction::updateObjects()
uniqueProgramMap.clear(); uniqueProgramMap.clear();
nameProgramMap.clear(); nameProgramMap.clear();
DCOPClient *theClient = KApplication::kApplication()->dcopClient(); DCOPClient *theClient = TDEApplication::kApplication()->dcopClient();
QCStringList theApps = theClient->registeredApplications(); QCStringList theApps = theClient->registeredApplications();
for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i) for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i)
{ {

@ -315,7 +315,7 @@ void EditAction::updateDCOPApplications()
TQStringList names; TQStringList names;
theDCOPApplications->clear(); theDCOPApplications->clear();
DCOPClient *theClient = KApplication::kApplication()->dcopClient(); DCOPClient *theClient = TDEApplication::kApplication()->dcopClient();
QCStringList theApps = theClient->registeredApplications(); QCStringList theApps = theClient->registeredApplications();
for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i) for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i)
{ {
@ -337,7 +337,7 @@ void EditAction::updateDCOPApplications()
void EditAction::updateDCOPObjects() void EditAction::updateDCOPObjects()
{ {
theDCOPObjects->clear(); theDCOPObjects->clear();
DCOPClient *theClient = KApplication::kApplication()->dcopClient(); DCOPClient *theClient = TDEApplication::kApplication()->dcopClient();
if(theDCOPApplications->currentText().isNull() || theDCOPApplications->currentText().isEmpty()) return; if(theDCOPApplications->currentText().isNull() || theDCOPApplications->currentText().isEmpty()) return;
QCStringList theObjects = theClient->remoteObjects(nameProgramMap[theDCOPApplications->currentText()].utf8()); QCStringList theObjects = theClient->remoteObjects(nameProgramMap[theDCOPApplications->currentText()].utf8());
if(!theObjects.size() && theDCOPApplications->currentText() == (*theAction).program()) theDCOPObjects->insertItem((*theAction).object()); if(!theObjects.size() && theDCOPApplications->currentText() == (*theAction).program()) theDCOPObjects->insertItem((*theAction).object());

@ -56,10 +56,10 @@ KCMLirc::KCMLirc(TQWidget *parent, const char *name, TQStringList /*args*/) : DC
setButtons(KCModule::Help); setButtons(KCModule::Help);
setQuickHelp(i18n("<h1>Remote Controls</h1><p>This module allows you to configure bindings between your remote controls and TDE applications. Simply select your remote control and click Add under the Actions/Buttons list. If you want TDE to attempt to automatically assign buttons to a supported application's actions, try clicking the Auto-Populate button.</p><p>To view the recognised applications and remote controls, simply select the <em>Loaded Extensions</em> tab.</p>")); setQuickHelp(i18n("<h1>Remote Controls</h1><p>This module allows you to configure bindings between your remote controls and TDE applications. Simply select your remote control and click Add under the Actions/Buttons list. If you want TDE to attempt to automatically assign buttons to a supported application's actions, try clicking the Auto-Populate button.</p><p>To view the recognised applications and remote controls, simply select the <em>Loaded Extensions</em> tab.</p>"));
bool ok; bool ok;
KApplication::kApplication()->dcopClient()->remoteInterfaces("irkick", "IRKick", &ok); TDEApplication::kApplication()->dcopClient()->remoteInterfaces("irkick", "IRKick", &ok);
if(!ok) if(!ok)
if(KMessageBox::questionYesNo(this, i18n("The Infrared Remote Control software is not currently running. This configuration module will not work properly without it. Would you like to start it now?"), i18n("Software Not Running"), i18n("Start"), i18n("Do Not Start")) == KMessageBox::Yes) if(KMessageBox::questionYesNo(this, i18n("The Infrared Remote Control software is not currently running. This configuration module will not work properly without it. Would you like to start it now?"), i18n("Software Not Running"), i18n("Start"), i18n("Do Not Start")) == KMessageBox::Yes)
{ kdDebug() << "S" << KApplication::startServiceByDesktopName("irkick") << endl; { kdDebug() << "S" << TDEApplication::startServiceByDesktopName("irkick") << endl;
KSimpleConfig theConfig("irkickrc"); KSimpleConfig theConfig("irkickrc");
theConfig.setGroup("General"); theConfig.setGroup("General");
if(theConfig.readBoolEntry("AutoStart", true) == false) if(theConfig.readBoolEntry("AutoStart", true) == false)
@ -67,7 +67,7 @@ KCMLirc::KCMLirc(TQWidget *parent, const char *name, TQStringList /*args*/) : DC
theConfig.writeEntry("AutoStart", true); theConfig.writeEntry("AutoStart", true);
} }
KApplication::kApplication()->dcopClient()->remoteInterfaces("irkick", "IRKick", &ok); TDEApplication::kApplication()->dcopClient()->remoteInterfaces("irkick", "IRKick", &ok);
kdDebug() << "OK" << ok << endl; kdDebug() << "OK" << ok << endl;

@ -58,7 +58,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;
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
// Stop daemon and exit? // Stop daemon and exit?

@ -49,7 +49,7 @@ main(int argc, char ** argv)
{ {
TDECmdLineArgs::init(argc, argv, "test", description, version); TDECmdLineArgs::init(argc, argv, "test", description, version);
KApplication app; TDEApplication app;
KConfig * cfg = kapp->config(); KConfig * cfg = kapp->config();
TQDict<char> dict; TQDict<char> dict;

@ -70,7 +70,7 @@ int main(int argc, char **argv)
aboutData.addAuthor("Michael Kropfberger",0, "michael.kropfberger@gmx.net"); aboutData.addAuthor("Michael Kropfberger",0, "michael.kropfberger@gmx.net");
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication app; TDEApplication app;
if( app.isRestored() ) //SessionManagement if( app.isRestored() ) //SessionManagement
{ {

@ -331,7 +331,7 @@ int main(int argc, char **argv)
"Stanislav.Karchebny@kdemail.net" ); "Stanislav.Karchebny@kdemail.net" );
TDECmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app; TDEApplication app;
KwikDisk *mainWin = 0; KwikDisk *mainWin = 0;
mainWin = new KwikDisk; mainWin = new KwikDisk;

@ -1270,7 +1270,7 @@ extern "C" KDE_EXPORT int kdemain (int argc, char **argv)
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication a; TDEApplication a;
//CT KIO::Job::initStatic(); //CT KIO::Job::initStatic();
if ( a.isRestored() ) if ( a.isRestored() )
{ {

@ -66,7 +66,7 @@ int main( int argc, char *argv[] )
} }
args->clear(); args->clear();
KApplication a; TDEApplication a;
FloppyData* floppy = new FloppyData(); FloppyData* floppy = new FloppyData();
a.setMainWidget(floppy); a.setMainWidget(floppy);

@ -61,7 +61,7 @@ int main(int argc, char *argv[])
return 0; return 0;
//KgpgAppletApp *app; //KgpgAppletApp *app;
KApplication *app; TDEApplication *app;
app=new KgpgAppletApp; app=new KgpgAppletApp;
return app->exec(); return app->exec();

@ -139,7 +139,7 @@ void CDragManager::timerEvent( TQTimerEvent *e )
if( mPending == true ) if( mPending == true )
{ {
mPending = false; mPending = false;
emit startDrag( ( kapp->keyboardModifiers() & KApplication::ShiftModifier ) ); emit startDrag( ( kapp->keyboardModifiers() & TDEApplication::ShiftModifier ) );
} }
} }
} }

@ -312,7 +312,7 @@ class CHexViewWidget : public TQFrame
inline bool CHexViewWidget::shiftButtonState( void ) inline bool CHexViewWidget::shiftButtonState( void )
{ {
return kapp->keyboardModifiers() & KApplication::ShiftModifier; return kapp->keyboardModifiers() & TDEApplication::ShiftModifier;
} }

@ -70,7 +70,7 @@ int main( int argc, char **argv )
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( option ); TDECmdLineArgs::addCmdLineOptions( option );
KApplication app; TDEApplication app;
if( app.isRestored() != 0 ) if( app.isRestored() != 0 )
{ {

@ -44,7 +44,7 @@ main(int argc, char **argv)
aboutData.addAuthor("Paul Campbell",0, "paul@taniwha.com"); aboutData.addAuthor("Paul Campbell",0, "paul@taniwha.com");
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication a; TDEApplication a;
daemon_state s; daemon_state s;
s.load(); s.load();
if (s.need_to_run()) if (s.need_to_run())

@ -820,14 +820,14 @@ void laptop_daemon::invokeHibernate()
void laptop_daemon::invokeLogout() void laptop_daemon::invokeLogout()
{ {
bool rc = kapp->requestShutDown(KApplication::ShutdownConfirmNo, KApplication::ShutdownTypeNone, KApplication::ShutdownModeForceNow); bool rc = kapp->requestShutDown(TDEApplication::ShutdownConfirmNo, TDEApplication::ShutdownTypeNone, TDEApplication::ShutdownModeForceNow);
if (!rc) if (!rc)
KMessageBox::sorry(0, i18n("Logout failed.")); KMessageBox::sorry(0, i18n("Logout failed."));
} }
void laptop_daemon::invokeShutdown() void laptop_daemon::invokeShutdown()
{ {
bool rc = kapp->requestShutDown(KApplication::ShutdownConfirmNo, KApplication::ShutdownTypeHalt, KApplication::ShutdownModeForceNow); bool rc = kapp->requestShutDown(TDEApplication::ShutdownConfirmNo, TDEApplication::ShutdownTypeHalt, TDEApplication::ShutdownModeForceNow);
if (!rc) if (!rc)
KMessageBox::sorry(0, i18n("Shutdown failed.")); KMessageBox::sorry(0, i18n("Shutdown failed."));
} }

@ -40,7 +40,7 @@ int main( int argc, char* argv[] )
KAboutData::License_GPL, KAboutData::License_GPL,
"(c) 2002-2003 Jesper K. Pedersen"); "(c) 2002-2003 Jesper K. Pedersen");
TDECmdLineArgs::init(argc, argv, &aboutData); TDECmdLineArgs::init(argc, argv, &aboutData);
KApplication myapp; TDEApplication myapp;
#endif #endif
TQDialog* top = new TQDialog( 0 ); TQDialog* top = new TQDialog( 0 );

@ -45,7 +45,7 @@ public:
int main( int argc, char* argv[] ) int main( int argc, char* argv[] )
{ {
TDECmdLineArgs::init(argc, argv, "RegExp Example","",""); TDECmdLineArgs::init(argc, argv, "RegExp Example","","");
KApplication myapp( argc, argv ); TDEApplication myapp( argc, argv );
tqApp->installEventFilter( new ShootABug() ); tqApp->installEventFilter( new ShootABug() );

@ -36,7 +36,7 @@ int main( int argc, char **argv )
aboutData.addAuthor("Stefan Schimanski",0, "schimmi@kde.org"); aboutData.addAuthor("Stefan Schimanski",0, "schimmi@kde.org");
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication app; TDEApplication app;
KTimerPref *timer = new KTimerPref; KTimerPref *timer = new KTimerPref;
app.setMainWidget( timer ); app.setMainWidget( timer );

@ -164,7 +164,7 @@ void KWalletConfig::newNetworkWallet() {
void KWalletConfig::launchManager() { void KWalletConfig::launchManager() {
if (!DCOPClient::mainClient()->isApplicationRegistered("kwalletmanager")) { if (!DCOPClient::mainClient()->isApplicationRegistered("kwalletmanager")) {
KApplication::startServiceByDesktopName("kwalletmanager_show"); TDEApplication::startServiceByDesktopName("kwalletmanager_show");
} else { } else {
DCOPRef r("kwalletmanager", "kwalletmanager-mainwindow#1"); DCOPRef r("kwalletmanager", "kwalletmanager-mainwindow#1");
r.send("show"); r.send("show");

@ -52,7 +52,7 @@ KWalletManager::KWalletManager(TQWidget *parent, const char *name, WFlags f)
_kwalletdLaunch = false; _kwalletdLaunch = false;
TQAccel *accel = new TQAccel(this, "kwalletmanager"); TQAccel *accel = new TQAccel(this, "kwalletmanager");
KApplication::dcopClient()->setQtBridgeEnabled(false); TDEApplication::dcopClient()->setQtBridgeEnabled(false);
_shuttingDown = false; _shuttingDown = false;
KConfig cfg("kwalletrc"); // not sure why this setting isn't in kwalletmanagerrc... KConfig cfg("kwalletrc"); // not sure why this setting isn't in kwalletmanagerrc...
KConfigGroup walletConfigGroup(&cfg, "Wallet"); KConfigGroup walletConfigGroup(&cfg, "Wallet");
@ -399,7 +399,7 @@ void KWalletManager::shuttingDown() {
void KWalletManager::setupWallet() { void KWalletManager::setupWallet() {
KApplication::startServiceByDesktopName("kwallet_config"); TDEApplication::startServiceByDesktopName("kwallet_config");
} }

@ -235,7 +235,7 @@ void KarambaApplication::buildToolTip()
setToolTip(toolTip); setToolTip(toolTip);
} }
void KarambaApplication::checkPreviousSession(KApplication &app, void KarambaApplication::checkPreviousSession(TDEApplication &app,
TQStringList &lst) TQStringList &lst)
{ {
/****** /******

@ -36,7 +36,7 @@ class dcopIface_stub;
class KHelpMenu; class KHelpMenu;
class KAboutData; class KAboutData;
class KarambaApplication : public KApplication class KarambaApplication : public TDEApplication
{ {
Q_OBJECT Q_OBJECT
@ -66,7 +66,7 @@ class KarambaApplication : public KApplication
bool themeExists(TQString pretty_name); bool themeExists(TQString pretty_name);
void initDcopStub(TQCString app = ""); void initDcopStub(TQCString app = "");
void setUpSysTray(KAboutData* about); void setUpSysTray(KAboutData* about);
void checkPreviousSession(KApplication &app, TQStringList &lst); void checkPreviousSession(TDEApplication &app, TQStringList &lst);
void checkCommandLine(TDECmdLineArgs *args, TQStringList &lst); void checkCommandLine(TDECmdLineArgs *args, TQStringList &lst);
bool startThemes(TQStringList &lst); bool startThemes(TQStringList &lst);
KarambaIface* dcopIface() { return iface; }; KarambaIface* dcopIface() { return iface; };

@ -56,7 +56,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;
// karamba *mainWin = 0; // karamba *mainWin = 0;
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

Loading…
Cancel
Save