Rename KApplication to TDEApplication to avoid conflicts with KDE4

pull/2/head
Timothy Pearson 12 years ago
parent a200f22dde
commit 4774c021a4

@ -3003,7 +3003,7 @@ KPilot dialogs with something sensible made with designer.
Switched around #ifdef and #ifndef. This disabled setting debug levels Switched around #ifdef and #ifndef. This disabled setting debug levels
in code with debugging on. Duh. Getting it right then showed all kinds in code with debugging on. Duh. Getting it right then showed all kinds
of bugs in the other code. Added some documentation explaining possible of bugs in the other code. Added some documentation explaining possible
crashes due to missing KApplication instance. crashes due to missing TDEApplication instance.
FINALLY did something sensible about code duplication -- added get and FINALLY did something sensible about code duplication -- added get and
set methods to a subclass of KConfig for all KPilot settings. set methods to a subclass of KConfig for all KPilot settings.
* kpilot/kpilotOptions.{h,cc} * kpilot/kpilotOptions.{h,cc}

@ -48,9 +48,9 @@ int main(int argc, char *argv[])
"groot@kde.org", "http://www.kpilot.org/"); "groot@kde.org", "http://www.kpilot.org/");
TDECmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
KApplication::addCmdLineOptions(); TDEApplication::addCmdLineOptions();
KApplication app; TDEApplication app;
ConverterDlg *dlg=new ConverterDlg(0L, i18n("PalmDOC Converter")); ConverterDlg *dlg=new ConverterDlg(0L, i18n("PalmDOC Converter"));
dlg->show(); dlg->show();
return app.exec(); return app.exec();

