Rename KCmdLineArgs to TDECmdLineArgs to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 3240c45eaa
commit ca1ec6eeaa

@ -44,8 +44,8 @@ int main(int argc, char *argv[])
I18N_NOOP("Original author of the KFileReplace tool"), I18N_NOOP("Original author of the KFileReplace tool"),
"dupoux@dupoux.com"); "dupoux@dupoux.com");
KCmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app; KApplication app;
@ -57,7 +57,7 @@ int main(int argc, char *argv[])
else else
{ {
// no session.. just start up normally // no session.. just start up normally
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
KFileReplace *kfr = new KFileReplace; KFileReplace *kfr = new KFileReplace;
kfr->show(); kfr->show();

@ -49,8 +49,8 @@ int main(int argc, char *argv[])
aboutData.addCredit("Antonio Crevillen",I18N_NOOP("For the Spanish translation")); aboutData.addCredit("Antonio Crevillen",I18N_NOOP("For the Spanish translation"));
aboutData.addCredit("Fabrice Mous",I18N_NOOP("For the Dutch translation")); aboutData.addCredit("Fabrice Mous",I18N_NOOP("For the Dutch translation"));
aboutData.addCredit("Germain Chazot",I18N_NOOP("For the French translation")); aboutData.addCredit("Germain Chazot",I18N_NOOP("For the French translation"));
KCmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options. TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KApplication a; KApplication a;
a.dcopClient()->registerAs(a.name()); a.dcopClient()->registerAs(a.name());
@ -63,7 +63,7 @@ int main(int argc, char *argv[])
} }
else else
{ {
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if ( args->count() == 0 ) if ( args->count() == 0 )
{ {
KimeShell *kimeShell = new KimeShell(); KimeShell *kimeShell = new KimeShell();

@ -61,8 +61,8 @@ int main(int argc, char *argv[])
about.addCredit("Jens Herden", 0, "jens@tdewebdev.org"); about.addCredit("Jens Herden", 0, "jens@tdewebdev.org");
about.addCredit("Helge Hielscher", 0, "hhielscher@unternehmen.com"); about.addCredit("Helge Hielscher", 0, "hhielscher@unternehmen.com");
KCmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app; KApplication app;
@ -74,7 +74,7 @@ int main(int argc, char *argv[])
else else
{ {
// no session.. just start up normally // no session.. just start up normally
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
KLinkStatus *widget = new KLinkStatus; KLinkStatus *widget = new KLinkStatus;
widget->show(); widget->show();

@ -49,8 +49,8 @@ int main( int argc, char *argv[] )
aboutData.addAuthor("Marc Britton", I18N_NOOP("Original author"), "consume@optusnet.com.au"); aboutData.addAuthor("Marc Britton", I18N_NOOP("Original author"), "consume@optusnet.com.au");
aboutData.setTranslator (I18N_NOOP("_: NAME OF TRANSLATORS\nYour names"), aboutData.setTranslator (I18N_NOOP("_: NAME OF TRANSLATORS\nYour names"),
I18N_NOOP("_: EMAIL OF TRANSLATORS\nYour emails")); I18N_NOOP("_: EMAIL OF TRANSLATORS\nYour emails"));
KCmdLineArgs::init(argc, argv, &aboutData); TDECmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
KommanderWidget::inEditor = true; KommanderWidget::inEditor = true;

@ -1523,7 +1523,7 @@ void MainWindow::readConfig()
actionRecent->loadEntries(config, "Recent Files"); actionRecent->loadEntries(config, "Recent Files");
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
for(int i = 0; i < args->count(); i++) for(int i = 0; i < args->count(); i++)
{ {
TQFileInfo fi(args->url(i).path()); TQFileInfo fi(args->url(i).path());

@ -61,9 +61,9 @@ int main(int argc, char *argv[])
aboutData.addAuthor("Andras Mantia", I18N_NOOP("Current maintainer"), "amantia@tdewebdev.org"); aboutData.addAuthor("Andras Mantia", I18N_NOOP("Current maintainer"), "amantia@tdewebdev.org");
aboutData.addAuthor("Michal Rudolf", I18N_NOOP("Previous maintainer"), "mrudolf@tdewebdev.org"); aboutData.addAuthor("Michal Rudolf", I18N_NOOP("Previous maintainer"), "mrudolf@tdewebdev.org");
aboutData.addAuthor("Marc Britton", I18N_NOOP("Original author"), "consume@optusnet.com.au"); aboutData.addAuthor("Marc Britton", I18N_NOOP("Original author"), "consume@optusnet.com.au");
KCmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options. TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if (args->isSet("c")) if (args->isSet("c"))
KLocale::setMainCatalogue(args->getOption("c")); KLocale::setMainCatalogue(args->getOption("c"));

@ -62,10 +62,10 @@ int main(int argc, char *argv[])
aboutData.addAuthor("Marc Britton", "Original author", "consume@optusnet.com.au"); aboutData.addAuthor("Marc Britton", "Original author", "consume@optusnet.com.au");
aboutData.addAuthor("Eric Laffoon", "Project manager", "eric@tdewebdev.org"); aboutData.addAuthor("Eric Laffoon", "Project manager", "eric@tdewebdev.org");
aboutData.addAuthor("Michal Rudolf", "Current maintainer", "mrudolf@tdewebdev.org"); aboutData.addAuthor("Michal Rudolf", "Current maintainer", "mrudolf@tdewebdev.org");
KCmdLineArgs::init(argc, argv, &aboutData); TDECmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions(options); // Add our own options. TDECmdLineArgs::addCmdLineOptions(options); // Add our own options.
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
KApplication app; KApplication app;
if (!args->getOption("add").isNull() || !args->getOption("remove").isNull() || args->isSet("check") || args->isSet("list")) if (!args->getOption("add").isNull() || !args->getOption("remove").isNull() || args->isSet("check") || args->isSet("list"))

@ -705,7 +705,7 @@ void KXsldbgPart::docChanged()
void KXsldbgPart::debuggerStarted() void KXsldbgPart::debuggerStarted()
{ {
if (configWidget != 0L){ if (configWidget != 0L){
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if (args){ if (args){
int i=0, result=1, noFilesFound = 0; int i=0, result=1, noFilesFound = 0;
TQString expandedName; /* contains file name with path expansion if any */ TQString expandedName; /* contains file name with path expansion if any */

@ -531,9 +531,9 @@ xsldbgMain(int argc, char **argv)
/* the xml document we're processing */ /* the xml document we're processing */
xmlDocPtr doc; xmlDocPtr doc;
KCmdLineArgs *args = 0; TDECmdLineArgs *args = 0;
if (getThreadStatus() == XSLDBG_MSG_THREAD_NOTUSED) if (getThreadStatus() == XSLDBG_MSG_THREAD_NOTUSED)
args = KCmdLineArgs::parsedArgs(); args = TDECmdLineArgs::parsedArgs();
errorFile = stderr; errorFile = stderr;
@ -699,7 +699,7 @@ xsldbgMain(int argc, char **argv)
} }
if (!result) { if (!result) {
KCmdLineArgs::usage(); TDECmdLineArgs::usage();
xsldbgFree(); xsldbgFree();
return (1); return (1);
} }

@ -21,8 +21,8 @@ int main(int argc, char **argv)
{ {
KAboutData about("kxsldbg", I18N_NOOP("KXSLDbg"), version, description, KAboutData::License_GPL, "(C) 2003 Keith Isdale", 0, 0, "k_isdale@tpg.com.au"); KAboutData about("kxsldbg", I18N_NOOP("KXSLDbg"), version, description, KAboutData::License_GPL, "(C) 2003 Keith Isdale", 0, 0, "k_isdale@tpg.com.au");
about.addAuthor( "Keith Isdale", 0, "k_isdale@tpg.com.au" ); about.addAuthor( "Keith Isdale", 0, "k_isdale@tpg.com.au" );
KCmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app; KApplication app;
// see if we are starting with session management // see if we are starting with session management

@ -129,8 +129,8 @@ int main(int argc, char **argv)
KAboutData about("xsldbg", I18N_NOOP("Xsldbg"), version, description, KAboutData::License_GPL, "(C) 2003 Keith Isdale", freeFormText, 0, "k_isdale@tpg.com.au"); KAboutData about("xsldbg", I18N_NOOP("Xsldbg"), version, description, KAboutData::License_GPL, "(C) 2003 Keith Isdale", freeFormText, 0, "k_isdale@tpg.com.au");
about.addAuthor( "Keith Isdale", 0, "k_isdale@tpg.com.au" ); about.addAuthor( "Keith Isdale", 0, "k_isdale@tpg.com.au" );
KCmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
XsldbgApp app; XsldbgApp app;
return app.exec();; return app.exec();;

@ -62,7 +62,7 @@ KSplash::~KSplash()
KQApplication::KQApplication() KQApplication::KQApplication()
: KApplication() : KApplication()
{ {
args = KCmdLineArgs::parsedArgs(); args = TDECmdLineArgs::parsedArgs();
splash = 0L; splash = 0L;
KGlobal::dirs()->addPrefix(PREFIX); KGlobal::dirs()->addPrefix(PREFIX);
@ -132,7 +132,7 @@ KQUniqueApplication::~KQUniqueApplication()
int KQUniqueApplication::newInstance() int KQUniqueApplication::newInstance()
{ {
args = KCmdLineArgs::parsedArgs(); args = TDECmdLineArgs::parsedArgs();
if (mainWidget()) if (mainWidget())
{ {
KWin::activateWindow( mainWidget()->winId() ); KWin::activateWindow( mainWidget()->winId() );

@ -22,7 +22,7 @@
#include <tqframe.h> #include <tqframe.h>
#include <kuniqueapplication.h> #include <kuniqueapplication.h>
class KCmdLineArgs; class TDECmdLineArgs;
class KSplashScreen; class KSplashScreen;
class KSplash : public TQFrame class KSplash : public TQFrame
@ -45,7 +45,7 @@ class KQApplicationPrivate
void init(); void init();
KSplash *splash; KSplash *splash;
KCmdLineArgs *args; TDECmdLineArgs *args;
KSplashScreen *sp; KSplashScreen *sp;
}; };

@ -177,10 +177,10 @@ int main(int argc, char *argv[])
I18N_NOOP("Splash screen and icon for 3.2"), I18N_NOOP("Splash screen and icon for 3.2"),
"luci@sh.ground.cz"); "luci@sh.ground.cz");
KCmdLineArgs::init( argc, argv, &aboutData); TDECmdLineArgs::init( argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options. TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
// this defeats the purpose of KCmdLineArgs, but there is no other // this defeats the purpose of TDECmdLineArgs, but there is no other
// way around, I'm afraid. // way around, I'm afraid.
const char *uniq = "--unique"; const char *uniq = "--unique";
bool isUnique = false; bool isUnique = false;
@ -199,7 +199,7 @@ int main(int argc, char *argv[])
KUniqueApplication::dcopClient()->registerAs("quanta-foo"); KUniqueApplication::dcopClient()->registerAs("quanta-foo");
if (KUniqueApplication::dcopClient()->isApplicationRegistered("quanta")) if (KUniqueApplication::dcopClient()->isApplicationRegistered("quanta"))
{ {
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
for (int i = 0; i < args->count(); i++) for (int i = 0; i < args->count(); i++)
{ {
TQString s = args->url(i).url(); TQString s = args->url(i).url();

Loading…
Cancel
Save