Browse Source

Rename KCmdLineArgs to TDECmdLineArgs to avoid conflicts with KDE4

tags/r14.0.0
Timothy Pearson 7 years ago
parent
commit
5bca2e3e42
100 changed files with 359 additions and 359 deletions
  1. +6
    -6
      KDE2PORTING.html
  2. +3
    -3
      arts/kde/kconverttest.cc
  3. +3
    -3
      arts/kde/kiotest.cc
  4. +3
    -3
      arts/kde/kiotestslow.cc
  5. +1
    -1
      arts/kde/mcop-dcop/kmcop.cpp
  6. +1
    -1
      arts/knotify/knotify.cpp
  7. +3
    -3
      arts/message/artsmessage.cc
  8. +1
    -1
      dcop/tests/driver.cpp
  9. +1
    -1
      dcop/tests/test.cpp
  10. +1
    -1
      interfaces/terminal/test/main.cc
  11. +3
    -3
      kabc/kab2kabc.cpp
  12. +1
    -1
      kabc/tests/bigread.cpp
  13. +1
    -1
      kabc/tests/bigwrite.cpp
  14. +1
    -1
      kabc/tests/kabcargl.cpp
  15. +3
    -3
      kabc/tests/testaddressee.cpp
  16. +3
    -3
      kabc/tests/testaddresseelist.cpp
  17. +2
    -2
      kabc/tests/testaddressfmt.cpp
  18. +1
    -1
      kabc/tests/testaddresslineedit.cpp
  19. +1
    -1
      kabc/tests/testdb.cpp
  20. +3
    -3
      kabc/tests/testdistlist.cpp
  21. +1
    -1
      kabc/tests/testkabc.cpp
  22. +3
    -3
      kabc/tests/testkabcdlg.cpp
  23. +1
    -1
      kabc/tests/testldapclient.cpp
  24. +3
    -3
      kabc/tests/testlock.cpp
  25. +1
    -1
      kabc/vcard/testwrite.cpp
  26. +3
    -3
      kabc/vcardparser/testread.cpp
  27. +1
    -1
      kabc/vcardparser/testwrite.cpp
  28. +4
    -4
      kate/part/test_regression.cpp
  29. +3
    -3
      kcmshell/main.cpp
  30. +4
    -4
      kconf_update/kconf_update.cpp
  31. +3
    -3
      kded/kbuildsycoca.cpp
  32. +5
    -5
      kded/kde-menu.cpp
  33. +3
    -3
      kded/kded.cpp
  34. +3
    -3
      kded/khostname.cpp
  35. +3
    -3
      kdewidgets/makekdewidgets.cpp
  36. +3
    -3
      kdoctools/meinproc.cpp
  37. +2
    -2
      khtml/java/tests/testkjavaappletserver.cpp
  38. +4
    -4
      khtml/test_regression.cpp
  39. +4
    -4
      khtml/testkhtml.cpp
  40. +3
    -3
      kinit/klauncher_main.cpp
  41. +1
    -1
      kio/kfile/kfiledialog.cpp
  42. +4
    -4
      kio/kioexec/main.cpp
  43. +8
    -8
      kio/misc/kfile/fileprops.cpp
  44. +3
    -3
      kio/misc/kmailservice.cpp
  45. +3
    -3
      kio/misc/ksendbugmail/main.cpp
  46. +3
    -3
      kio/misc/ktelnetservice.cpp
  47. +2
    -2
      kio/misc/uiserver.cpp
  48. +1
    -1
      kio/tests/jobtest.cpp
  49. +1
    -1
      kio/tests/kacltest.cpp
  50. +3
    -3
      kio/tests/kdirwatchtest.cpp
  51. +3
    -3
      kio/tests/kionetrctest.cpp
  52. +1
    -1
      kio/tests/kiopassdlgtest.cpp
  53. +5
    -5
      kio/tests/kioslavetest.cpp
  54. +3
    -3
      kio/tests/kmimefromext.cpp
  55. +4
    -4
      kio/tests/kpropsdlgtest.cpp
  56. +1
    -1
      kio/tests/kprotocolinfotest.cpp
  57. +4
    -4
      kio/tests/ktradertest.cpp
  58. +3
    -3
      kio/tests/kurifiltertest.cpp
  59. +1
    -1
      kio/tests/kurlcompletiontest.cpp
  60. +3
    -3
      kio/tests/metatest.cpp
  61. +3
    -3
      kio/tests/speed.cpp
  62. +3
    -3
      kioslave/http/http_cache_cleaner.cpp
  63. +3
    -3
      kioslave/http/kcookiejar/main.cpp
  64. +4
    -4
      kioslave/http/kcookiejar/tests/kcookiejartest.cpp
  65. +1
    -1
      knewstuff/ghns.cpp
  66. +4
    -4
      knewstuff/khotnewstuff.cpp
  67. +1
    -1
      knewstuff/testnewstuff.cpp
  68. +3
    -3
      kparts/tests/ghostview.cpp
  69. +1
    -1
      kresources/testresources.cpp
  70. +1
    -1
      kstyles/utils/installtheme/main.cpp
  71. +3
    -3
      kunittest/modrunner.cpp
  72. +2
    -2
      kunittest/tester.h
  73. +1
    -1
      kutils/tests/kfindtest.cpp
  74. +1
    -1
      kutils/tests/kreplacetest.cpp
  75. +1
    -1
      kwallet/tests/kwalletasync.cpp
  76. +1
    -1
      kwallet/tests/kwalletboth.cpp
  77. +1
    -1
      kwallet/tests/kwalletsync.cpp
  78. +3
    -3
      libkscreensaver/main.cpp
  79. +2
    -2
      tdecore/kaboutdata.h
  80. +20
    -20
      tdecore/kapplication.cpp
  81. +5
    -5
      tdecore/kapplication.h
  82. +71
    -71
      tdecore/kcmdlineargs.cpp
  83. +23
    -23
      tdecore/kcmdlineargs.h
  84. +1
    -1
      tdecore/kconfig_compiler/example/autoexample.cpp
  85. +1
    -1
      tdecore/kconfig_compiler/example/example.cpp
  86. +3
    -3
      tdecore/kconfig_compiler/kconfig_compiler.cpp
  87. +2
    -2
      tdecore/kdetcompmgr.cpp
  88. +1
    -1
      tdecore/kinstance.h
  89. +1
    -1
      tdecore/klockfile.cpp
  90. +10
    -10
      tdecore/kuniqueapplication.cpp
  91. +6
    -6
      tdecore/kuniqueapplication.h
  92. +3
    -3
      tdecore/tde-config.cpp.cmake
  93. +3
    -3
      tdecore/tde-config.cpp.in
  94. +1
    -1
      tdecore/tests/kapptest.cpp
  95. +3
    -3
      tdecore/tests/kcalendartest.cpp
  96. +4
    -4
      tdecore/tests/kcmdlineargstest.cpp
  97. +1
    -1
      tdecore/tests/kglobaltest.cpp
  98. +1
    -1
      tdecore/tests/kmacroexpandertest.cpp
  99. +3
    -3
      tdecore/tests/kmdcodectest.cpp
  100. +1
    -1
      tdecore/tests/kresolvertest.cpp

+ 6
- 6
KDE2PORTING.html View File

@@ -20,7 +20,7 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>
<LI><A HREF="#general">Global changes</A></LI>
<LI><A HREF="#automoc">automoc/am_edit, Makefile.am tags</A></LI>
<LI><A HREF="#KApplication">KApplication</A></LI>
<LI><A HREF="#KCmdLineArgs">KCmdLineArgs</A></LI>
<LI><A HREF="#TDECmdLineArgs">TDECmdLineArgs</A></LI>
<LI><A HREF="#KLocale">KLocale</A></LI>
<LI><A HREF="#KGlobal">KGlobal: access to KDE global objects.</A></LI>
<LI><A HREF="#KIconLoader">KIconLoader</A></LI>
@@ -148,14 +148,14 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>

The KApplication constructor has changed. Command line arguments and
program name should no longer be passed to KApplication but to
KCmdLineArgs. KCmdLineArgs performs command line parsing and a command
TDECmdLineArgs. TDECmdLineArgs performs command line parsing and a command
line help. See below for more info.<P>

<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>

<H3><A NAME="KCmdLineArgs">KCmdLineArgs</A></H3>
<H3><A NAME="TDECmdLineArgs">TDECmdLineArgs</A></H3>

