Rename KCmdLineArgs to TDECmdLineArgs to avoid conflicts with KDE4

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

@ -42,8 +42,8 @@ extern "C" KDE_EXPORT int kdemain(int argc, char** argv)
KAboutData::License_LGPL, KAboutData::License_LGPL,
I18N_NOOP("Copyright (c) 2003 Christian Loose")); I18N_NOOP("Copyright (c) 2003 Christian Loose"));
KCmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
// no need to register with the dcop server // no need to register with the dcop server
KApplication::disableAutoDcopRegistration(); KApplication::disableAutoDcopRegistration();
@ -52,11 +52,11 @@ extern "C" KDE_EXPORT int kdemain(int argc, char** argv)
// no need for session management // no need for session management
app.disableSessionManagement(); app.disableSessionManagement();
if( !KCmdLineArgs::parsedArgs()->count() ) if( !TDECmdLineArgs::parsedArgs()->count() )
return 1; return 1;
// parse repository name from the passed argument // parse repository name from the passed argument
TQString prompt = KCmdLineArgs::parsedArgs()->arg(0); TQString prompt = TDECmdLineArgs::parsedArgs()->arg(0);
TQRegExp rx("(.*@.*)'s password:"); TQRegExp rx("(.*@.*)'s password:");
int pos = rx.search(prompt); 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"), about.addAuthor("Christian Loose", I18N_NOOP("Developer"),
"christian.loose@hamburg.de"); "christian.loose@hamburg.de");
KCmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
KApplication app; 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"), about.addCredit("Richard Moore", I18N_NOOP("Conversion to KPart"),
"rich@kde.org", 0); "rich@kde.org", 0);
KCmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
KApplication app; KApplication app;
TQString resolvefile = KCmdLineArgs::parsedArgs()->getOption("resolve"); TQString resolvefile = TDECmdLineArgs::parsedArgs()->getOption("resolve");
if (!resolvefile.isEmpty()) if (!resolvefile.isEmpty())
return ShowResolveDialog(resolvefile); return ShowResolveDialog(resolvefile);
// is command line option 'show log dialog' specified? // is command line option 'show log dialog' specified?
TQString logFile = KCmdLineArgs::parsedArgs()->getOption("log"); TQString logFile = TDECmdLineArgs::parsedArgs()->getOption("log");
if( !logFile.isEmpty() ) if( !logFile.isEmpty() )
return ShowLogDialog(logFile); return ShowLogDialog(logFile);
// is command line option 'show annotation dialog' specified? // is command line option 'show annotation dialog' specified?
TQString annotateFile = KCmdLineArgs::parsedArgs()->getOption("annotate"); TQString annotateFile = TDECmdLineArgs::parsedArgs()->getOption("annotate");
if( !annotateFile.isEmpty() ) if( !annotateFile.isEmpty() )
return ShowAnnotateDialog(annotateFile); return ShowAnnotateDialog(annotateFile);
@ -188,7 +188,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
} else { } else {
CervisiaShell* shell = new CervisiaShell(); CervisiaShell* shell = new CervisiaShell();
const KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); const TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();
if( args->count() ) if( args->count() )
{ {
KURL directory = args->url(0); 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}"); 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}" ); about.addAuthor( "${AUTHOR}", 0, "${EMAIL}" );
KCmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
KApplication app; KApplication app;
// register ourselves as a dcop client // register ourselves as a dcop client
@ -35,7 +35,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();
if (args->count() == 0) if (args->count() == 0)
{ {
${APP_NAME} *widget = new ${APP_NAME}; ${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}"); 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}" ); about.addAuthor( "${AUTHOR}", 0, "${EMAIL}" );
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
@ -31,7 +31,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();
if ( args->count() == 0 ) if ( args->count() == 0 )
{ {

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

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

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

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

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

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

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

@ -580,11 +580,11 @@ int main(int argc, char *argv[])
{ {
KInstance instance("kmtrace"); 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(); (void) args->count();
const char *logfile; 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( "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" ); aboutData.addCredit( "Bernd Gehrmann", I18N_NOOP("Cervisia diff viewer"), "bernd@physik.hu-berlin.de" );
KCmdLineArgs::init(argc, argv, &aboutData); TDECmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app; KApplication app;
bool difault = false; bool difault = false;
@ -70,7 +70,7 @@ int main(int argc, char *argv[])
} }
else else
{ {
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
KompareShell* ks; KompareShell* ks;
@ -110,7 +110,7 @@ int main(int argc, char *argv[])
kdDebug( 8100 ) << "Option -c is set" << endl; kdDebug( 8100 ) << "Option -c is set" << endl;
if ( args->count() != 2 ) if ( args->count() != 2 )
{ {
KCmdLineArgs::usage( "kompare" ); TDECmdLineArgs::usage( "kompare" );
difault = true; difault = true;
} }
else else
@ -130,7 +130,7 @@ int main(int argc, char *argv[])
kdDebug( 8100 ) << "Option -b is set" << endl; kdDebug( 8100 ) << "Option -b is set" << endl;
if ( args->count() != 2 ) if ( args->count() != 2 )
{ {
KCmdLineArgs::usage( "kompare" ); TDECmdLineArgs::usage( "kompare" );
difault = true; difault = true;
} }
else else

@ -39,8 +39,8 @@ int main(int argc, char *argv[])
VERSION, description, KAboutData::License_GPL, VERSION, description, KAboutData::License_GPL,
"(c) 2001, Richard Moore", 0, 0, "rich@kde.org"); "(c) 2001, Richard Moore", 0, 0, "rich@kde.org");
aboutData.addAuthor("Richard Moore",0, "rich@kde.org"); aboutData.addAuthor("Richard Moore",0, "rich@kde.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.
KApplication a; KApplication a;
Spy *spy = new Spy(); Spy *spy = new Spy();

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

@ -48,8 +48,8 @@ int main(int argc, char **argv)
// Screenshot capability // Screenshot capability
about.addAuthor("Benjamin C. Meyer", 0, "ben+kuiviewer@meyerhome.net"); about.addAuthor("Benjamin C. Meyer", 0, "ben+kuiviewer@meyerhome.net");
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
@ -58,7 +58,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();
if ( args->count() == 0 ) if ( args->count() == 0 )
{ {

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

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

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

@ -65,10 +65,10 @@ int main(int argc, char *argv[])
"http://uml.sf.net/"); "http://uml.sf.net/");
aboutData.addAuthor("Gael de Chalendar (aka Kleag)",0, "kleag@free.fr"); 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"); aboutData.addAuthor(I18N_NOOP("Umbrello UML Modeller Authors"), 0, "uml-devel@lists.sourceforge.net");
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();
QCStringList xsltOpt = args->getOptionList("xslt"); QCStringList xsltOpt = args->getOptionList("xslt");
if (xsltOpt.size() > 0) if (xsltOpt.size() > 0)

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

Loading…
Cancel
Save