Rename KCmdLineArgs to TDECmdLineArgs to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 7e1f33d9f5
commit 68a4fdfd2c

@ -30,8 +30,8 @@ static const KCmdLineOptions options[] = {
extern "C" KRITA_EXPORT int kdemain(int argc, char **argv) extern "C" KRITA_EXPORT int kdemain(int argc, char **argv)
{ {
KCmdLineArgs::init(argc, argv, newChalkAboutData()); TDECmdLineArgs::init(argc, argv, newChalkAboutData());
KCmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
KoApplication app; KoApplication app;

@ -19,7 +19,7 @@ int main(int argc, char **argv)
aboutData.addAuthor("Aaron J. Seigo", 0, "aseigo@kde.org"); aboutData.addAuthor("Aaron J. Seigo", 0, "aseigo@kde.org");
aboutData.addCredit( "Nadeem Hasan", "Region Grabbing\nReworked GUI", aboutData.addCredit( "Nadeem Hasan", "Region Grabbing\nReworked GUI",
"nhasan@kde.org" ); "nhasan@kde.org" );
KCmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication app; KApplication app;

@ -34,8 +34,8 @@ static const KCmdLineOptions options[]=
extern "C" EXAMPLE_EXPORT int kdemain( int argc, char **argv ) extern "C" EXAMPLE_EXPORT int kdemain( int argc, char **argv )
{ {
KCmdLineArgs::init( argc, argv, newExampleAboutData() ); TDECmdLineArgs::init( argc, argv, newExampleAboutData() );
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KoApplication app; KoApplication app;
if (!app.start()) // parses command line args, create initial docs and shells if (!app.start()) // parses command line args, create initial docs and shells

@ -36,8 +36,8 @@ static const KCmdLineOptions options[] =
extern "C" KARBONBASE_EXPORT int kdemain( int argc, char* argv[] ) extern "C" KARBONBASE_EXPORT int kdemain( int argc, char* argv[] )
{ {
KCmdLineArgs::init( argc, argv, newKarbonAboutData() ); TDECmdLineArgs::init( argc, argv, newKarbonAboutData() );
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KoApplication app; KoApplication app;
if( !app.start() ) // parses command line args, create initial docs and shells if( !app.start() ) // parses command line args, create initial docs and shells

@ -38,8 +38,8 @@ static const KCmdLineOptions options[]=
extern "C" KCHART_EXPORT int kdemain( int argc, char **argv ) extern "C" KCHART_EXPORT int kdemain( int argc, char **argv )
{ {
KCmdLineArgs::init( argc, argv, newKChartAboutData()); TDECmdLineArgs::init( argc, argv, newKChartAboutData());
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KoApplication app; KoApplication app;
if (!app.start()) if (!app.start())

@ -321,8 +321,8 @@ void Kexi::initCmdLineArgs(int argc, char *argv[], KAboutData* aboutData)
#ifdef CUSTOM_VERSION #ifdef CUSTOM_VERSION
# include "../custom_startup.h" # include "../custom_startup.h"
#endif #endif
KCmdLineArgs::init( argc, argv, about ); TDECmdLineArgs::init( argc, argv, about );
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
} }
void KEXI_UNFINISHED(const TQString& feature_name, const TQString& extra_text) void KEXI_UNFINISHED(const TQString& feature_name, const TQString& extra_text)

@ -43,8 +43,8 @@ int main(int argc, char **argv)
about.addAuthor( "Cedric Pasteur", 0, "cedric.pasteur@free.fr"); about.addAuthor( "Cedric Pasteur", 0, "cedric.pasteur@free.fr");
about.addCredit( "Jarosław Staniek", "Win32 version, some icons, many fixes, ideas and bug reports", "js@iidea.pl", 0); about.addCredit( "Jarosław Staniek", "Win32 version, some icons, many fixes, ideas and bug reports", "js@iidea.pl", 0);
about.addCredit( "Kristof Borrey ", "Icons", 0, "kristof.borrey@skynet.be" ); about.addCredit( "Kristof Borrey ", "Icons", 0, "kristof.borrey@skynet.be" );
KCmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
KApplication app; KApplication app;
KGlobal::iconLoader()->addAppDir("kexi"); KGlobal::iconLoader()->addAppDir("kexi");
@ -67,7 +67,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() >= 1) if (args->count() >= 1)
{ {
for (int i = 0; i < args->count(); i++) for (int i = 0; i < args->count(); i++)

@ -90,7 +90,7 @@ SimpleCommandLineApp::SimpleCommandLineApp(
{ {
TQFileInfo fi(argv[0]); TQFileInfo fi(argv[0]);
TQCString appName( fi.baseName().latin1() ); TQCString appName( fi.baseName().latin1() );
KCmdLineArgs::init(argc, argv, TDECmdLineArgs::init(argc, argv,
new KAboutData( appName, programName, new KAboutData( appName, programName,
version, shortDescription, licenseType, copyrightStatement, text, version, shortDescription, licenseType, copyrightStatement, text,
homePageAddress, bugsEmailAddress)); homePageAddress, bugsEmailAddress));
@ -123,9 +123,9 @@ SimpleCommandLineApp::SimpleCommandLineApp(
allOptionsPtr->name = 0; //end allOptionsPtr->name = 0; //end
allOptionsPtr->description = 0; allOptionsPtr->description = 0;
allOptionsPtr->def = 0; allOptionsPtr->def = 0;
KCmdLineArgs::addCmdLineOptions( d->allOptions ); TDECmdLineArgs::addCmdLineOptions( d->allOptions );
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
d->connData.driverName = args->getOption("driver"); d->connData.driverName = args->getOption("driver");
d->connData.userName = args->getOption("user"); d->connData.userName = args->getOption("user");

@ -206,7 +206,7 @@ KexiStartupHandler::~KexiStartupHandler()
delete d; delete d;
} }
bool KexiStartupHandler::getAutoopenObjects(KCmdLineArgs *args, const TQCString &action_name) bool KexiStartupHandler::getAutoopenObjects(TDECmdLineArgs *args, const TQCString &action_name)
{ {
QCStringList list = args->getOptionList(action_name); QCStringList list = args->getOptionList(action_name);
QCStringList::ConstIterator it; QCStringList::ConstIterator it;
@ -268,7 +268,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
{ {
m_action = DoNothing; m_action = DoNothing;
// d->showConnectionDetailsExecuted = false; // d->showConnectionDetailsExecuted = false;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(0); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(0);
if (!args) if (!args)
return true; return true;

@ -30,7 +30,7 @@
class KexiProjectData; class KexiProjectData;
class KexiProjectData; class KexiProjectData;
class KCmdLineArgs; class TDECmdLineArgs;
class KexiStartupHandlerPrivate; class KexiStartupHandlerPrivate;
namespace KexiDB { namespace KexiDB {
class ConnectionData; class ConnectionData;
@ -123,7 +123,7 @@ class KEXIMAIN_EXPORT KexiStartupHandler
// void slotShowConnectionDetails(); // void slotShowConnectionDetails();
protected: protected:
bool getAutoopenObjects(KCmdLineArgs *args, const TQCString &action_name); bool getAutoopenObjects(TDECmdLineArgs *args, const TQCString &action_name);
KexiStartupHandlerPrivate *d; KexiStartupHandlerPrivate *d;
}; };

@ -40,8 +40,8 @@ int main( int argc, char** argv )
KAboutData::License_LGPL, KAboutData::License_LGPL,
"(C) 2005 Sebastian Sauer", 0, 0, "mail@dipe.org"); "(C) 2005 Sebastian Sauer", 0, 0, "mail@dipe.org");
KCmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app; KApplication app;
//create an new "Console"-runner //create an new "Console"-runner

@ -40,8 +40,8 @@ int main( int argc, char** argv )
KAboutData::License_LGPL, "(C) 2005 Tobi Krebs", 0, 0, KAboutData::License_LGPL, "(C) 2005 Tobi Krebs", 0, 0,
"Tobi.Krebs@gmail.com"); "Tobi.Krebs@gmail.com");
KCmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
//create new kapplication //create new kapplication
KApplication app; KApplication app;
//create new kunitrunnergui //create new kunitrunnergui

@ -27,7 +27,7 @@
int main( int argc, char ** argv ) int main( int argc, char ** argv )
{ {
KAboutData aboutData( "test", I18N_NOOP("KFind"), "0", "", KAboutData::License_LGPL ); KAboutData aboutData( "test", I18N_NOOP("KFind"), "0", "", KAboutData::License_LGPL );
KCmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication app; KApplication app;
KexiFindDialog dlg(true, 0, "dialog"); KexiFindDialog dlg(true, 0, "dialog");

@ -115,7 +115,7 @@ int main(int argc, char** argv)
TQFileInfo info=TQFileInfo(argv[0]); TQFileInfo info=TQFileInfo(argv[0]);
prgname = info.baseName().latin1(); prgname = info.baseName().latin1();
KCmdLineArgs::init(argc, argv, TDECmdLineArgs::init(argc, argv,
new KAboutData( prgname, "KexiDBTest", new KAboutData( prgname, "KexiDBTest",
"0.1.2", "", KAboutData::License_GPL, "0.1.2", "", KAboutData::License_GPL,
"(c) 2003-2006, Kexi Team\n" "(c) 2003-2006, Kexi Team\n"
@ -125,9 +125,9 @@ int main(int argc, char** argv)
"submit@bugs.kde.org" "submit@bugs.kde.org"
) )
); );
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
QCStringList tests; QCStringList tests;
tests << "cursors" << "schema" << "dbcreation" << "tables" tests << "cursors" << "schema" << "dbcreation" << "tables"
<< "tableview" << "parser" << "dr_prop"; << "tableview" << "parser" << "dr_prop";

@ -45,7 +45,7 @@
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
// Initialise the program // Initialise the program
KCmdLineArgs::init(argc, argv, "kexidbcomboboxtest", "", "", "", true); TDECmdLineArgs::init(argc, argv, "kexidbcomboboxtest", "", "", "", true);
KApplication* app = new KApplication(true, true); KApplication* app = new KApplication(true, true);
// Look for installed database drivers // Look for installed database drivers

@ -33,8 +33,8 @@ static const KCmdLineOptions options[]=
extern "C" KFORMULA_EXPORT int kdemain( int argc, char **argv ) extern "C" KFORMULA_EXPORT int kdemain( int argc, char **argv )
{ {
KCmdLineArgs::init( argc, argv, newKFormulaAboutData() ); TDECmdLineArgs::init( argc, argv, newKFormulaAboutData() );
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KoApplication app; KoApplication app;

@ -33,8 +33,8 @@ static const KCmdLineOptions options[]=
extern "C" KIVIO_EXPORT int kdemain( int argc, char **argv ) extern "C" KIVIO_EXPORT int kdemain( int argc, char **argv )
{ {
KCmdLineArgs::init( argc, argv, newKivioAboutData() ); TDECmdLineArgs::init( argc, argv, newKivioAboutData() );
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KoApplication app; KoApplication app;

@ -75,7 +75,7 @@ extern "C" KOSHELL_EXPORT int kdemain( int argc, char **argv )
aboutData->addAuthor("Sven Lüppken", I18N_NOOP("Current Maintainer"), "sven@kde.org"); aboutData->addAuthor("Sven Lüppken", I18N_NOOP("Current Maintainer"), "sven@kde.org");
aboutData->addAuthor("Torben Weis", 0, "weis@kde.org"); aboutData->addAuthor("Torben Weis", 0, "weis@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 );
if ( !KoShellApp::start() ) { if ( !KoShellApp::start() ) {
// Already running, brought to the foreground. // Already running, brought to the foreground.

@ -37,8 +37,8 @@ static const KCmdLineOptions options[]=
extern "C" KPLATO_EXPORT int kdemain( int argc, char **argv ) { extern "C" KPLATO_EXPORT int kdemain( int argc, char **argv ) {
KCmdLineArgs::init( argc, argv, KPlato::newAboutData()); TDECmdLineArgs::init( argc, argv, KPlato::newAboutData());
KCmdLineArgs::addCmdLineOptions( KPlato::options ); TDECmdLineArgs::addCmdLineOptions( KPlato::options );
KoApplication app; KoApplication app;

@ -34,8 +34,8 @@ static const KCmdLineOptions options[]=
extern "C" KPRESENTER_EXPORT int kdemain( int argc, char **argv ) extern "C" KPRESENTER_EXPORT int kdemain( int argc, char **argv )
{ {
KCmdLineArgs::init( argc, argv, newKPresenterAboutData() ); TDECmdLineArgs::init( argc, argv, newKPresenterAboutData() );
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KoApplication app; KoApplication app;

@ -34,8 +34,8 @@ static const KCmdLineOptions options[]=
extern "C" KSPREAD_EXPORT int kdemain( int argc, char **argv ) extern "C" KSPREAD_EXPORT int kdemain( int argc, char **argv )
{ {
KCmdLineArgs::init( argc, argv, newAboutData() ); TDECmdLineArgs::init( argc, argv, newAboutData() );
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KoApplication app; KoApplication app;

@ -51,7 +51,7 @@ void run( Tester* test )
int main( int argc, char** argv ) int main( int argc, char** argv )
{ {
// Initialize command line args // Initialize command line args
KCmdLineArgs::init(argc, argv, "formulatest", "formulatest", "unit test", "0.1", true); TDECmdLineArgs::init(argc, argv, "formulatest", "formulatest", "unit test", "0.1", true);
KApplication app(false, false); KApplication app(false, false);
run( new FormulaParserTester() ); run( new FormulaParserTester() );

@ -36,8 +36,8 @@ static const KCmdLineOptions options[] =
extern "C" KUGARDESIGNER_EXPORT int kdemain( int argc, char **argv ) extern "C" KUGARDESIGNER_EXPORT int kdemain( int argc, char **argv )
{ {
KLocale::setMainCatalogue( "kugar" ); KLocale::setMainCatalogue( "kugar" );
KCmdLineArgs::init( argc, argv, newKudesignerAboutData() ); TDECmdLineArgs::init( argc, argv, newKudesignerAboutData() );
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KoApplication app; KoApplication app;
if ( !app.start() ) // parses command line args, create initial docs and shells if ( !app.start() ) // parses command line args, create initial docs and shells

@ -31,8 +31,8 @@ static KCmdLineOptions options[] =
extern "C" KUGAR_EXPORT int kdemain( int argc, char *argv[] ) extern "C" KUGAR_EXPORT int kdemain( int argc, char *argv[] )
{ {
KCmdLineArgs::init( argc, argv, newKugarAboutData() ); TDECmdLineArgs::init( argc, argv, newKugarAboutData() );
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options. TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KoApplication app; KoApplication app;

@ -30,8 +30,8 @@ static const KCmdLineOptions options[]=
extern "C" KWORD_EXPORT int kdemain( int argc, char **argv ) extern "C" KWORD_EXPORT int kdemain( int argc, char **argv )
{ {
KCmdLineArgs::init( argc, argv, newKWordAboutData()); TDECmdLineArgs::init( argc, argv, newKWordAboutData());
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KoApplication app; KoApplication app;

@ -241,8 +241,8 @@ int main(int argc, char** argv)
"(c) 2003, Ulrich Kuettler"); "(c) 2003, Ulrich Kuettler");
aboutData.addAuthor("Ulrich Kuettler",0, "ulrich.kuettler@gmx.de"); aboutData.addAuthor("Ulrich Kuettler",0, "ulrich.kuettler@gmx.de");
KCmdLineArgs::init(argc, argv, &aboutData); TDECmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
KApplication app; KApplication app;
@ -261,7 +261,7 @@ int main(int argc, char** argv)
scrollview1a->setCaption("Test1a of the formula engine"); scrollview1a->setCaption("Test1a of the formula engine");
scrollview1a->show(); scrollview1a->show();
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() );
if ( fi.extension() == "mml" ) if ( fi.extension() == "mml" )

@ -73,7 +73,7 @@ KoApplication::KoApplication()
// This gets called before entering KApplication::KApplication // This gets called before entering KApplication::KApplication
bool KoApplication::initHack() bool KoApplication::initHack()
{ {
KCmdLineArgs::addCmdLineOptions( options, I18N_NOOP("KOffice"), "koffice", "kde" ); TDECmdLineArgs::addCmdLineOptions( options, I18N_NOOP("KOffice"), "koffice", "kde" );
return true; return true;
} }
@ -102,10 +102,10 @@ bool KoApplication::start()
} }
// Get the command line arguments which we have to parse // Get the command line arguments which we have to parse
KCmdLineArgs *args= KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args= TDECmdLineArgs::parsedArgs();
int argsCount = args->count(); int argsCount = args->count();
KCmdLineArgs *koargs = KCmdLineArgs::parsedArgs("koffice"); TDECmdLineArgs *koargs = TDECmdLineArgs::parsedArgs("koffice");
TQCString dpiValues = koargs->getOption( "dpi" ); TQCString dpiValues = koargs->getOption( "dpi" );
if ( !dpiValues.isEmpty() ) { if ( !dpiValues.isEmpty() ) {
int sep = dpiValues.find( TQRegExp( "[x, ]" ) ); int sep = dpiValues.find( TQRegExp( "[x, ]" ) );

@ -39,8 +39,8 @@ int main(int argc, char **argv)
KAboutData about("proptest", "KoProperty Test", version, description, KAboutData about("proptest", "KoProperty Test", version, description,
KAboutData::License_GPL, "(C) 2005 Cedric Pasteur", 0, 0, "cedric.pasteur@free.fr"); KAboutData::License_GPL, "(C) 2005 Cedric Pasteur", 0, 0, "cedric.pasteur@free.fr");
about.addAuthor( "Cedric Pasteur", 0, "cedric.pasteur@free.fr" ); about.addAuthor( "Cedric Pasteur", 0, "cedric.pasteur@free.fr" );
KCmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app; KApplication app;
Test *mainWin = 0; Test *mainWin = 0;
@ -51,7 +51,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();
/// @todo do something with the command line args here /// @todo do something with the command line args here

@ -39,7 +39,7 @@ using namespace KoProperty;
Test::Test() Test::Test()
: KMainWindow(0,"koproperty_test") : KMainWindow(0,"koproperty_test")
{ {
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
const bool flat = args->isSet("flat"); const bool flat = args->isSet("flat");
const bool readOnly = args->isSet("ro"); const bool readOnly = args->isSet("ro");

@ -48,7 +48,7 @@ private:
int main (int argc, char ** argv) int main (int argc, char ** argv)
{ {
KApplication::disableAutoDcopRegistration(); KApplication::disableAutoDcopRegistration();
KCmdLineArgs::init(argc,argv,"kobordertest", 0, 0, 0, 0); TDECmdLineArgs::init(argc,argv,"kobordertest", 0, 0, 0, 0);
KApplication app; KApplication app;
KoZoomHandler* zh = new KoZoomHandler(); KoZoomHandler* zh = new KoZoomHandler();

@ -110,18 +110,18 @@ int main(int argc, char **argv)
about.addAuthor("Sebastian Sauer", "Author", "mail@dipe.org"); about.addAuthor("Sebastian Sauer", "Author", "mail@dipe.org");
// Initialize command line args // Initialize command line args
KCmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
// Tell which options are supported and parse them. // Tell which options are supported and parse them.
static KCmdLineOptions options[] = { static KCmdLineOptions options[] = {
{ "+file", I18N_NOOP("Scriptfile"), 0 }, { "+file", I18N_NOOP("Scriptfile"), 0 },
KCmdLineLastOption KCmdLineLastOption
}; };
KCmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
// If no options are defined. // If no options are defined.
if(args->count() < 1) { if(args->count() < 1) {
std::cout << "Syntax: " << KCmdLineArgs::appName() << " scriptfile1 [scriptfile2] [scriptfile3] ..." << std::endl; std::cout << "Syntax: " << TDECmdLineArgs::appName() << " scriptfile1 [scriptfile2] [scriptfile3] ..." << std::endl;
return ERROR_HELP; return ERROR_HELP;
} }

@ -155,10 +155,10 @@ int main(int argc, char **argv)
"kross@dipe.org"); "kross@dipe.org");
about.addAuthor("Sebastian Sauer", "Author", "mail@dipe.org"); about.addAuthor("Sebastian Sauer", "Author", "mail@dipe.org");
KCmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
TQString interpretername = args->getOption("interpreter"); TQString interpretername = args->getOption("interpreter");
TQString scriptfilename = args->getOption("scriptfile"); TQString scriptfilename = args->getOption("scriptfile");

@ -205,7 +205,7 @@ int test( const char* testName, KoStore::Backend backend, const TQString& testFi
int main( int argc, char **argv ) int main( int argc, char **argv )
{ {
KCmdLineArgs::init( argc, argv, "storage_test", "A test for the KoStore classes", "1" ); TDECmdLineArgs::init( argc, argv, "storage_test", "A test for the KoStore classes", "1" );
KApplication app( argc, argv ); KApplication app( argc, argv );
// KZip (due to KSaveFile) doesn't support relative filenames // KZip (due to KSaveFile) doesn't support relative filenames

@ -25,7 +25,7 @@ private:
int main( int argc, char** argv ) int main( int argc, char** argv )
{ {
KApplication::disableAutoDcopRegistration(); KApplication::disableAutoDcopRegistration();
KCmdLineArgs::init(argc, argv, "storedroptest", 0, 0, 0, 0); TDECmdLineArgs::init(argc, argv, "storedroptest", 0, 0, 0, 0);
KApplication app; KApplication app;
StoreDropTest* window = new StoreDropTest( 0 ); StoreDropTest* window = new StoreDropTest( 0 );

@ -78,8 +78,8 @@ int main( int argc, char **argv )
I18N_NOOP("(c) 2001-2004 KOffice developers") ); I18N_NOOP("(c) 2001-2004 KOffice developers") );
aboutData.addAuthor("David Faure",0, "faure@kde.org"); aboutData.addAuthor("David Faure",0, "faure@kde.org");
aboutData.addAuthor("Nicolas Goutte",0, "goutte@kde.org"); aboutData.addAuthor("Nicolas Goutte",0, "goutte@kde.org");
KCmdLineArgs::init( argc, argv, &aboutData); TDECmdLineArgs::init( argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app; KApplication app;
@ -89,7 +89,7 @@ int main( int argc, char **argv )
KImageIO::registerFormats(); KImageIO::registerFormats();
// Get the command line arguments which we have to parse // Get the command line arguments which we have to parse
KCmdLineArgs *args= KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args= TDECmdLineArgs::parsedArgs();
if ( args->count() == 2 ) if ( args->count() == 2 )
{ {
KURL uIn = args->url( 0 ); KURL uIn = args->url( 0 );
@ -155,7 +155,7 @@ int main( int argc, char **argv )
} }
} }
KCmdLineArgs::usage(i18n("Two arguments required")); TDECmdLineArgs::usage(i18n("Two arguments required"));
return 3; return 3;
} }

@ -39,8 +39,8 @@ extern "C" KOFFICETOOLS_EXPORT int kdemain(int argc, char **argv)
I18N_NOOP( "KThesaurus - List synonyms" ), KAboutData::License_GPL, I18N_NOOP( "KThesaurus - List synonyms" ), KAboutData::License_GPL,
I18N_NOOP( "(c) 2001 Daniel Naber" ) ); I18N_NOOP( "(c) 2001 Daniel Naber" ) );
KCmdLineArgs::init(argc, argv, &aboutData); TDECmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
KApplication a; // KDataTool needs an instance KApplication a; // KDataTool needs an instance
// TODO: take term from command line! // TODO: take term from command line!
@ -67,7 +67,7 @@ extern "C" KOFFICETOOLS_EXPORT int kdemain(int argc, char **argv)
} }
*/ */
TQString text = ""; TQString text = "";
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if ( args->count() > 0 ) { if ( args->count() > 0 ) {
text = args->arg(0); text = args->arg(0);
} }

Loading…
Cancel
Save