Rename KCmdLineArgs to TDECmdLineArgs to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent ce145c9667
commit 479647c43c

@ -42,8 +42,8 @@ extern "C" KDE_EXPORT int kdemain(int argc, char** argv)
KAboutData::License_LGPL,
I18N_NOOP("Copyright (c) 2003 Christian Loose"));
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions(options);
// no need to register with the dcop server
KApplication::disableAutoDcopRegistration();
@ -52,11 +52,11 @@ extern "C" KDE_EXPORT int kdemain(int argc, char** argv)
// no need for session management
app.disableSessionManagement();
if( !KCmdLineArgs::parsedArgs()->count() )
if( !TDECmdLineArgs::parsedArgs()->count() )
return 1;
// parse repository name from the passed argument
TQString prompt = KCmdLineArgs::parsedArgs()->arg(0);
TQString prompt = TDECmdLineArgs::parsedArgs()->arg(0);
TQRegExp rx("(.*@.*)'s password:");
int pos = rx.search(prompt);

@ -33,7 +33,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char** argv)
about.addAuthor("Christian Loose", I18N_NOOP("Developer"),
"christian.loose@hamburg.de");
KCmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::init(argc, argv, &about);
KApplication app;

@ -164,22 +164,22 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
about.addCredit("Richard Moore", I18N_NOOP("Conversion to KPart"),
"rich@kde.org", 0);
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions(options);
KApplication app;
TQString resolvefile = KCmdLineArgs::parsedArgs()->getOption("resolve");
TQString resolvefile = TDECmdLineArgs::parsedArgs()->getOption("resolve");
if (!resolvefile.isEmpty())
return ShowResolveDialog(resolvefile);
// is command line option 'show log dialog' specified?
TQString logFile = KCmdLineArgs::parsedArgs()->getOption("log");
TQString logFile = TDECmdLineArgs::parsedArgs()->getOption("log");
if( !logFile.isEmpty() )
return ShowLogDialog(logFile);
// is command line option 'show annotation dialog' specified?
TQString annotateFile = KCmdLineArgs::parsedArgs()->getOption("annotate");
TQString annotateFile = TDECmdLineArgs::parsedArgs()->getOption("annotate");
if( !annotateFile.isEmpty() )
return ShowAnnotateDialog(annotateFile);
@ -188,7 +188,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
} else {
CervisiaShell* shell = new CervisiaShell();
const KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
const TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();
if( args->count() )
{
KURL directory = args->url(0);

@ -22,8 +22,8 @@ int main(int argc, char **argv)
{
KAboutData about("${APP_NAME_LC}", I18N_NOOP("${APP_NAME}"), version, description, KAboutData::License_GPL, "(C) 2004 ${AUTHOR}", 0, 0, "${EMAIL}");
about.addAuthor( "${AUTHOR}", 0, "${EMAIL}" );
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions(options);
KApplication app;
// register ourselves as a dcop client
@ -35,7 +35,7 @@ int main(int argc, char **argv)
else
{
// no session.. just start up normally
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if (args->count() == 0)
{
${APP_NAME} *widget = new ${APP_NAME};

@ -21,8 +21,8 @@ int main(int argc, char **argv)
{
KAboutData about("${APP_NAME_LC}", I18N_NOOP("${APP_NAME}"), version, description, KAboutData::License_GPL, "(C) 2004 ${AUTHOR}", 0, 0, "${EMAIL}");
about.addAuthor( "${AUTHOR}", 0, "${EMAIL}" );
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
// see if we are starting with session management
@ -31,7 +31,7 @@ int main(int argc, char **argv)
else
{
// no session.. just start up normally
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if ( args->count() == 0 )
{

@ -126,7 +126,7 @@ int CatalogManagerApp::newInstance()
}
else
{
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
TQString configfile = args->getOption("project");
@ -216,10 +216,10 @@ int main(int argc, char **argv)
about.addCredit("GNU gettext", I18N_NOOP("KBabel contains code from GNU gettext"), 0, "http://www.gnu.org/software/gettext/");
// Initialize command line args
KCmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::init(argc, argv, &about);
// Tell which options are supported
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::addCmdLineOptions( options );
// Add options from other components
KApplication::addCmdLineOptions();

@ -128,7 +128,7 @@ int KBabelApp::newInstance()
kdDebug () << "Suspending DCOP" << endl;
kapp->dcopClient()->suspend();
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
TQTimer timer;
TQWidget *splash=0;
@ -587,10 +587,10 @@ int main(int argc, char **argv)
about.addCredit("Nick Shaforostoff", I18N_NOOP("Word-by-word string difference algorithm implementation"), "shafff@ukr.net");
// Initialize command line args
KCmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::init(argc, argv, &about);
// Tell which options are supported
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::addCmdLineOptions( options );
// Add options from other components
KUniqueApplication::addCmdLineOptions();

@ -61,7 +61,7 @@ KBabelDictApplication::KBabelDictApplication()
: KApplication()
, topLevel(0)
{
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
TQTimer timer;
TQWidget *splash=0;
@ -122,10 +122,10 @@ int main(int argc, char **argv)
, I18N_NOOP("_: EMAIL OF TRANSLATORS\nYour emails"));
// Initialize command line args
KCmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::init(argc, argv, &about);
// Tell which options are supported
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::addCmdLineOptions( options );
// Add options from other components
KApplication::addCmdLineOptions();

@ -801,7 +801,7 @@ void PoCompendium::slotLoadCompendium()
{
path.replace("@LANG@",langCode);
}
KURL u=KCmdLineArgs::makeURL(path.local8Bit());
KURL u=TDECmdLineArgs::makeURL(path.local8Bit());
realURL = u.url();
registerData();

@ -691,7 +691,7 @@ void TmxCompendium::slotLoadCompendium()
{
path.replace("@LANG@",langCode);
}
KURL u=KCmdLineArgs::makeURL(path.local8Bit());
KURL u=TDECmdLineArgs::makeURL(path.local8Bit());
realURL = u.url();
registerData();

@ -51,14 +51,14 @@ int main(int argc, char *argv[])
aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" );
aboutData.addAuthor( "Simon Hausmann", 0, "hausmann@kde.org" );
aboutData.addAuthor( "David Faure", 0, "faure@kde.org" );
KCmdLineArgs::init( argc, argv, &aboutData );
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
app.dcopClient()->attach();
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if (args->isSet("disconnected")) {
BugSystem::self()->setDisconnected( true );
}

@ -47,7 +47,7 @@
#include <tqtextcodec.h>
SvnHelper::SvnHelper():KApplication() {
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
KWinModule wm ( TQT_TQOBJECT(this) );
m_id = wm.activeWindow();
@ -275,14 +275,14 @@ static KCmdLineOptions options[] = {
};
int main(int argc, char **argv) {
KCmdLineArgs::init(argc, argv, "kio_svn_helper", I18N_NOOP("Subversion Helper"), "TDE frontend for SVN", "0.1");
TDECmdLineArgs::init(argc, argv, "kio_svn_helper", I18N_NOOP("Subversion Helper"), "TDE frontend for SVN", "0.1");
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::addCmdLineOptions( options );
KGlobal::locale()->setMainCatalogue("kio_svn");
KApplication::addCmdLineOptions();
if ( KCmdLineArgs::parsedArgs()->count()==0 )
KCmdLineArgs::usage();
if ( TDECmdLineArgs::parsedArgs()->count()==0 )
TDECmdLineArgs::usage();
KApplication *app = new SvnHelper();
// app->dcopClient()->attach();

@ -580,11 +580,11 @@ int main(int argc, char *argv[])
{
KInstance instance("kmtrace");
KCmdLineArgs::init(argc, argv, "kmtrace", "KDE Memory leak tracer", "v1.0");
TDECmdLineArgs::init(argc, argv, "kmtrace", "KDE Memory leak tracer", "v1.0");
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::addCmdLineOptions(options);
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
(void) args->count();
const char *logfile;

@ -58,8 +58,8 @@ int main(int argc, char *argv[])
aboutData.addCredit( "Malte Starostik", I18N_NOOP("A lot of good advice"), "malte@kde.org" );
aboutData.addCredit( "Bernd Gehrmann", I18N_NOOP("Cervisia diff viewer"), "bernd@physik.hu-berlin.de" );
KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
bool difault = false;
@ -70,7 +70,7 @@ int main(int argc, char *argv[])
}
else
{
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
KompareShell* ks;
@ -110,7 +110,7 @@ int main(int argc, char *argv[])
kdDebug( 8100 ) << "Option -c is set" << endl;
if ( args->count() != 2 )
{
KCmdLineArgs::usage( "kompare" );
TDECmdLineArgs::usage( "kompare" );
difault = true;
}
else
@ -130,7 +130,7 @@ int main(int argc, char *argv[])
kdDebug( 8100 ) << "Option -b is set" << endl;
if ( args->count() != 2 )
{
KCmdLineArgs::usage( "kompare" );
TDECmdLineArgs::usage( "kompare" );
difault = true;
}
else

@ -39,8 +39,8 @@ int main(int argc, char *argv[])
VERSION, description, KAboutData::License_GPL,
"(c) 2001, Richard Moore", 0, 0, "rich@kde.org");
aboutData.addAuthor("Richard Moore",0, "rich@kde.org");
KCmdLineArgs::init( argc, argv, &aboutData );
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KApplication a;
Spy *spy = new Spy();

@ -78,9 +78,9 @@ int main(int argc, char **argv)
aboutData.addAuthor("Geert Jansen", I18N_NOOP("Maintainer"),
"jansen@kde.org", "http://www.stack.nl/~geertj/");
KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions(options);
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
KApplication *app = new KApplication(false, false);

@ -48,8 +48,8 @@ int main(int argc, char **argv)
// Screenshot capability
about.addAuthor("Benjamin C. Meyer", 0, "ben+kuiviewer@meyerhome.net");
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
// see if we are starting with session management
@ -58,7 +58,7 @@ int main(int argc, char **argv)
else
{
// no session.. just start up normally
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if ( args->count() == 0 )
{

@ -47,8 +47,8 @@ int main( int argc, char** argv )
KAboutData::License_BSD, "(C) 2005 Jeroen Wijnhout", 0, 0,
"Jeroen.Wijnhout@kdemail.net");
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;

@ -55,9 +55,9 @@ int main( int argc, char **argv )
KAboutData::License_BSD, "(C) 2005 Jeroen Wijnhout", 0, 0,
"Jeroen.Wijnhout@kdemail.net");
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions( options );
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
KUnitTest::Runner::loadModules(args->getOption("folder"), args->getOption("query"));
KUnitTest::Runner::setDebugCapturingEnabled(args->isSet("enable-dbgcap"));

@ -53,8 +53,8 @@ int main( int argc, char ** argv )
I18N_NOOP("Author/Maintainer"),
"Josef.Weidendorfer@gmx.de");
KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions( options );
KApplication a;
TopLevel* t;
@ -68,7 +68,7 @@ int main( int argc, char ** argv )
}
}
else {
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if (args->count()>0) {
for(int i = 0; i < args->count(); i++) {
t = new TopLevel();

@ -65,10 +65,10 @@ int main(int argc, char *argv[])
"http://uml.sf.net/");
aboutData.addAuthor("Gael de Chalendar (aka Kleag)",0, "kleag@free.fr");
aboutData.addAuthor(I18N_NOOP("Umbrello UML Modeller Authors"), 0, "uml-devel@lists.sourceforge.net");
KCmdLineArgs::init( argc, argv, &aboutData );
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
QCStringList xsltOpt = args->getOptionList("xslt");
if (xsltOpt.size() > 0)

@ -51,7 +51,7 @@ static KCmdLineOptions options[] =
* @param args The command line arguments given.
* @return True if the GUI should be shown, false otherwise.
*/
bool getShowGUI(KCmdLineArgs *args);
bool getShowGUI(TDECmdLineArgs *args);
/**
* Creates, shows and returns the startup logo for the application if it should be shown,
@ -73,7 +73,7 @@ KStartupLogo* showStartupLogo(KConfig* cfg, bool showGUI);
* @param args The command line arguments given.
* @param cfg The application configuration.
*/
void initDocument(KCmdLineArgs *args, KConfig* cfg);
void initDocument(TDECmdLineArgs *args, KConfig* cfg);
/**
* Export all the views in the document using the command line args set by the user.
@ -82,7 +82,7 @@ void initDocument(KCmdLineArgs *args, KConfig* cfg);
* @param args The command line arguments given.
* @param exportOpt A list containing all the "export" arguments given.
*/
void exportAllViews(KCmdLineArgs *args, const QCStringList &exportOpt);
void exportAllViews(TDECmdLineArgs *args, const QCStringList &exportOpt);
extern "C" int flushEvents() {
kapp->processEvents();
@ -96,14 +96,14 @@ int main(int argc, char *argv[]) {
"http://uml.sf.net/");
aboutData.addAuthor("Paul Hensgen",0, "phensgen@users.sourceforge.net");
aboutData.addAuthor(I18N_NOOP("Umbrello UML Modeller Authors"), 0, "uml-devel@lists.sourceforge.net");
KCmdLineArgs::init( argc, argv, &aboutData );
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KApplication app;
if( app.isRestored() ) {
RESTORE( UMLApp );
} else {
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
bool showGUI = getShowGUI(args);
UMLApp *uml = new UMLApp();
@ -137,7 +137,7 @@ int main(int argc, char *argv[]) {
return app.exec();
}
bool getShowGUI(KCmdLineArgs *args) {
bool getShowGUI(TDECmdLineArgs *args) {
if (args->getOptionList("export").size() > 0) {
return false;
}
@ -167,7 +167,7 @@ KStartupLogo* showStartupLogo(KConfig* cfg, bool showGUI) {
return startLogo;
}
void initDocument(KCmdLineArgs *args, KConfig* cfg) {
void initDocument(TDECmdLineArgs *args, KConfig* cfg) {
if ( args -> count() ) {
UMLApp::app()->openDocumentFile( args->url( 0 ) );
} else {
@ -182,7 +182,7 @@ void initDocument(KCmdLineArgs *args, KConfig* cfg) {
}
}
void exportAllViews(KCmdLineArgs *args, const QCStringList &exportOpt) {
void exportAllViews(TDECmdLineArgs *args, const QCStringList &exportOpt) {
TQString extension(exportOpt.last());
kDebug() << "extension: " << extension << endl;
@ -191,7 +191,7 @@ void exportAllViews(KCmdLineArgs *args, const QCStringList &exportOpt) {
KURL directory;
QCStringList directoryOpt = args->getOptionList("directory");
if (directoryOpt.size() > 0) {
directory = KCmdLineArgs::makeURL(directoryOpt.last());
directory = TDECmdLineArgs::makeURL(directoryOpt.last());
} else {
directory = KURL(UMLApp::app()->getDocument()->URL().directory());
}

Loading…
Cancel
Save