@ -192,7 +192,7 @@ KNotesAction::KNotesAction(KPilotLink *o,
FUNCTIONSETUP; FUNCTIONSETUP;
/* /*
if (fP) fP->fDCOP = KApplication::kApplication()->dcopClient(); if (fP) fP->fDCOP = TDEApplication::kApplication()->dcopClient();
if (fP && !fP->fDCOP) if (fP && !fP->fDCOP)
{ {

@ -186,7 +186,7 @@ int PopMailConduit::sendViaKMail()
int count=0; int count=0;
TQString kmailOutboxName = getKMailOutbox(); TQString kmailOutboxName = getKMailOutbox();
DCOPClient *dcopptr = KApplication::kApplication()->dcopClient(); DCOPClient *dcopptr = TDEApplication::kApplication()->dcopClient();
if (!dcopptr) if (!dcopptr)
{ {
WARNINGKPILOT << "Cannot get DCOP client." WARNINGKPILOT << "Cannot get DCOP client."

@ -167,7 +167,7 @@ void KPilotInstaller::startDaemonIfNeeded()
fDaemonWasRunning = true; fDaemonWasRunning = true;
} }
if (!fDaemonWasRunning && KApplication::startServiceByDesktopName( if (!fDaemonWasRunning && TDEApplication::startServiceByDesktopName(
CSL1("kpilotdaemon"), CSL1("kpilotdaemon"),
TQString(), &daemonError, &daemonDCOP, &daemonPID TQString(), &daemonError, &daemonDCOP, &daemonPID
, "0" /* no notify */ , "0" /* no notify */

@ -77,7 +77,7 @@ public:
/** /**
* Write the current configuration version to the standard * Write the current configuration version to the standard
* location. @em Only call this after the KApplication object * location. @em Only call this after the TDEApplication object
* is created, or crashes will result. * is created, or crashes will result.
*/ */
static void updateConfigVersion(); static void updateConfigVersion();

@ -169,7 +169,7 @@ ProbeDialog::~ProbeDialog()
void ProbeDialog::processEvents() void ProbeDialog::processEvents()
{ {
FUNCTIONSETUP; FUNCTIONSETUP;
KApplication::kApplication()->processEvents(); TDEApplication::kApplication()->processEvents();
} }
void ProbeDialog::progress() void ProbeDialog::progress()

@ -270,7 +270,7 @@ void KroupwareSync::end_syncNotesWithKMail()
TQString mess; TQString mess;
int pid; int pid;
return KApplication::startServiceByDesktopName(CSL1("kmail"), return TDEApplication::startServiceByDesktopName(CSL1("kmail"),
TQString(), TQString(),
error, error,
&kmdcop, &kmdcop,

@ -358,7 +358,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::addCmdLineOptions(conduitOptions, TDECmdLineArgs::addCmdLineOptions(conduitOptions,
I18N_NOOP("Conduit Actions"),"conduit"); I18N_NOOP("Conduit Actions"),"conduit");
KApplication::addCmdLineOptions(); TDEApplication::addCmdLineOptions();
TDECmdLineArgs *p = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *p = TDECmdLineArgs::parsedArgs();
@ -369,10 +369,10 @@ int main(int argc, char **argv)
needGUI |= (p->isSet("exec")); // assume worst wrt. conduits needGUI |= (p->isSet("exec")); // assume worst wrt. conduits
needGUI |= (p->isSet("restore")); needGUI |= (p->isSet("restore"));
KApplication a(needGUI,needGUI); TDEApplication a(needGUI,needGUI);
#ifdef DEBUG #ifdef DEBUG
KPilotConfig::getDebugLevel(p); KPilotConfig::getDebugLevel(p);
DEBUGKPILOT << fname << "Created KApplication." << endl; DEBUGKPILOT << fname << "Created TDEApplication." << endl;
#endif #endif
Pilot::setupPilotCodec(KPilotSettings::encoding()); Pilot::setupPilotCodec(KPilotSettings::encoding());

@ -804,7 +804,7 @@ static KDesktopLockStatus isKDesktopLockRunning()
{ {
if (!KPilotSettings::screenlockSecure()) return NotLocked; if (!KPilotSettings::screenlockSecure()) return NotLocked;
DCOPClient *dcopptr = KApplication::kApplication()->dcopClient(); DCOPClient *dcopptr = TDEApplication::kApplication()->dcopClient();
// Can't tell, very weird, err on the side of safety. // Can't tell, very weird, err on the side of safety.
if (!dcopptr || !dcopptr->isAttached()) if (!dcopptr || !dcopptr->isAttached())
@ -1208,7 +1208,7 @@ void PilotDaemon::slotRunKPilot()
TQCString kpilotDCOP; TQCString kpilotDCOP;
int kpilotPID; int kpilotPID;
if (KApplication::startServiceByDesktopName(CSL1("kpilot"), if (TDEApplication::startServiceByDesktopName(CSL1("kpilot"),
TQString(), &kpilotError, &kpilotDCOP, &kpilotPID TQString(), &kpilotError, &kpilotDCOP, &kpilotPID
#if (TDE_VERSION >= 220) #if (TDE_VERSION >= 220)
// Startup notification added in 2.2 // Startup notification added in 2.2

@ -681,7 +681,7 @@ TQString findArgument(const TQStringList &a, const TQString &arg)
/* static */ bool isRunning(const TQCString &n) /* static */ bool isRunning(const TQCString &n)
{ {
DCOPClient *dcop = KApplication::kApplication()->dcopClient(); DCOPClient *dcop = TDEApplication::kApplication()->dcopClient();
QCStringList apps = dcop->registeredApplications(); QCStringList apps = dcop->registeredApplications();
return apps.contains(n); return apps.contains(n);
} }

@ -58,13 +58,13 @@ int main(int argc, char **argv)
{ {
FUNCTIONSETUP; FUNCTIONSETUP;
KApplication::disableAutoDcopRegistration(); TDEApplication::disableAutoDcopRegistration();
KAboutData aboutData("exportdatebook","Emport Date Book","0.1"); KAboutData aboutData("exportdatebook","Emport Date Book","0.1");
TDECmdLineArgs::init(argc,argv,&aboutData); TDECmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app( false, false ); TDEApplication app( false, false );
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

@ -59,8 +59,8 @@ int main(int argc, char **argv)
TDECmdLineArgs::init(argc,argv,&aboutData); TDECmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
// KApplication app( false, false ); // TDEApplication app( false, false );
KApplication app; TDEApplication app;
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

@ -55,13 +55,13 @@ static const KCmdLineOptions options[] =
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
KApplication::disableAutoDcopRegistration(); TDEApplication::disableAutoDcopRegistration();
KAboutData aboutData("importdatebook","Import Date Book","0.1"); KAboutData aboutData("importdatebook","Import Date Book","0.1");
TDECmdLineArgs::init(argc,argv,&aboutData); TDECmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app( false, false ); TDEApplication app( false, false );
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

@ -51,13 +51,13 @@ static const KCmdLineOptions options[] =
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
KApplication::disableAutoDcopRegistration(); TDEApplication::disableAutoDcopRegistration();
KAboutData aboutData("mergecalendars","Merge libkcal Calendars","0.1"); KAboutData aboutData("mergecalendars","Merge libkcal Calendars","0.1");
TDECmdLineArgs::init(argc,argv,&aboutData); TDECmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app( false, false ); TDEApplication app( false, false );
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

@ -49,13 +49,13 @@ static const KCmdLineOptions options[] =
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
KApplication::disableAutoDcopRegistration(); TDEApplication::disableAutoDcopRegistration();
KAboutData aboutData("testaddress","Test Addresses","0.1"); KAboutData aboutData("testaddress","Test Addresses","0.1");
TDECmdLineArgs::init(argc,argv,&aboutData); TDECmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app( false, false ); TDEApplication app( false, false );
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

@ -154,13 +154,13 @@ static const KCmdLineOptions options[] =
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
KApplication::disableAutoDcopRegistration(); TDEApplication::disableAutoDcopRegistration();
KAboutData aboutData("testcategories","Test Categories","0.1"); KAboutData aboutData("testcategories","Test Categories","0.1");
TDECmdLineArgs::init(argc,argv,&aboutData); TDECmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app( false, false ); TDEApplication app( false, false );
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

@ -253,13 +253,13 @@ static const KCmdLineOptions options[] =
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
KApplication::disableAutoDcopRegistration(); TDEApplication::disableAutoDcopRegistration();
KAboutData aboutData("testdatabase","Test Databases","0.1"); KAboutData aboutData("testdatabase","Test Databases","0.1");
TDECmdLineArgs::init(argc,argv,&aboutData); TDECmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app( false, false ); TDEApplication app( false, false );
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

@ -49,13 +49,13 @@ static const KCmdLineOptions options[] =
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
KApplication::disableAutoDcopRegistration(); TDEApplication::disableAutoDcopRegistration();
KAboutData aboutData("testdatebook","Test Date Book","0.1"); KAboutData aboutData("testdatebook","Test Date Book","0.1");
TDECmdLineArgs::init(argc,argv,&aboutData); TDECmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app( false, false ); TDEApplication app( false, false );
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

@ -286,11 +286,11 @@ bool test7()
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
KApplication::disableAutoDcopRegistration(); TDEApplication::disableAutoDcopRegistration();
KAboutData aboutData("testidmapper","Test IDMapper","0.1"); KAboutData aboutData("testidmapper","Test IDMapper","0.1");
TDECmdLineArgs::init(argc,argv,&aboutData); TDECmdLineArgs::init(argc,argv,&aboutData);
KApplication app( false, false ); TDEApplication app( false, false );
// Remove file from previous test run // Remove file from previous test run
TQDir test( "Testing" ); TQDir test( "Testing" );

Loading…
Cancel
Save