KCmdLineArgs is a new class that handles command line parsing and
TDECmdLineArgs is a new class that handles command line parsing and
command line help. It is now required that your application
specifies at least:<P>
<UL>
@@ -165,13 +165,13 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>
<LI>All command line options that it supports.
</UL>
KCmdLineArgs itself will add the command line options supported by Qt
TDECmdLineArgs itself will add the command line options supported by Qt
and KApplication.<P>

You can also use the KAboutData class to specify name, description and
version.<P>

In return for this information you can query KCmdLineArgs whether an
In return for this information you can query TDECmdLineArgs whether an
certain option was specified on the command line and your application
now automatically supports --help and --version. It aborts with a
useful error message when the command line contains a syntax error.


+ 3
- 3
arts/kde/kconverttest.cc View File

@@ -57,11 +57,11 @@ int main(int argc, char **argv)
{
KAboutData aboutData("kconverttest", I18N_NOOP("KConvertTest"), I18N_NOOP("0.1"), "", KAboutData::License_GPL, "");
KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions(options);
KApplication app;

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

KURL url;


+ 3
- 3
arts/kde/kiotest.cc View File

@@ -22,15 +22,15 @@ int main(int argc, char **argv)
{
KAboutData aboutData( "kiotest", I18N_NOOP("KIOTest"), I18N_NOOP("0.1"), "", KAboutData::License_GPL, "");
KCmdLineArgs::init(argc,argv,&aboutData);
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::addCmdLineOptions(options);
KApplication app;
QIOManager qiomanager;
Dispatcher dispatcher(&qiomanager);
KIOInputStream stream;
StdoutWriter writer;

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

if(args->count())
{


+ 3
- 3
arts/kde/kiotestslow.cc View File

@@ -90,8 +90,8 @@ int main(int argc, char **argv)
{
KAboutData aboutData( "kiotestslow", I18N_NOOP("KIOTest"), I18N_NOOP("0.1"), "", KAboutData::License_GPL, "");
KCmdLineArgs::init(argc,argv,&aboutData);
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::addCmdLineOptions(options);
KApplication app;
QIOManager qiomanager;
Dispatcher dispatcher(&qiomanager);
@@ -102,7 +102,7 @@ int main(int argc, char **argv)
#endif
KIOTestSlow writer;

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

if(args->count())
{


+ 1
- 1
arts/kde/mcop-dcop/kmcop.cpp View File

@@ -53,7 +53,7 @@ int main(int argc, char **argv)
KAboutData::License_GPL, "(C) 2001, Nikolas Zimmermann");
aboutdata.addAuthor("Nikolas Zimmermann", I18N_NOOP("Author"), "wildfox@kde.org");

KCmdLineArgs::init(argc, argv, &aboutdata);
TDECmdLineArgs::init(argc, argv, &aboutdata);
KUniqueApplication::addCmdLineOptions();

if(!KUniqueApplication::start())


+ 1
- 1
arts/knotify/knotify.cpp View File

@@ -113,7 +113,7 @@ KDE_EXPORT int kdemain(int argc, char **argv)
aboutdata.addAuthor("Stefan Westerfeld",I18N_NOOP("Sound support"),"stefan@space.twc.de");
aboutdata.addAuthor("Charles Samuels",I18N_NOOP("Previous Maintainer"),"charles@kde.org");

KCmdLineArgs::init( argc, argv, &aboutdata );
TDECmdLineArgs::init( argc, argv, &aboutdata );
KUniqueApplication::addCmdLineOptions();




+ 3
- 3
arts/message/artsmessage.cc View File

@@ -58,11 +58,11 @@ KAboutData aboutData("artsmessage", I18N_NOOP("artsmessage"), "0.1",
int main(int argc, char **argv) {
aboutData.addAuthor("Jeff Tranter", 0, "tranter@kde.org");
KGlobal::locale()->setMainCatalogue("tdelibs");
KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions(options);
KApplication app;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
TQString msg;

// must be at least one argument


+ 1
- 1
dcop/tests/driver.cpp View File

@@ -53,7 +53,7 @@ int main(int argc, char** argv)
if ( argc < 2 ) { tqWarning("Usage: driver <appid>"); return 1; }
const char* appname = strdup( argv[ 1 ] );
argv[ 1 ] = 0; // sue me
KCmdLineArgs::init( argc, argv, "TestAppDriver", "Tests the dcop familly of tools + libraries", "1.0" ); // FIXME
TDECmdLineArgs::init( argc, argv, "TestAppDriver", "Tests the dcop familly of tools + libraries", "1.0" ); // FIXME
KApplication app;
app.dcopClient()->attach( );
app.dcopClient()->registerAs( "TestAppDriver" );


+ 1
- 1
dcop/tests/test.cpp View File

@@ -31,7 +31,7 @@ int main(int argc, char** argv)
batch();
return 0;
}
KCmdLineArgs::init( argc, argv, "TestApp", "Tests the dcop familly of tools + libraries", "1.0" ); // FIXME
TDECmdLineArgs::init( argc, argv, "TestApp", "Tests the dcop familly of tools + libraries", "1.0" ); // FIXME
KApplication app;
if(!app.dcopClient()->attach( ))
return 1;


+ 1
- 1
interfaces/terminal/test/main.cc View File

@@ -34,7 +34,7 @@ Win::Win()
int main( int argc, char** argv )
{
KAboutData* about = new KAboutData( "tetest", "TETest", "0.1" );
KCmdLineArgs::init( argc, argv, about );
TDECmdLineArgs::init( argc, argv, about );
KApplication a;
Win* win = new Win();
win->show();


+ 3
- 3
kabc/kab2kabc.cpp View File

@@ -435,12 +435,12 @@ int main( int argc, char **argv )
KAboutData aboutData( "kab2kabc", I18N_NOOP( "Kab to Kabc Converter" ), "0.1" );
aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" );

KCmdLineArgs::init( argc, argv, &aboutData );
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options );

KApplication app;

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

bool override = false;



+ 1
- 1
kabc/tests/bigread.cpp View File

@@ -18,7 +18,7 @@ using namespace KABC;
int main(int argc,char **argv)
{
KAboutData aboutData("bigread","BigReadKabc","0.1");
KCmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::init(argc,argv,&aboutData);

KApplication app( false, false );


+ 1
- 1
kabc/tests/bigwrite.cpp View File

@@ -15,7 +15,7 @@ using namespace KABC;
int main(int argc,char **argv)
{
KAboutData aboutData("bigwrite","BigWriteKabc","0.1");
KCmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::init(argc,argv,&aboutData);

KApplication app( false, false );



+ 1
- 1
kabc/tests/kabcargl.cpp View File

@@ -38,7 +38,7 @@ int main(int argc,char **argv)
KAboutData aboutData("kabcargl","Fix broken pre3.0rc3 format","0.1");
aboutData.addAuthor("Cornelius Schumacher", 0, "schumacher@kde.org");

KCmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::init(argc,argv,&aboutData);

KApplication app;



+ 3
- 3
kabc/tests/testaddressee.cpp View File

@@ -23,11 +23,11 @@ static const KCmdLineOptions options[] =
int main(int argc,char **argv)
{
KAboutData aboutData("testaddressee","TestAddressee","0.1");
KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions(options);

KApplication app;
KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();

kdDebug() << "Creating a" << endl;
Addressee a;


+ 3
- 3
kabc/tests/testaddresseelist.cpp View File

@@ -20,11 +20,11 @@ static const KCmdLineOptions options[] =
int main(int /*argc*/,char /* **argv*/)
{
/* KAboutData aboutData("testaddresseelist","TestAddresseeList","0.1");
KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions(options);

KApplication app;
KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); */
TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs(); */

kdDebug() << "Creating addressees" << endl;
Addressee a, b, c, d, e, f;


+ 2
- 2
kabc/tests/testaddressfmt.cpp View File

@@ -20,8 +20,8 @@ static const KCmdLineOptions options[] =
int main(int argc,char **argv)
{
KAboutData aboutData("testaddressfmt","TestAddressFormat","0.1");
KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions(options);

KApplication app;



+ 1
- 1
kabc/tests/testaddresslineedit.cpp View File

@@ -12,7 +12,7 @@ int main( int argc,char **argv )
{
KAboutData aboutData( "testaddresslineedit",
I18N_NOOP( "Test Address LineEdit" ), "0.1" );
KCmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::init( argc, argv, &aboutData );

KApplication app;



+ 1
- 1
kabc/tests/testdb.cpp View File

@@ -13,7 +13,7 @@ using namespace KABC;
int main(int argc,char **argv)
{
KAboutData aboutData("testdb","TestKabcDB","0.1");
KCmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::init(argc,argv,&aboutData);

// KApplication app( false, false );
KApplication app;


+ 3
- 3
kabc/tests/testdistlist.cpp View File

@@ -23,12 +23,12 @@ static const KCmdLineOptions options[] =
int main(int argc,char **argv)
{
KAboutData aboutData("testdistlist",I18N_NOOP("Test Distribution Lists"),"0.1");
KCmdLineArgs::init(argc,argv,&aboutData);
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::addCmdLineOptions( options );

KApplication app;

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if (args->isSet("list")) {
TQString name = args->getOption("list");


+ 1
- 1
kabc/tests/testkabc.cpp View File

@@ -21,7 +21,7 @@ using namespace KABC;
int main(int argc,char **argv)
{
KAboutData aboutData("testkabc",I18N_NOOP("TestKabc"),"0.1");
KCmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::init(argc, argv, &aboutData);

KApplication app( false, false );
AddressBook *ab = StdAddressBook::self();


+ 3
- 3
kabc/tests/testkabcdlg.cpp View File

@@ -19,12 +19,12 @@ static const KCmdLineOptions options[] =
int main(int argc,char **argv)
{
KAboutData aboutData("testkabcdlg",I18N_NOOP("TestKabc"),"0.1");
KCmdLineArgs::init(argc,argv,&aboutData);
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::addCmdLineOptions( options );

KApplication app;

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if (args->isSet("multiple")) {
Addressee::List al = AddresseeDialog::getAddressees( 0 );
Addressee::List::ConstIterator it;


+ 1
- 1
kabc/tests/testldapclient.cpp View File

@@ -30,7 +30,7 @@
int main(int argc, char *argv[])
{
KApplication::disableAutoDcopRegistration();
KCmdLineArgs::init(argc,argv,"testldapclient", 0, 0, 0, 0);
TDECmdLineArgs::init(argc,argv,"testldapclient", 0, 0, 0, 0);
KApplication app;

TestLDAPClient test;


+ 3
- 3
kabc/tests/testlock.cpp View File

@@ -166,14 +166,14 @@ static const KCmdLineOptions options[] =
int main(int argc,char **argv)
{
KAboutData aboutData("testlock",I18N_NOOP("Test libkabc Lock"),"0.1");
KCmdLineArgs::init(argc,argv,&aboutData);
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::addCmdLineOptions( options );

KApplication app;

TQString identifier;

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if ( args->count() == 1 ) {
identifier = args->arg( 0 );
} else if ( args->count() != 0 ) {


+ 1
- 1
kabc/vcard/testwrite.cpp View File

@@ -9,7 +9,7 @@
int main(int argc,char **argv)
{
KAboutData aboutData("testwrite",I18N_NOOP("TestWritevCard"),"0.1");
KCmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::init(argc,argv,&aboutData);

KApplication app;


+ 3
- 3
kabc/vcardparser/testread.cpp View File

@@ -47,12 +47,12 @@ int main( int argc, char **argv )
KAboutData aboutData( "testread", "vCard test reader", "0.1" );
aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" );

KCmdLineArgs::init( argc, argv, &aboutData );
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options );

KApplication app( false, false );

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

if ( args->count() != 1 ) {
std::cerr << "Missing argument" << std::endl;


+ 1
- 1
kabc/vcardparser/testwrite.cpp View File

@@ -37,7 +37,7 @@ int main( int argc, char **argv )
{
KAboutData aboutData( "testwrite", "vCard test writer", "0.1" );

KCmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::init( argc, argv, &aboutData );

KApplication app( false, false );


+ 4
- 4
kate/part/test_regression.cpp View File

@@ -410,11 +410,11 @@ int main(int argc, char *argv[])

// signal( SIGALRM, signal_handler );

KCmdLineArgs::init(argc, argv, "testregression", "TestRegression",
TDECmdLineArgs::init(argc, argv, "testregression", "TestRegression",
"Regression tester for kate", "1.0");
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::addCmdLineOptions(options);

KCmdLineArgs *args = KCmdLineArgs::parsedArgs( );
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs( );

TQCString baseDir = args->getOption("base");
TQCString baseDirConfigFile(::getenv("HOME") + TQCString(BASE_DIR_CONFIG));
@@ -440,7 +440,7 @@ int main(int argc, char *argv[])
"\techo \"<root-path>\" > %s\n"
"You may override the location by specifying the root explicitly on the\n"
"command line with option -b\n"
"", KCmdLineArgs::appName(),
"", TDECmdLineArgs::appName(),
(const char *)baseDirConfigFile,
(const char *)baseDirConfigFile);
::exit( 1 );


+ 3
- 3
kcmshell/main.cpp View File

@@ -213,11 +213,11 @@ extern "C" KDE_EXPORT int kdemain(int _argc, char *_argv[])
KGlobal::locale()->setMainCatalogue("kcmshell");

KCmdLineArgs::init(_argc, _argv, &aboutData);
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
TDECmdLineArgs::init(_argc, _argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KCMShell app;

const KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
const TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

const TQCString lang = args->getOption("lang");
if( !lang.isNull() )


+ 4
- 4
kconf_update/kconf_update.cpp View File

@@ -116,7 +116,7 @@ KonfUpdate::KonfUpdate()
config = new KConfig("kconf_updaterc");

TQStringList updateFiles;
KCmdLineArgs *args=KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args=TDECmdLineArgs::parsedArgs();
debug = args->isSet("debug");

@@ -139,7 +139,7 @@ KonfUpdate::KonfUpdate()
{
KURL url = args->url(i);
if (!url.isLocalFile())
KCmdLineArgs::usage(i18n("Only local files are supported."));
TDECmdLineArgs::usage(i18n("Only local files are supported."));
updateFiles.append(url.path());
}
}
@@ -948,8 +948,8 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)

aboutData.addAuthor("Waldo Bastian", 0, "bastian@kde.org");

KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions(options);

KInstance instance(&aboutData);



+ 3
- 3
kded/kbuildsycoca.cpp View File

@@ -724,9 +724,9 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
d.addAuthor("David Faure", I18N_NOOP("Author"), "faure@kde.org");
d.addAuthor("Waldo Bastian", I18N_NOOP("Author"), "bastian@kde.org");

KCmdLineArgs::init(argc, argv, &d);
KCmdLineArgs::addCmdLineOptions(options);
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs::init(argc, argv, &d);
TDECmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
bGlobalDatabase = args->isSet("global");
bMenuTest = args->isSet("menutest");



+ 5
- 5
kded/kde-menu.cpp View File

@@ -118,8 +118,8 @@ int main(int argc, char **argv)
KAboutData::License_GPL, "(c) 2003 Waldo Bastian");
d.addAuthor("Waldo Bastian", I18N_NOOP("Author"), "bastian@kde.org");

KCmdLineArgs::init(argc, argv, &d);
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::init(argc, argv, &d);
TDECmdLineArgs::addCmdLineOptions(options);

// KApplication k(false, false);
KApplication k(false);
@@ -128,9 +128,9 @@ int main(int argc, char **argv)
// this program is in tdelibs so it uses tdelibs as catalog
KLocale::setMainCatalogue("tdelibs");

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if (args->count() != 1)
KCmdLineArgs::usage(i18n("You must specify an application-id such as 'tde-konsole.desktop'"));
TDECmdLineArgs::usage(i18n("You must specify an application-id such as 'tde-konsole.desktop'"));

utf8 = args->isSet("utf8");

@@ -139,7 +139,7 @@ int main(int argc, char **argv)
bHighlight = args->isSet("highlight");

if (!bPrintMenuId && !bPrintMenuName && !bHighlight)
KCmdLineArgs::usage(i18n("You must specify at least one of --print-menu-id, --print-menu-name or --highlight"));
TDECmdLineArgs::usage(i18n("You must specify at least one of --print-menu-id, --print-menu-name or --highlight"));

if (args->isSet("cache-update"))
{


+ 3
- 3
kded/kded.cpp View File

@@ -878,11 +878,11 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])

KApplication::installSigpipeHandler();

KCmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::init(argc, argv, &aboutData);

KUniqueApplication::addCmdLineOptions();

KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::addCmdLineOptions( options );

// this program is in tdelibs so it uses tdelibs as catalog
KLocale::setMainCatalogue("tdelibs");
@@ -891,7 +891,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
putenv(strdup("SESSION_MANAGER="));

// Parse command line before checking DCOP
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

// Check DCOP communication.
{


+ 3
- 3
kded/khostname.cpp View File

@@ -65,7 +65,7 @@ protected:

KHostName::KHostName()
{
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if (args->count() != 2)
args->usage();
oldName = args->arg(0);
@@ -371,8 +371,8 @@ int main(int argc, char **argv)
KAboutData::License_GPL, "(c) 2001 Waldo Bastian");
d.addAuthor("Waldo Bastian", I18N_NOOP("Author"), "bastian@kde.org");

KCmdLineArgs::init(argc, argv, &d);
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::init(argc, argv, &d);
TDECmdLineArgs::addCmdLineOptions(options);

KInstance k(&d);



+ 3
- 3
kdewidgets/makekdewidgets.cpp View File

@@ -128,9 +128,9 @@ int main( int argc, char **argv ) {

KAboutData about( "makekdewidgets", I18N_NOOP( "makekdewidgets" ), version, description, KAboutData::License_GPL, "(C) 2004-2005 ian reinhart geiser", 0, 0, "geiseri@kde.org" );
about.addAuthor( "ian reinhart geiser", 0, "geiseri@kde.org" );
KCmdLineArgs::init( argc, argv, &about );
KCmdLineArgs::addCmdLineOptions( options );
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs::init( argc, argv, &about );
TDECmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if ( args->count() < 1 ) {
args->usage();
return ( 1 );


+ 3
- 3
kdoctools/meinproc.cpp View File

@@ -95,15 +95,15 @@ int main(int argc, char **argv) {
"$Revision$",
I18N_NOOP("TDE Translator for XML"));

KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions( options );

KLocale::setMainCatalogue("kio_help");
KInstance ins("meinproc");
KGlobal::locale();


KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if ( args->count() != 1 ) {
args->usage();
return ( 1 );


+ 2
- 2
khtml/java/tests/testkjavaappletserver.cpp View File

@@ -17,9 +17,9 @@ static KCmdLineOptions options[] =

int main(int argc, char **argv)
{
KCmdLineArgs::init( argc, argv, "testKJASSever", "testKJASServer", "test program", "0.0" );
TDECmdLineArgs::init( argc, argv, "testKJASSever", "testKJASServer", "test program", "0.0" );

KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::addCmdLineOptions( options );

KApplication app;



+ 4
- 4
khtml/test_regression.cpp View File

@@ -449,16 +449,16 @@ int main(int argc, char *argv[])
// workaround various Qt crashes by always enforcing a TrueColor visual
TQApplication::setColorSpec( TQApplication::ManyColor );

KCmdLineArgs::init(argc, argv, "testregression", "TestRegression",
TDECmdLineArgs::init(argc, argv, "testregression", "TestRegression",
"Regression tester for khtml", "1.0");
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::addCmdLineOptions(options);

KCmdLineArgs *args = KCmdLineArgs::parsedArgs( );
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs( );

TQCString baseDir = args->getOption("base");

if ( args->count() < 1 && baseDir.isEmpty() ) {
KCmdLineArgs::usage();
TDECmdLineArgs::usage();
::exit( 1 );
}



+ 4
- 4
khtml/testkhtml.cpp View File

@@ -37,14 +37,14 @@ static KCmdLineOptions options[] = { { "+file", "url to open", 0 } , KCmdLineLas
int main(int argc, char *argv[])
{

KCmdLineArgs::init(argc, argv, "testkhtml", "Testkhtml",
TDECmdLineArgs::init(argc, argv, "testkhtml", "Testkhtml",
"a basic web browser using the KHTML library", "1.0");
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::addCmdLineOptions(options);

KApplication a;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs( );
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs( );
if ( args->count() == 0 ) {
KCmdLineArgs::usage();
TDECmdLineArgs::usage();
::exit( 1 );
}



+ 3
- 3
kinit/klauncher_main.cpp View File

@@ -62,11 +62,11 @@ extern "C" KDE_EXPORT int kdemain( int argc, char**argv )

TQCString cname = KApplication::launcher();
char *name = cname.data();
KCmdLineArgs::init(argc, argv, name, "KLauncher", "A service launcher.",
TDECmdLineArgs::init(argc, argv, name, "KLauncher", "A service launcher.",
"v1.0");

KLauncher::addCmdLineOptions();
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::addCmdLineOptions( options );

// WABA: Make sure not to enable session management.
putenv(strdup("SESSION_MANAGER="));
@@ -74,7 +74,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char**argv )
// Allow the locale to initialize properly
KLocale::setMainCatalogue("tdelibs");

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

int maxTry = 3;
while(true)


+ 1
- 1
kio/kfile/kfiledialog.cpp View File

@@ -2322,7 +2322,7 @@ KURL KFileDialog::getStartURL( const TQString& startDir,
}
else
{
ret = KCmdLineArgs::makeURL( TQFile::encodeName(startDir) );
ret = TDECmdLineArgs::makeURL( TQFile::encodeName(startDir) );
// If we won't be able to list it (e.g. http), then use default
if ( !KProtocolInfo::supportsListing( ret ) )
useDefaultStartDir = true;


+ 4
- 4
kio/kioexec/main.cpp View File

@@ -68,9 +68,9 @@ KIOExec::KIOExec()
jobList = new TQPtrList<KIO::Job>;
jobList->setAutoDelete( false ); // jobs autodelete themselves

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if (args->count() < 1)
KCmdLineArgs::usage(i18n("'command' expected.\n"));
TDECmdLineArgs::usage(i18n("'command' expected.\n"));

tempfiles = args->isSet("tempfiles");
if ( args->isSet( "suggestedfilename" ) )
@@ -280,8 +280,8 @@ int main( int argc, char **argv )
aboutData.addAuthor("Waldo Bastian",0, "bastian@kde.org");
aboutData.addAuthor("Oswald Buddenhagen",0, "ossi@kde.org");

KCmdLineArgs::init( argc, argv, &aboutData );
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options );

KApplication app;



+ 8
- 8
kio/misc/kfile/fileprops.cpp View File

@@ -280,7 +280,7 @@ static void printSupportedMimeTypes()
}

// caller needs to delete the returned list!
static KFileItemList * fileItemList( const KCmdLineArgs *args )
static KFileItemList * fileItemList( const TDECmdLineArgs *args )
{
KFileItemList * items = new KFileItemList();
items->setAutoDelete( true );
@@ -291,14 +291,14 @@ static KFileItemList * fileItemList( const KCmdLineArgs *args )
return items;
}

static void showPropertiesDialog( const KCmdLineArgs *args )
static void showPropertiesDialog( const TDECmdLineArgs *args )
{
KFileItemList *items = fileItemList( args );
new KPropertiesDialog( *items, 0L, "props dialog", true );
delete items;
}

static void printMimeTypes( const KCmdLineArgs *args )
static void printMimeTypes( const TDECmdLineArgs *args )
{
for ( int i = 0; i < args->count(); i++ )
{
@@ -318,7 +318,7 @@ static void printList( const TQStringList& list )
}

static void processMetaDataOptions( const TQPtrList<FileProps> propList,
KCmdLineArgs *args )
TDECmdLineArgs *args )
{
// kfile --mimetype --supportedMimetypes --listsupported --listavailable --listpreferred --listwritable --getValue "key" --setValue "key=value" --allValues --preferredValues --dialog --quiet file [file...]
// "key" may be a list of keys, separated by commas
@@ -416,11 +416,11 @@ int main( int argc, char **argv )
about.addAuthor( "Carsten Pfeiffer", 0, "pfeiffer@kde.org",
"http://devel-home.kde.org/~pfeiffer/" );

KCmdLineArgs::init( argc, argv, &about );
TDECmdLineArgs::init( argc, argv, &about );

KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::addCmdLineOptions( options );

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
bool useGUI = args->isSet( "dialog" );

KApplication app( useGUI, useGUI );
@@ -435,7 +435,7 @@ int main( int argc, char **argv )

int files = args->count();
if ( files == 0 )
KCmdLineArgs::usage( i18n("No files specified") ); // exit()s
TDECmdLineArgs::usage( i18n("No files specified") ); // exit()s

if ( args->isSet( "dialog" ) )
{


+ 3
- 3
kio/misc/kmailservice.cpp View File

@@ -29,12 +29,12 @@ static const KCmdLineOptions options[] =
int main( int argc, char **argv )
{
KLocale::setMainCatalogue("tdelibs");
KCmdLineArgs::init( argc, argv, "kmailservice", I18N_NOOP("KMailService"), I18N_NOOP("Mail service"), "unknown" );
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init( argc, argv, "kmailservice", I18N_NOOP("KMailService"), I18N_NOOP("Mail service"), "unknown" );
TDECmdLineArgs::addCmdLineOptions( options );

KApplication a( false, false );

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

if ( args->count() != 1 )
return 1;


+ 3
- 3
kio/misc/ksendbugmail/main.cpp View File

@@ -64,9 +64,9 @@ int main(int argc, char **argv) {
KAboutData::License_GPL, "(c) 2000 Stephan Kulow");
d.addAuthor("Stephan Kulow", I18N_NOOP("Author"), "coolo@kde.org");

KCmdLineArgs::init(argc, argv, &d);
KCmdLineArgs::addCmdLineOptions(options);
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs::init(argc, argv, &d);
TDECmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

KApplication a(false, false);



+ 3
- 3
kio/misc/ktelnetservice.cpp View File

@@ -38,13 +38,13 @@ static const KCmdLineOptions options[] =
int main(int argc, char **argv)
{
KLocale::setMainCatalogue("tdelibs");
KCmdLineArgs::init(argc, argv, "ktelnetservice", I18N_NOOP("telnet service"),
TDECmdLineArgs::init(argc, argv, "ktelnetservice", I18N_NOOP("telnet service"),
I18N_NOOP("telnet protocol handler"), "unknown");
KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::addCmdLineOptions(options);

KApplication app;

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if (args->count() != 1)
return 1;


+ 2
- 2
kio/misc/uiserver.cpp View File

@@ -1387,8 +1387,8 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
aboutdata.addAuthor("David Faure",I18N_NOOP("Developer"),"faure@kde.org");
aboutdata.addAuthor("Matej Koss",I18N_NOOP("Developer"),"koss@miesto.sk");

KCmdLineArgs::init( argc, argv, &aboutdata );
// KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init( argc, argv, &aboutdata );
// TDECmdLineArgs::addCmdLineOptions( options );
KUniqueApplication::addCmdLineOptions();

if (!KUniqueApplication::start())


+ 1
- 1
kio/tests/jobtest.cpp View File

@@ -65,7 +65,7 @@ static bool check(const TQString& txt, TQString a, TQString b)
int main(int argc, char *argv[])
{
KApplication::disableAutoDcopRegistration();
KCmdLineArgs::init(argc,argv,"jobtest", 0, 0, 0, 0);
TDECmdLineArgs::init(argc,argv,"jobtest", 0, 0, 0, 0);
KApplication app;

JobTest test;


+ 1
- 1
kio/tests/kacltest.cpp View File

@@ -68,7 +68,7 @@ static bool check(const TQString& txt, T a, T b)
int main(int argc, char *argv[])
{
KApplication::disableAutoDcopRegistration();
KCmdLineArgs::init(argc,argv,"kacltest", 0, 0, 0, 0);
TDECmdLineArgs::init(argc,argv,"kacltest", 0, 0, 0, 0);
KApplication app;

KACLTest test;


+ 3
- 3
kio/tests/kdirwatchtest.cpp View File

@@ -25,13 +25,13 @@ static const KCmdLineOptions options[] =

int main (int argc, char **argv)
{
KCmdLineArgs::init(argc, argv, "KDirWatchTest",
TDECmdLineArgs::init(argc, argv, "KDirWatchTest",
"Test for KDirWatch", "1.0");
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::addCmdLineOptions( options );
KApplication::addCmdLineOptions();

KApplication a;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

myTest testObject;



+ 3
- 3
kio/tests/kionetrctest.cpp View File

@@ -44,9 +44,9 @@ int main(int argc, char **argv)
KCmdLineLastOption
};

KCmdLineArgs::init( argc, argv, "kionetrctest", description, version );
KCmdLineArgs::addCmdLineOptions( options );
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs::init( argc, argv, "kionetrctest", description, version );
TDECmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
int count = args->count();
KApplication app;



+ 1
- 1
kio/tests/kiopassdlgtest.cpp View File

@@ -9,7 +9,7 @@
int main ( int argc, char** argv )
{
KAboutData aboutData("kiopassdlgtest", "KIO Password Dialog Test", "1.0");
KCmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::init(argc, argv, &aboutData);
KApplication app;

TQString usr, pass, comment, label;


+ 5
- 5
kio/tests/kioslavetest.cpp View File

@@ -494,11 +494,11 @@ static KCmdLineOptions options[] =
};

int main(int argc, char **argv) {
KCmdLineArgs::init( argc, argv, "kioslavetest", description, version );
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init( argc, argv, "kioslavetest", description, version );
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

TQString src = args->getOption("src");
TQString dest = args->getOption("dest");
@@ -529,7 +529,7 @@ int main(int argc, char **argv) {
op = KioslaveTest::Shred;
} else if ( tmps == "mkdir") {
op = KioslaveTest::Mkdir;
} else KCmdLineArgs::usage("unknown operation");
} else TDECmdLineArgs::usage("unknown operation");

tmps = args->getOption("progress");
if ( tmps == "none") {
@@ -538,7 +538,7 @@ int main(int argc, char **argv) {
pr = KioslaveTest::ProgressDefault;
} else if ( tmps == "status") {
pr = KioslaveTest::ProgressStatus;
} else KCmdLineArgs::usage("unknown progress mode");
} else TDECmdLineArgs::usage("unknown progress mode");

args->clear(); // Free up memory



+ 3
- 3
kio/tests/kmimefromext.cpp View File

@@ -31,13 +31,13 @@ static KCmdLineOptions options[] =

int main(int argc, char *argv[])
{
KCmdLineArgs::init( argc, argv, "kmimefromext", "A mimetype testing tool, gives the mimetype for a given filename", "0.0" );
TDECmdLineArgs::init( argc, argv, "kmimefromext", "A mimetype testing tool, gives the mimetype for a given filename", "0.0" );

KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::addCmdLineOptions( options );

KApplication app;

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
TQString fileName = args->arg( 0 );

// The "true" here means only the filename will be looked at.


+ 4
- 4
kio/tests/kpropsdlgtest.cpp View File

@@ -14,14 +14,14 @@ static KCmdLineOptions options[] =
int main ( int argc, char** argv )
{
KAboutData aboutData("kpropertiesdialogtest", "KIO Properties Dialog Test", "1.0");
KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions( options );

KApplication app;

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if ( args->count() < 1 )
KCmdLineArgs::usage();
TDECmdLineArgs::usage();
KURL u = args->url( 0 );

// This is the test for the KPropertiesDialog constructor that is now


+ 1
- 1
kio/tests/kprotocolinfotest.cpp View File

@@ -29,7 +29,7 @@ int main(int argc, char **argv) {
KAboutData aboutData("kprotocolinfotest", "KProtocolinfo Test",
"1.0");

KCmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::init(argc, argv, &aboutData);
KApplication app;

KURL url;


+ 4
- 4
kio/tests/ktradertest.cpp View File

@@ -33,16 +33,16 @@ static KCmdLineOptions options[] =

int main( int argc, char **argv )
{
KCmdLineArgs::init( argc, argv, "ktradertest", "KTradertest", "A KTrader testing tool", "0.0" );
TDECmdLineArgs::init( argc, argv, "ktradertest", "KTradertest", "A KTrader testing tool", "0.0" );

KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::addCmdLineOptions( options );

KApplication app( false, false ); // no GUI

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

if ( args->count() < 1 )
KCmdLineArgs::usage();
TDECmdLineArgs::usage();

TQString query = TQString::fromLocal8Bit( args->arg( 0 ) );



+ 3
- 3
kio/tests/kurifiltertest.cpp View File

@@ -159,14 +159,14 @@ int main(int argc, char **argv)
setenv( "TDE_FORK_SLAVES", "yes", true ); // simpler, for the final cleanup

KAboutData aboutData(appName, programName, version, description);
KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions( options );

KApplication app;
app.disableAutoDcopRegistration();

// Allow testing of the search engine using both delimiters...
char delimiter = KCmdLineArgs::parsedArgs()->isSet("s") ? ' ' : ':';
char delimiter = TDECmdLineArgs::parsedArgs()->isSet("s") ? ' ' : ':';

// Many tests check the "default search engine" feature.
// There is no default search engine by default (since it was annoying when making typos),


+ 1
- 1
kio/tests/kurlcompletiontest.cpp View File

@@ -165,7 +165,7 @@ void KURLCompletionTest::testLocalURL()
int main( int argc, char **argv )
{
KApplication::disableAutoDcopRegistration();
KCmdLineArgs::init(argc,argv,"kurlcompletiontest", 0, 0, 0, 0);
TDECmdLineArgs::init(argc,argv,"kurlcompletiontest", 0, 0, 0, 0);
KApplication app;

{


+ 3
- 3
kio/tests/metatest.cpp View File

@@ -181,17 +181,17 @@ void removeGroup(KFileMetaInfo& info, TQString group)
int main( int argc, char **argv )
{
// Initialize command line args
KCmdLineArgs::init(argc, argv, "kfilemetatest", "testing kfilmetainfo", "X");
TDECmdLineArgs::init(argc, argv, "kfilemetatest", "testing kfilmetainfo", "X");

// Tell which options are supported
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::addCmdLineOptions( options );

// Add options from other components
KApplication::addCmdLineOptions();
KApplication app;

KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();

TQCString ov;
ov = args->getOption("mimetypeinfo");


+ 3
- 3
kio/tests/speed.cpp View File

@@ -65,13 +65,13 @@ static KCmdLineOptions options[] =

int main(int argc, char **argv) {

KCmdLineArgs::init( argc, argv, "speedapp", "A KIO::listRecursive testing tool", "0.0" );
TDECmdLineArgs::init( argc, argv, "speedapp", "A KIO::listRecursive testing tool", "0.0" );

KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::addCmdLineOptions( options );

KApplication app;

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

KURL url;
if ( args->count() == 1 )


+ 3
- 3
kioslave/http/http_cache_cleaner.cpp View File

@@ -190,13 +190,13 @@ void scanDirectory(FileInfoList &fileEntries, const TQString &name, const TQStri
extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
{
KLocale::setMainCatalogue("tdelibs");
KCmdLineArgs::init( argc, argv, appName,
TDECmdLineArgs::init( argc, argv, appName,
I18N_NOOP("TDE HTTP cache maintenance tool"),
description, version, true);

KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::addCmdLineOptions( options );

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

bool deleteAll = args->isSet("clear-all");



+ 3
- 3
kioslave/http/kcookiejar/main.cpp View File

@@ -43,16 +43,16 @@ static const KCmdLineOptions options[] =
extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
{
KLocale::setMainCatalogue("tdelibs");
KCmdLineArgs::init(argc, argv, "kcookiejar", I18N_NOOP("HTTP cookie daemon"),
TDECmdLineArgs::init(argc, argv, "kcookiejar", I18N_NOOP("HTTP cookie daemon"),
description, version);

KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::addCmdLineOptions( options );

KInstance a("kcookiejar");
kapp->dcopClient()->attach();

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
TQCString replyType;
TQByteArray replyData;
if (args->isSet("remove-all"))


+ 4
- 4
kioslave/http/kcookiejar/tests/kcookiejartest.cpp View File

@@ -250,15 +250,15 @@ int main(int argc, char *argv[])
nextYear = new TQCString(TQString(" expires=Fri, 04-May-%1 01:00:00 GMT").arg(TQDate::currentDate().year()+1).utf8());

KAboutData about("kcookietest", "kcookietest", "1.0", description, KAboutData::License_GPL, "(C) 2004 Waldo Bastian");
KCmdLineArgs::init( argc, argv, &about);
TDECmdLineArgs::init( argc, argv, &about);

KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::addCmdLineOptions( options );

KInstance a("kcookietest");
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if (args->count() != 1)
KCmdLineArgs::usage();
TDECmdLineArgs::usage();

jar = new KCookieJar;



+ 1
- 1
knewstuff/ghns.cpp View File

@@ -79,7 +79,7 @@ void GhnsWidget::downloadWallpapers()
int main(int argc,char **argv)
{
KAboutData aboutData("ghns","Get Hot New Stuff","0.1");
KCmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::init(argc,argv,&aboutData);

KApplication app;



+ 4
- 4
knewstuff/khotnewstuff.cpp View File

@@ -36,11 +36,11 @@ static const KCmdLineOptions op[] =
int main(int argc, char **argv)
{
KAboutData about("khotnewstuff", "KHotNewStuff", "0.2");
KCmdLineArgs *args;
TDECmdLineArgs *args;

KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions(op);
args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions(op);
args = TDECmdLineArgs::parsedArgs();

KApplication i;



+ 1
- 1
knewstuff/testnewstuff.cpp View File

@@ -108,7 +108,7 @@ void MyWidget::upload()
int main(int argc,char **argv)
{
KAboutData aboutData("knewstufftest","KNewStuff Test","0.1");
KCmdLineArgs::init(argc,argv,&aboutData);
TDECmdLineArgs::init(argc,argv,&aboutData);

KApplication app;



+ 3
- 3
kparts/tests/ghostview.cpp View File

@@ -101,10 +101,10 @@ static const char description[] = "This is a test shell for the kghostview part.

int main( int argc, char **argv )
{
KCmdLineArgs::init(argc, argv, "ghostviewtest", description, version);
KCmdLineArgs::addCmdLineOptions( options ); // Add my own options.
TDECmdLineArgs::init(argc, argv, "ghostviewtest", description, version);
TDECmdLineArgs::addCmdLineOptions( options ); // Add my own options.
KApplication app;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
Shell *shell = new Shell;
if ( args->count() == 1 )
{


+ 1
- 1
kresources/testresources.cpp View File

@@ -30,7 +30,7 @@ class TestSubResource : public TestResource
int main( int argc, char **argv )
{
KAboutData aboutData( "testresources", "Kresource Test", "0" );
KCmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::init( argc, argv, &aboutData );

KApplication app;



+ 1
- 1
kstyles/utils/installtheme/main.cpp View File

@@ -37,7 +37,7 @@ static const char ver[] = "0.9.1";

int main(int argc, char **argv)
{
KCmdLineArgs::init(argc, argv, "kinstalltheme", I18N_NOOP("KInstalltheme"), desc, ver);
TDECmdLineArgs::init(argc, argv, "kinstalltheme", I18N_NOOP("KInstalltheme"), desc, ver);
KApplication qapp(false, false); //We don't allow styles.. Kind of ironic, isn't it?

KGlobal::dirs()->addResourceType("themercs", KGlobal::dirs()->kde_default("data")+TQString("kstyle/themes"));


+ 3
- 3
kunittest/modrunner.cpp View File

@@ -54,9 +54,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"));


+ 2
- 2
kunittest/tester.h View File

@@ -150,8 +150,8 @@ SampleTest - 1 test passed, 1 test failed
* KAboutData about("SampleTests", I18N_NOOP("SampleTests"), version, description,
* KAboutData::License_BSD, "(C) 2005 You!", 0, 0, "mail@provider");
*
* KCmdLineArgs::init(argc, argv, &about);
* KCmdLineArgs::addCmdLineOptions( options );
* TDECmdLineArgs::init(argc, argv, &about);
* TDECmdLineArgs::addCmdLineOptions( options );
* KApplication app;
*
* KUnitTest::RunnerGUI runner(0);


+ 1
- 1
kutils/tests/kfindtest.cpp View File

@@ -123,7 +123,7 @@ void KFindTest::slotHighlight(int id, int index, int matchedLength)

int main(int argc, char **argv)
{
KCmdLineArgs::init(argc, argv, "kfindtest", "KFindTest", 0, 0, false);
TDECmdLineArgs::init(argc, argv, "kfindtest", "KFindTest", 0, 0, false);
KApplication app;

TQString text = "This file is part of the KDE project.\n"


+ 1
- 1
kutils/tests/kreplacetest.cpp View File

@@ -252,7 +252,7 @@ static void testReplacementHistory()

int main( int argc, char **argv )
{
KCmdLineArgs::init(argc, argv, "kreplacetest", 0, 0);
TDECmdLineArgs::init(argc, argv, "kreplacetest", 0, 0);
KApplication app;

testReplacementHistory(); // #130831


+ 1
- 1
kwallet/tests/kwalletasync.cpp View File

@@ -44,7 +44,7 @@ void WalletReceiver::walletOpened( bool got )
int main( int argc, char *argv[] )
{
KAboutData aboutData( "kwalletasync", "kwalletasync", "version" );
KCmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication app( "kwalletasync" );

// register with DCOP


+ 1
- 1
kwallet/tests/kwalletboth.cpp View File

@@ -66,7 +66,7 @@ void WalletReceiver::walletOpened( bool got )
int main( int argc, char *argv[] )
{
KAboutData aboutData( "kwalletboth", "kwalletboth", "version" );
KCmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication app( "kwalletboth" );

// register with DCOP


+ 1
- 1
kwallet/tests/kwalletsync.cpp View File

@@ -24,7 +24,7 @@ void openWallet()
int main( int argc, char *argv[] )
{
KAboutData aboutData( "kwalletsync", "kwalletsync", "version" );
KCmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication app( "kwalletsync" );

// register with DCOP


+ 3
- 3
libkscreensaver/main.cpp View File

@@ -94,9 +94,9 @@ typedef WId Window;
KDE_EXPORT int main(int argc, char *argv[])
{
KLocale::setMainCatalogue("libkscreensaver");
KCmdLineArgs::init(argc, argv, kss_applicationName, kss_description, kss_version);
TDECmdLineArgs::init(argc, argv, kss_applicationName, kss_description, kss_version);

KCmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs::addCmdLineOptions(options);

KApplication app;

@@ -108,7 +108,7 @@ KDE_EXPORT int main(int argc, char *argv[])
Window saveWin = 0;
KScreenSaver *target;

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

if (args->isSet("setup"))
{


+ 2
- 2
tdecore/kaboutdata.h View File

@@ -48,7 +48,7 @@ class KAboutDataPrivate;
* about.addAuthor("Joe Developer", I18N_NOOP("developer"), "joe@host.com", 0);
* about.addCredit("Joe User", I18N_NOOP("A lot of bug reports"),
* "joe.user@host.org", 0);
* KCmdLineArgs::init(argc, argv, &about);
* TDECmdLineArgs::init(argc, argv, &about);
* \endcode
*/
class TDECORE_EXPORT KAboutPerson
@@ -173,7 +173,7 @@ private:
*
* Currently, the values set here are shown by the "About" box
* (see KAboutDialog), used by the bug report dialog (see KBugReport),
* and by the help shown on command line (see KCmdLineArgs).
* and by the help shown on command line (see TDECmdLineArgs).
*
* @short Holds information needed by the "About" box and other
* classes.


+ 20
- 20
tdecore/kapplication.cpp View File

@@ -640,16 +640,16 @@ KApplication::KApplication( int& argc, char** argv, const TQCString& rAppName,
setName(rAppName);

installSigpipeHandler();
KCmdLineArgs::initIgnore(argc, argv, rAppName.data());
TDECmdLineArgs::initIgnore(argc, argv, rAppName.data());
parseCommandLine( );
init(GUIenabled);
d->m_KAppDCOPInterface = new KAppDCOPInterface(this);
}

KApplication::KApplication( bool allowStyles, bool GUIenabled ) :
// TQApplication( *KCmdLineArgs::tqt_argc(), *KCmdLineArgs::tqt_argv(), TRUE ), // Qt4 requires that there always be a GUI
TQApplication( *KCmdLineArgs::tqt_argc(), *KCmdLineArgs::tqt_argv(), GUIenabled ), // We need to be able to run command line apps
KInstance( KCmdLineArgs::about),
// TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), TRUE ), // Qt4 requires that there always be a GUI
TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), GUIenabled ), // We need to be able to run command line apps
KInstance( TDECmdLineArgs::about),
#ifdef Q_WS_X11
display(0L),
argb_visual(false),
@@ -672,9 +672,9 @@ KApplication::KApplication( bool allowStyles, bool GUIenabled ) :

#ifdef Q_WS_X11
KApplication::KApplication( Display *dpy, bool allowStyles ) :
TQApplication( dpy, *KCmdLineArgs::tqt_argc(), *KCmdLineArgs::tqt_argv(),
TQApplication( dpy, *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(),
getX11RGBAVisual(dpy), getX11RGBAColormap(dpy) ),
KInstance( KCmdLineArgs::about), display(0L), d (new KApplicationPrivate)
KInstance( TDECmdLineArgs::about), display(0L), d (new KApplicationPrivate)
{
aIconPixmap.pm.icon = 0L;
aIconPixmap.pm.miniIcon = 0L;
@@ -688,9 +688,9 @@ KApplication::KApplication( Display *dpy, bool allowStyles ) :
}

KApplication::KApplication( Display *dpy, bool disable_argb, Qt::HANDLE visual, Qt::HANDLE colormap, bool allowStyles ) :
TQApplication( dpy, *KCmdLineArgs::tqt_argc(), *KCmdLineArgs::tqt_argv(),
TQApplication( dpy, *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(),
disable_argb?visual:getX11RGBAVisual(dpy), disable_argb?colormap:getX11RGBAColormap(dpy) ),
KInstance( KCmdLineArgs::about), display(0L), d (new KApplicationPrivate)
KInstance( TDECmdLineArgs::about), display(0L), d (new KApplicationPrivate)
{
aIconPixmap.pm.icon = 0L;
aIconPixmap.pm.miniIcon = 0L;
@@ -706,9 +706,9 @@ KApplication::KApplication( Display *dpy, bool disable_argb, Qt::HANDLE visual,

KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap,
bool allowStyles ) :
TQApplication( dpy, *KCmdLineArgs::tqt_argc(), *KCmdLineArgs::tqt_argv(),
TQApplication( dpy, *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(),
visual?visual:getX11RGBAVisual(dpy), colormap?colormap:getX11RGBAColormap(dpy) ),
KInstance( KCmdLineArgs::about), display(0L), d (new KApplicationPrivate)
KInstance( TDECmdLineArgs::about), display(0L), d (new KApplicationPrivate)
{
if ((visual) && (colormap))
getX11RGBAInformation(dpy);
@@ -725,7 +725,7 @@ KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap

KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap,
bool allowStyles, KInstance * _instance ) :
TQApplication( dpy, *KCmdLineArgs::tqt_argc(), *KCmdLineArgs::tqt_argv(),
TQApplication( dpy, *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(),
visual?visual:getX11RGBAVisual(dpy), colormap?colormap:getX11RGBAColormap(dpy) ),
KInstance( _instance ), display(0L), d (new KApplicationPrivate)
{
@@ -744,7 +744,7 @@ KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap
#endif

KApplication::KApplication( bool allowStyles, bool GUIenabled, KInstance* _instance ) :
TQApplication( *KCmdLineArgs::tqt_argc(), *KCmdLineArgs::tqt_argv(),
TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(),
GUIenabled ),
KInstance( _instance ),
#ifdef Q_WS_X11
@@ -786,7 +786,7 @@ KApplication::KApplication(Display *display, int& argc, char** argv, const TQCSt
setName(rAppName);

installSigpipeHandler();
KCmdLineArgs::initIgnore(argc, argv, rAppName.data());
TDECmdLineArgs::initIgnore(argc, argv, rAppName.data());
parseCommandLine( );
init(GUIenabled);
d->m_KAppDCOPInterface = new KAppDCOPInterface(this);
@@ -977,7 +977,7 @@ void KApplication::init(bool GUIenabled)

#ifdef Q_WS_MACX
if (GUIenabled) {
TQPixmap pixmap = KGlobal::iconLoader()->loadIcon( KCmdLineArgs::appName(),
TQPixmap pixmap = KGlobal::iconLoader()->loadIcon( TDECmdLineArgs::appName(),
KIcon::NoGroup, KIcon::SizeLarge, KIcon::DefaultState, 0L, false );
if (!pixmap.isNull()) {
TQImage i = pixmap.convertToImage().convertDepth(32).smoothScale(40, 40);
@@ -1063,7 +1063,7 @@ DCOPClient *KApplication::dcopClient()
return s_DCOPClient;

s_DCOPClient = new DCOPClient();
KCmdLineArgs *args = KCmdLineArgs::parsedArgs("tde");
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs("tde");
if (args && args->isSet("dcopserver"))
{
s_DCOPClient->setServerAddress( args->getOption("dcopserver"));
@@ -1562,13 +1562,13 @@ static const KCmdLineOptions kde_options[] =
void
KApplication::addCmdLineOptions()
{
KCmdLineArgs::addCmdLineOptions(qt_options, "Qt", "qt");
KCmdLineArgs::addCmdLineOptions(kde_options, "TDE", "tde");
TDECmdLineArgs::addCmdLineOptions(qt_options, "Qt", "qt");
TDECmdLineArgs::addCmdLineOptions(kde_options, "TDE", "tde");
}

void KApplication::parseCommandLine( )
{
KCmdLineArgs *args = KCmdLineArgs::parsedArgs("tde");
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs("tde");

if ( !args ) return;

@@ -1823,7 +1823,7 @@ bool KApplication::detectCompositionManagerAvailable(bool force_available, bool
}
else {
// See if compositing has been enabled
KCmdLineArgs *qtargs = KCmdLineArgs::parsedArgs("qt");
TDECmdLineArgs *qtargs = TDECmdLineArgs::parsedArgs("qt");
char *displayname = 0;
if ( qtargs->isSet("display"))
displayname = qtargs->getOption( "display" ).data();
@@ -1896,7 +1896,7 @@ bool KApplication::detectCompositionManagerAvailable(bool force_available, bool
}

Display* KApplication::openX11RGBADisplay() {
KCmdLineArgs *qtargs = KCmdLineArgs::parsedArgs("qt");
TDECmdLineArgs *qtargs = TDECmdLineArgs::parsedArgs("qt");
char *display = 0;
if ( qtargs->isSet("display"))
display = qtargs->getOption( "display" ).data();


+ 5
- 5
tdecore/kapplication.h View File

@@ -111,7 +111,7 @@ public:

/**
* This constructor takes aboutData and command line
* arguments from KCmdLineArgs.
* arguments from TDECmdLineArgs.
*
* If ARGB (transparent) widgets are to be used in your application,
* please use
@@ -234,7 +234,7 @@ public:
#endif

/**
* @deprecated do not use it at all, it will make your application crash, use KCmdLineArgs
* @deprecated do not use it at all, it will make your application crash, use TDECmdLineArgs
*
* Constructor. Parses command-line arguments.
*
@@ -256,12 +256,12 @@ public:
* no styles either.
*/
// REMOVE FOR KDE 4.0 - using it only gives crashing applications because
// KCmdLineArgs::init isn't called
// TDECmdLineArgs::init isn't called
KApplication(int& argc, char** argv,
const TQCString& rAppName, bool allowStyles=true, bool GUIenabled=true) KDE_DEPRECATED;

/**
* Add Qt and KDE command line options to KCmdLineArgs.
* Add Qt and KDE command line options to TDECmdLineArgs.
*/
static void addCmdLineOptions();

@@ -1315,7 +1315,7 @@ private:

void init( bool GUIenabled );

void parseCommandLine( ); // Handle KDE arguments (Using KCmdLineArgs)
void parseCommandLine( ); // Handle KDE arguments (Using TDECmdLineArgs)

void read_app_startup_id();



+ 71
- 71
tdecore/kcmdlineargs.cpp View File

@@ -54,7 +54,7 @@
#endif

template class TQAsciiDict<TQCString>;
template class TQPtrList<KCmdLineArgs>;
template class TQPtrList<TDECmdLineArgs>;

class KCmdLineParsedOptions : public TQAsciiDict<TQCString>
{
@@ -104,27 +104,27 @@ public:
};


class KCmdLineArgsList: public TQPtrList<KCmdLineArgs>
class TDECmdLineArgsList: public TQPtrList<TDECmdLineArgs>
{
public:
KCmdLineArgsList() { }
TDECmdLineArgsList() { }
};

KCmdLineArgsList *KCmdLineArgs::argsList = 0;
int KCmdLineArgs::argc = 0;
char **KCmdLineArgs::argv = 0;
char *KCmdLineArgs::mCwd = 0;
TDECmdLineArgsList *TDECmdLineArgs::argsList = 0;
int TDECmdLineArgs::argc = 0;
char **TDECmdLineArgs::argv = 0;
char *TDECmdLineArgs::mCwd = 0;
static KStaticDeleter <char> mCwdd;
const KAboutData *KCmdLineArgs::about = 0;
bool KCmdLineArgs::parsed = false;
bool KCmdLineArgs::ignoreUnknown = false;
const KAboutData *TDECmdLineArgs::about = 0;
bool TDECmdLineArgs::parsed = false;
bool TDECmdLineArgs::ignoreUnknown = false;

//
// Static functions
//

void
KCmdLineArgs::init(int _argc, char **_argv, const char *_appname, const char* programName,
TDECmdLineArgs::init(int _argc, char **_argv, const char *_appname, const char* programName,
const char *_description, const char *_version, bool noKApp)
{
init(_argc, _argv,
@@ -133,7 +133,7 @@ KCmdLineArgs::init(int _argc, char **_argv, const char *_appname, const char* pr
}

void
KCmdLineArgs::init(int _argc, char **_argv, const char *_appname,
TDECmdLineArgs::init(int _argc, char **_argv, const char *_appname,
const char *_description, const char *_version, bool noKApp)
{
init(_argc, _argv,
@@ -142,7 +142,7 @@ KCmdLineArgs::init(int _argc, char **_argv, const char *_appname,
}

void
KCmdLineArgs::initIgnore(int _argc, char **_argv, const char *_appname )
TDECmdLineArgs::initIgnore(int _argc, char **_argv, const char *_appname )
{
init(_argc, _argv,
new KAboutData(_appname, _appname, "unknown", "TDE Application", false));
@@ -150,7 +150,7 @@ KCmdLineArgs::initIgnore(int _argc, char **_argv, const char *_appname )
}

void
KCmdLineArgs::init(const KAboutData* ab)
TDECmdLineArgs::init(const KAboutData* ab)
{
char **_argv = (char **) malloc(sizeof(char *));
_argv[0] = (char *) ab->appName();
@@ -159,14 +159,14 @@ KCmdLineArgs::init(const KAboutData* ab)


void
KCmdLineArgs::init(int _argc, char **_argv, const KAboutData *_about, bool noKApp)
TDECmdLineArgs::init(int _argc, char **_argv, const KAboutData *_about, bool noKApp)
{
argc = _argc;
argv = _argv;

if (!argv)
{
fprintf(stderr, "\n\nFAILURE (KCmdLineArgs):\n");
fprintf(stderr, "\n\nFAILURE (TDECmdLineArgs):\n");
fprintf(stderr, "Passing null-pointer to 'argv' is not allowed.\n\n");

assert( 0 );
@@ -191,30 +191,30 @@ KCmdLineArgs::init(int _argc, char **_argv, const KAboutData *_about, bool noKAp
KApplication::addCmdLineOptions();
}

TQString KCmdLineArgs::cwd()
TQString TDECmdLineArgs::cwd()
{
return TQFile::decodeName(TQCString(mCwd));
}

const char * KCmdLineArgs::appName()
const char * TDECmdLineArgs::appName()
{
if (!argc) return 0;
return argv[0];
}

void
KCmdLineArgs::addCmdLineOptions( const KCmdLineOptions *options, const char *name,
TDECmdLineArgs::addCmdLineOptions( const KCmdLineOptions *options, const char *name,
const char *id, const char *afterId)
{
if (!argsList)
argsList = new KCmdLineArgsList();
argsList = new TDECmdLineArgsList();

int pos = argsList->count();

if (pos && id && argsList->last() && !argsList->last()->name)
pos--;

KCmdLineArgs *args;
TDECmdLineArgs *args;
int i = 0;
for(args = argsList->first(); args; args = argsList->next(), i++)
{
@@ -230,12 +230,12 @@ KCmdLineArgs::addCmdLineOptions( const KCmdLineOptions *options, const char *nam

assert( parsed == false ); // You must add _ALL_ cmd line options
// before accessing the arguments!
args = new KCmdLineArgs(options, name, id);
args = new TDECmdLineArgs(options, name, id);
argsList->insert(pos, args);