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)
{
KCmdLineArgs::init(argc, argv, newChalkAboutData());
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::init(argc, argv, newChalkAboutData());
TDECmdLineArgs::addCmdLineOptions(options);
KoApplication app;

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

@ -34,8 +34,8 @@ static const KCmdLineOptions options[]=
extern "C" EXAMPLE_EXPORT int kdemain( int argc, char **argv )
{
KCmdLineArgs::init( argc, argv, newExampleAboutData() );
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init( argc, argv, newExampleAboutData() );
TDECmdLineArgs::addCmdLineOptions( options );
KoApplication app;
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[] )
{
KCmdLineArgs::init( argc, argv, newKarbonAboutData() );
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init( argc, argv, newKarbonAboutData() );
TDECmdLineArgs::addCmdLineOptions( options );
KoApplication app;
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 )
{
KCmdLineArgs::init( argc, argv, newKChartAboutData());
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init( argc, argv, newKChartAboutData());
TDECmdLineArgs::addCmdLineOptions( options );
KoApplication app;
if (!app.start())

@ -321,8 +321,8 @@ void Kexi::initCmdLineArgs(int argc, char *argv[], KAboutData* aboutData)
#ifdef CUSTOM_VERSION
# include "../custom_startup.h"
#endif
KCmdLineArgs::init( argc, argv, about );
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init( argc, argv, about );
TDECmdLineArgs::addCmdLineOptions( options );
}
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.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" );
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions(options);
KApplication app;
KGlobal::iconLoader()->addAppDir("kexi");
@ -67,7 +67,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() >= 1)
{
for (int i = 0; i < args->count(); i++)

@ -90,7 +90,7 @@ SimpleCommandLineApp::SimpleCommandLineApp(
{
TQFileInfo fi(argv[0]);
TQCString appName( fi.baseName().latin1() );
KCmdLineArgs::init(argc, argv,
TDECmdLineArgs::init(argc, argv,
new KAboutData( appName, programName,
version, shortDescription, licenseType, copyrightStatement, text,
homePageAddress, bugsEmailAddress));
@ -123,9 +123,9 @@ SimpleCommandLineApp::SimpleCommandLineApp(
allOptionsPtr->name = 0; //end
allOptionsPtr->description = 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.userName = args->getOption("user");

@ -206,7 +206,7 @@ KexiStartupHandler::~KexiStartupHandler()
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::ConstIterator it;
@ -268,7 +268,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
{
m_action = DoNothing;
// d->showConnectionDetailsExecuted = false;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(0);
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(0);
if (!args)
return true;

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

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

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

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

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

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

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

@ -33,8 +33,8 @@ static const KCmdLineOptions options[]=
extern "C" KIVIO_EXPORT int kdemain( int argc, char **argv )
{
KCmdLineArgs::init( argc, argv, newKivioAboutData() );
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init( argc, argv, newKivioAboutData() );
TDECmdLineArgs::addCmdLineOptions( options );
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("Torben Weis", 0, "weis@kde.org");
aboutData->addAuthor("David Faure", 0, "faure@kde.org");
KCmdLineArgs::init( argc, argv, aboutData );
TDECmdLineArgs::init( argc, argv, aboutData );
if ( !KoShellApp::start() ) {
// Already running, brought to the foreground.

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

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

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

@ -51,7 +51,7 @@ void run( Tester* test )
int main( int argc, char** argv )
{
// 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);
run( new FormulaParserTester() );

@ -36,8 +36,8 @@ static const KCmdLineOptions options[] =
extern "C" KUGARDESIGNER_EXPORT int kdemain( int argc, char **argv )
{
KLocale::setMainCatalogue( "kugar" );
KCmdLineArgs::init( argc, argv, newKudesignerAboutData() );
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init( argc, argv, newKudesignerAboutData() );
TDECmdLineArgs::addCmdLineOptions( options );
KoApplication app;
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[] )
{
KCmdLineArgs::init( argc, argv, newKugarAboutData() );
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
TDECmdLineArgs::init( argc, argv, newKugarAboutData() );
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KoApplication app;

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

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

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

@ -39,8 +39,8 @@ int main(int argc, char **argv)
KAboutData about("proptest", "KoProperty Test", version, description,
KAboutData::License_GPL, "(C) 2005 Cedric Pasteur", 0, 0, "cedric.pasteur@free.fr");
about.addAuthor( "Cedric Pasteur", 0, "cedric.pasteur@free.fr" );
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
Test *mainWin = 0;
@ -51,7 +51,7 @@ int main(int argc, char **argv)
else
{
// no session.. just start up normally
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
/// @todo do something with the command line args here

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

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

@ -110,18 +110,18 @@ int main(int argc, char **argv)
about.addAuthor("Sebastian Sauer", "Author", "mail@dipe.org");
// Initialize command line args
KCmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::init(argc, argv, &about);
// Tell which options are supported and parse them.
static KCmdLineOptions options[] = {
{ "+file", I18N_NOOP("Scriptfile"), 0 },
KCmdLineLastOption
};
KCmdLineArgs::addCmdLineOptions(options);
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
// If no options are defined.
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;
}

@ -155,10 +155,10 @@ int main(int argc, char **argv)
"kross@dipe.org");
about.addAuthor("Sebastian Sauer", "Author", "mail@dipe.org");
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions(options);
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
TQString interpretername = args->getOption("interpreter");
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 )
{
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 );
// KZip (due to KSaveFile) doesn't support relative filenames

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

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

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

Loading…
Cancel
Save