summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-19 18:46:32 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-19 18:46:32 -0600
commit9ca7b92557f7d468f8d57838261f4bdddf6d70e0 (patch)
tree32f771932010128486ca695622f3255e17ee72f6
parent33294802d33c754914aa4c16de5efe26408e05ef (diff)
downloadpiklab-9ca7b92557f7d468f8d57838261f4bdddf6d70e0.tar.gz
piklab-9ca7b92557f7d468f8d57838261f4bdddf6d70e0.zip
Rename KCmdLineArgs to TDECmdLineArgs to avoid conflicts with KDE4
-rw-r--r--src/common/cli/cli_main.cpp2
-rw-r--r--src/common/cli/cli_main.h2
-rw-r--r--src/common/global/about.cpp4
-rw-r--r--src/common/nokde/nokde_kaboutdata.h4
-rw-r--r--src/common/nokde/nokde_kcmdlineargs.cpp142
-rw-r--r--src/common/nokde/nokde_kcmdlineargs.h46
-rw-r--r--src/libgui/toplevel.cpp2
-rw-r--r--src/piklab-test/base/main_test.cpp2
-rw-r--r--src/piklab-test/base/main_test.h2
9 files changed, 103 insertions, 103 deletions
diff --git a/src/common/cli/cli_main.cpp b/src/common/cli/cli_main.cpp
index 8b8e2ab..3adb61d 100644
--- a/src/common/cli/cli_main.cpp
+++ b/src/common/cli/cli_main.cpp
@@ -122,7 +122,7 @@ CLI::MainBase::MainBase(Properties properties)
void CLI::MainBase::init()
{
- _args = KCmdLineArgs::parsedArgs();
+ _args = TDECmdLineArgs::parsedArgs();
if ( _properties & HasInteractiveMode ) _isInteractive = _args->isSet("cli");
if ( _properties & HasForce ) _force = _args->isSet("force");
FOR_EACH(Log::DebugLevel, level) if ( _args->isSet(level.key()) ) _view->setDebugLevel(level);
diff --git a/src/common/cli/cli_main.h b/src/common/cli/cli_main.h
index 42941ad..19852c3 100644
--- a/src/common/cli/cli_main.h
+++ b/src/common/cli/cli_main.h
@@ -71,7 +71,7 @@ public:
protected:
Properties _properties;
- KCmdLineArgs *_args;
+ TDECmdLineArgs *_args;
private:
virtual ExitCode prepareRun(bool &interactive) = 0;
diff --git a/src/common/global/about.cpp b/src/common/global/about.cpp
index ffda7db..3b80abe 100644
--- a/src/common/global/about.cpp
+++ b/src/common/global/about.cpp
@@ -56,8 +56,8 @@ void Piklab::init(KAboutData *about, int argc, char **argv, bool gui, const KCmd
printf("%s: version %s (rev. %s)\n", about->appName(), VERSION, SVN_REVISION);
if ( !gui ) KApplication::disableAutoDcopRegistration();
#endif
- KCmdLineArgs::init(argc, argv, about);
- KCmdLineArgs::addCmdLineOptions(options);
+ TDECmdLineArgs::init(argc, argv, about);
+ TDECmdLineArgs::addCmdLineOptions(options);
#if defined(NO_KDE)
# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000
(void)new TQApplication(argc, argv, TQApplication::Tty);
diff --git a/src/common/nokde/nokde_kaboutdata.h b/src/common/nokde/nokde_kaboutdata.h
index 94f6f2b..aec6575 100644
--- a/src/common/nokde/nokde_kaboutdata.h
+++ b/src/common/nokde/nokde_kaboutdata.h
@@ -57,7 +57,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);
*/
class TDECORE_EXPORT KAboutPerson
{
@@ -181,7 +181,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.
diff --git a/src/common/nokde/nokde_kcmdlineargs.cpp b/src/common/nokde/nokde_kcmdlineargs.cpp
index 72c67b0..daaedd6 100644
--- a/src/common/nokde/nokde_kcmdlineargs.cpp
+++ b/src/common/nokde/nokde_kcmdlineargs.cpp
@@ -71,7 +71,7 @@
#endif
template class TQAsciiDict<TQCString>;
-template class TQPtrList<KCmdLineArgs>;
+template class TQPtrList<TDECmdLineArgs>;
class KCmdLineParsedOptions : public TQAsciiDict<TQCString>
{
@@ -121,27 +121,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,
@@ -150,7 +150,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,
@@ -159,7 +159,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));
@@ -167,7 +167,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();
@@ -176,14 +176,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 );
@@ -208,30 +208,30 @@ KCmdLineArgs::init(int _argc, char **_argv, const KAboutData *_about, bool /*noK
// 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++)
{
@@ -247,12 +247,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);
}
void
-KCmdLineArgs::saveAppArgs( TQDataStream &ds)
+TDECmdLineArgs::saveAppArgs( TQDataStream &ds)
{
if (!parsed)
parseAllArgs();
@@ -269,7 +269,7 @@ KCmdLineArgs::saveAppArgs( TQDataStream &ds)
if (!count) return;
- KCmdLineArgs *args;
+ TDECmdLineArgs *args;
for(args = argsList->first(); args; args = argsList->next())
{
ds << TQCString(args->id);
@@ -278,13 +278,13 @@ KCmdLineArgs::saveAppArgs( TQDataStream &ds)
}
void
-KCmdLineArgs::loadAppArgs( TQDataStream &ds)
+TDECmdLineArgs::loadAppArgs( TQDataStream &ds)
{
// Remove TQt and KDE options.
removeArgs("qt");
removeArgs("kde");
- KCmdLineArgs *args;
+ TDECmdLineArgs *args;
if ( argsList ) {
for(args = argsList->first(); args; args = argsList->next())
{
@@ -322,9 +322,9 @@ KCmdLineArgs::loadAppArgs( TQDataStream &ds)
parsed = true;
}
-KCmdLineArgs *KCmdLineArgs::parsedArgs(const char *id)
+TDECmdLineArgs *TDECmdLineArgs::parsedArgs(const char *id)
{
- KCmdLineArgs *args = argsList ? argsList->first() : 0;
+ TDECmdLineArgs *args = argsList ? argsList->first() : 0;
while(args)
{
if ((id && ::qstrcmp(args->id, id) == 0) || (!id && !args->id))
@@ -339,9 +339,9 @@ KCmdLineArgs *KCmdLineArgs::parsedArgs(const char *id)
return args;
}
-void KCmdLineArgs::removeArgs(const char *id)
+void TDECmdLineArgs::removeArgs(const char *id)
{
- KCmdLineArgs *args = argsList ? argsList->first() : 0;
+ TDECmdLineArgs *args = argsList ? argsList->first() : 0;
while(args)
{
if (args->id && id && ::qstrcmp(args->id, id) == 0)
@@ -443,9 +443,9 @@ findOption(const KCmdLineOptions *options, TQCString &opt,
void
-KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled, bool &moreOptions)
+TDECmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled, bool &moreOptions)
{
- KCmdLineArgs *args = argsList->first();
+ TDECmdLineArgs *args = argsList->first();
const char *opt_name;
const char *def;
TQCString argument;
@@ -555,7 +555,7 @@ KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled,
}
void
-KCmdLineArgs::printQ(const TQString &msg)
+TDECmdLineArgs::printQ(const TQString &msg)
{
# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000
TQCString localMsg = msg.local8Bit();
@@ -566,12 +566,12 @@ KCmdLineArgs::printQ(const TQString &msg)
}
void
-KCmdLineArgs::parseAllArgs()
+TDECmdLineArgs::parseAllArgs()
{
bool allowArgs = false;
bool inOptions = true;
bool everythingAfterArgIsArgs = false;
- KCmdLineArgs *appOptions = argsList->last();
+ TDECmdLineArgs *appOptions = argsList->last();
if (!appOptions->id)
{
const KCmdLineOptions *option = appOptions->options;
@@ -690,7 +690,7 @@ KCmdLineArgs::parseAllArgs()
* Return argc
*/
int *
-KCmdLineArgs::tqt_argc()
+TDECmdLineArgs::tqt_argc()
{
// if (!argsList)
// KApplication::addCmdLineOptions(); // Lazy bastards!
@@ -699,12 +699,12 @@ KCmdLineArgs::tqt_argc()
if( tqt_argc != -1 )
return &tqt_argc;
- KCmdLineArgs *args = parsedArgs("qt");
+ TDECmdLineArgs *args = parsedArgs("qt");
assert(args); // No qt options have been added!
if (!argv)
{
- fprintf(stderr, "\n\nFAILURE (KCmdLineArgs):\n");
- fprintf(stderr, "Application has not called KCmdLineArgs::init(...).\n\n");
+ fprintf(stderr, "\n\nFAILURE (TDECmdLineArgs):\n");
+ fprintf(stderr, "Application has not called TDECmdLineArgs::init(...).\n\n");
assert( 0 );
exit(255);
@@ -721,7 +721,7 @@ KCmdLineArgs::tqt_argc()
* Return argv
*/
char ***
-KCmdLineArgs::tqt_argv()
+TDECmdLineArgs::tqt_argv()
{
// if (!argsList)
// KApplication::addCmdLineOptions(); // Lazy bastards!
@@ -730,12 +730,12 @@ KCmdLineArgs::tqt_argv()
if( tqt_argv != NULL )
return &tqt_argv;
- KCmdLineArgs *args = parsedArgs("qt");
+ TDECmdLineArgs *args = parsedArgs("qt");
assert(args); // No qt options have been added!
if (!argv)
{
- fprintf(stderr, "\n\nFAILURE (KCmdLineArgs):\n");
- fprintf(stderr, "Application has not called KCmdLineArgs::init(...).\n\n");
+ fprintf(stderr, "\n\nFAILURE (TDECmdLineArgs):\n");
+ fprintf(stderr, "Application has not called TDECmdLineArgs::init(...).\n\n");
assert( 0 );
exit(255);
@@ -754,7 +754,7 @@ KCmdLineArgs::tqt_argv()
}
void
-KCmdLineArgs::enable_i18n()
+TDECmdLineArgs::enable_i18n()
{
// called twice or too late
/* if (KGlobal::_locale)
@@ -768,7 +768,7 @@ KCmdLineArgs::enable_i18n()
}
void
-KCmdLineArgs::usage(const TQString &error)
+TDECmdLineArgs::usage(const TQString &error)
{
// assert(KGlobal::_locale);
# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000
@@ -791,7 +791,7 @@ KCmdLineArgs::usage(const TQString &error)
}
void
-KCmdLineArgs::usage(const char *id)
+TDECmdLineArgs::usage(const char *id)
{
enable_i18n();
assert(argsList != 0); // It's an error to call usage(...) without
@@ -803,7 +803,7 @@ KCmdLineArgs::usage(const char *id)
TQString tmp;
TQString usage;
- KCmdLineArgs *args = argsList->last();
+ TDECmdLineArgs *args = argsList->last();
if (!(args->id) && (args->options) &&
(args->options->name) && (args->options->name[0] != '+'))
@@ -820,7 +820,7 @@ KCmdLineArgs::usage(const char *id)
args = argsList->prev();
}
- KCmdLineArgs *appOptions = argsList->last();
+ TDECmdLineArgs *appOptions = argsList->last();
if (!appOptions->id)
{
const KCmdLineOptions *option = appOptions->options;
@@ -1012,7 +1012,7 @@ KCmdLineArgs::usage(const char *id)
*
* The given arguments are assumed to be constants.
*/
-KCmdLineArgs::KCmdLineArgs( const KCmdLineOptions *_options,
+TDECmdLineArgs::TDECmdLineArgs( const KCmdLineOptions *_options,
const char *_name, const char *_id)
: options(_options), name(_name), id(_id)
{
@@ -1024,7 +1024,7 @@ KCmdLineArgs::KCmdLineArgs( const KCmdLineOptions *_options,
/**
* Destructor.
*/
-KCmdLineArgs::~KCmdLineArgs()
+TDECmdLineArgs::~TDECmdLineArgs()
{
delete parsedOptionList;
delete parsedArgList;
@@ -1033,7 +1033,7 @@ KCmdLineArgs::~KCmdLineArgs()
}
void
-KCmdLineArgs::clear()
+TDECmdLineArgs::clear()
{
delete parsedArgList;
parsedArgList = 0;
@@ -1042,7 +1042,7 @@ KCmdLineArgs::clear()
}
void
-KCmdLineArgs::reset()
+TDECmdLineArgs::reset()
{
if ( argsList ) {
argsList->setAutoDelete( true );
@@ -1054,7 +1054,7 @@ KCmdLineArgs::reset()
}
void
-KCmdLineArgs::save( TQDataStream &ds) const
+TDECmdLineArgs::save( TQDataStream &ds) const
{
uint count = 0;
if (parsedOptionList)
@@ -1069,7 +1069,7 @@ KCmdLineArgs::save( TQDataStream &ds) const
}
void
-KCmdLineArgs::load( TQDataStream &ds)
+TDECmdLineArgs::load( TQDataStream &ds)
{
if (!parsedOptionList) parsedOptionList = new KCmdLineParsedOptions;
if (!parsedArgList) parsedArgList = new KCmdLineParsedArgs;
@@ -1090,7 +1090,7 @@ KCmdLineArgs::load( TQDataStream &ds)
}
void
-KCmdLineArgs::setOption(const TQCString &opt, bool enabled)
+TDECmdLineArgs::setOption(const TQCString &opt, bool enabled)
{
if (isTQt)
{
@@ -1113,7 +1113,7 @@ KCmdLineArgs::setOption(const TQCString &opt, bool enabled)
}
void
-KCmdLineArgs::setOption(const TQCString &opt, const char *value)
+TDECmdLineArgs::setOption(const TQCString &opt, const char *value)
{
if (isTQt)
{
@@ -1140,7 +1140,7 @@ KCmdLineArgs::setOption(const TQCString &opt, const char *value)
}
TQCString
-KCmdLineArgs::getOption(const char *_opt) const
+TDECmdLineArgs::getOption(const char *_opt) const
{
TQCString *value = 0;
if (parsedOptionList)
@@ -1160,7 +1160,7 @@ KCmdLineArgs::getOption(const char *_opt) const
if (result != 3)
{
- fprintf(stderr, "\n\nFAILURE (KCmdLineArgs):\n");
+ fprintf(stderr, "\n\nFAILURE (TDECmdLineArgs):\n");
fprintf(stderr, "Application requests for getOption(\"%s\") but the \"%s\" option\n",
_opt, _opt);
fprintf(stderr, "has never been specified via addCmdLineOptions( ... )\n\n");
@@ -1172,7 +1172,7 @@ KCmdLineArgs::getOption(const char *_opt) const
}
QCStringList
-KCmdLineArgs::getOptionList(const char *_opt) const
+TDECmdLineArgs::getOptionList(const char *_opt) const
{
QCStringList result;
if (!parsedOptionList)
@@ -1202,7 +1202,7 @@ KCmdLineArgs::getOptionList(const char *_opt) const
}
bool
-KCmdLineArgs::isSet(const char *_opt) const
+TDECmdLineArgs::isSet(const char *_opt) const
{
// Look up the default.
const char *opt_name;
@@ -1213,7 +1213,7 @@ KCmdLineArgs::isSet(const char *_opt) const
if (result == 0)
{
- fprintf(stderr, "\n\nFAILURE (KCmdLineArgs):\n");
+ fprintf(stderr, "\n\nFAILURE (TDECmdLineArgs):\n");
fprintf(stderr, "Application requests for isSet(\"%s\") but the \"%s\" option\n",
_opt, _opt);
fprintf(stderr, "has never been specified via addCmdLineOptions( ... )\n\n");
@@ -1245,7 +1245,7 @@ KCmdLineArgs::isSet(const char *_opt) const
}
int
-KCmdLineArgs::count() const
+TDECmdLineArgs::count() const
{
if (!parsedArgList)
return 0;
@@ -1253,11 +1253,11 @@ KCmdLineArgs::count() const
}
const char *
-KCmdLineArgs::arg(int n) const
+TDECmdLineArgs::arg(int n) const
{
if (!parsedArgList || (n >= (int) parsedArgList->count()))
{
- fprintf(stderr, "\n\nFAILURE (KCmdLineArgs): Argument out of bounds\n");
+ fprintf(stderr, "\n\nFAILURE (TDECmdLineArgs): Argument out of bounds\n");
fprintf(stderr, "Application requests for arg(%d) without checking count() first.\n",
n);
@@ -1269,12 +1269,12 @@ KCmdLineArgs::arg(int n) const
}
KURL
-KCmdLineArgs::url(int n) const
+TDECmdLineArgs::url(int n) const
{
return makeURL( arg(n) );
}
-KURL KCmdLineArgs::makeURL(const char *_urlArg)
+KURL TDECmdLineArgs::makeURL(const char *_urlArg)
{
TQString urlArg = TQFile::decodeName(_urlArg);
if (!TQDir::isRelativePath(urlArg))
@@ -1300,7 +1300,7 @@ KURL KCmdLineArgs::makeURL(const char *_urlArg)
}
void
-KCmdLineArgs::addArgument(const char *argument)
+TDECmdLineArgs::addArgument(const char *argument)
{
if (!parsedArgList)
parsedArgList = new KCmdLineParsedArgs;
@@ -1315,14 +1315,14 @@ static const KCmdLineOptions kde_tempfile_option[] =
};
void
-KCmdLineArgs::addTempFileOption()
+TDECmdLineArgs::addTempFileOption()
{
- KCmdLineArgs::addCmdLineOptions( kde_tempfile_option, "KDE-tempfile", "kde-tempfile" );
+ TDECmdLineArgs::addCmdLineOptions( kde_tempfile_option, "KDE-tempfile", "kde-tempfile" );
}
-bool KCmdLineArgs::isTempFileSet()
+bool TDECmdLineArgs::isTempFileSet()
{
- KCmdLineArgs* args = KCmdLineArgs::parsedArgs( "kde-tempfile" );
+ TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs( "kde-tempfile" );
if ( args )
return args->isSet( "tempfile" );
return false;
diff --git a/src/common/nokde/nokde_kcmdlineargs.h b/src/common/nokde/nokde_kcmdlineargs.h
index 3acc565..9dbd01f 100644
--- a/src/common/nokde/nokde_kcmdlineargs.h
+++ b/src/common/nokde/nokde_kcmdlineargs.h
@@ -42,11 +42,11 @@ typedef TQValueList<TQCString> QCStringList;
/**
* @short Structure that holds command line options.
*
- * This class is intended to be used with the KCmdLineArgs class, which
+ * This class is intended to be used with the TDECmdLineArgs class, which
* provides convenient and powerful command line argument parsing and
* handling functionality.
*
- * @see KCmdLineArgs for additional usage information
+ * @see TDECmdLineArgs for additional usage information
*/
struct TDECORE_EXPORT KCmdLineOptions
{
@@ -60,7 +60,7 @@ struct TDECORE_EXPORT KCmdLineOptions
* <i>myapp --nofoo</i> is called:
*
* \code
- * KCmdLineArgs::parsedArgs()->isSet("foo"); // false
+ * TDECmdLineArgs::parsedArgs()->isSet("foo"); // false
* \endcode
*/
const char *name;
@@ -78,34 +78,34 @@ struct TDECORE_EXPORT KCmdLineOptions
#define KCmdLineLastOption { 0, 0, 0 }
-class KCmdLineArgsList;
+class TDECmdLineArgsList;
class KApplication;
class KUniqueApplication;
class KCmdLineParsedOptions;
class KCmdLineParsedArgs;
class KAboutData;
-class KCmdLineArgsPrivate;
+class TDECmdLineArgsPrivate;
/**
* @short A class for command-line argument handling.
*
- * KCmdLineArgs provides simple access to the command-line arguments
+ * TDECmdLineArgs provides simple access to the command-line arguments
* for an application. It takes into account TQt-specific options,
* KDE-specific options and application specific options.
*
* This class is used in %main() via the static method
* init().
*
- * A typical %KDE application using %KCmdLineArgs should look like this:
+ * A typical %KDE application using %TDECmdLineArgs should look like this:
*
* \code
* int main(int argc, char *argv[])
* {
* // Initialize command line args
- * KCmdLineArgs::init(argc, argv, appName, programName, description, version);
+ * TDECmdLineArgs::init(argc, argv, appName, programName, description, version);
*
* // Tell which options are supported
- * KCmdLineArgs::addCmdLineOptions( options );
+ * TDECmdLineArgs::addCmdLineOptions( options );
*
* // Add options from other components
* KUniqueApplication::addCmdLineOptions();
@@ -122,7 +122,7 @@ class KCmdLineArgsPrivate;
* // necessary.
* // A KUniqueApplication might want to handle it in newInstance().
*
- * KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ * TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
*
* // A binary option (on / off)
* if (args->isSet("some-option"))
@@ -176,7 +176,7 @@ class KCmdLineArgsPrivate;
* \endcode
*
* The I18N_NOOP macro is used to indicate that these strings should be
- * marked for translation. The actual translation is done by KCmdLineArgs.
+ * marked for translation. The actual translation is done by TDECmdLineArgs.
* You can't use i18n() here because we are setting up a static data
* structure and can't do translations at compile time.
*
@@ -230,11 +230,11 @@ class KCmdLineArgsPrivate;
* @author Waldo Bastian
* @version 0.0.4
*/
-class TDECORE_EXPORT KCmdLineArgs
+class TDECORE_EXPORT TDECmdLineArgs
{
friend class KApplication;
friend class KUniqueApplication;
- friend class TQPtrList<KCmdLineArgs>;
+ friend class TQPtrList<TDECmdLineArgs>;
public:
// Static functions:
@@ -332,8 +332,8 @@ public:
* true. If required, you must check yourself the number of arguments
* specified by the user:
* \code
- * KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- * if (args->count() == 0) KCmdLineArgs::usage(i18n("No file specified!"));
+ * TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
+ * if (args->count() == 0) TDECmdLineArgs::usage(i18n("No file specified!"));
* \endcode
*
* In BNF:
@@ -378,7 +378,7 @@ public:
*
* @param id The name of the options you are interested in, can be 0.
*/
- static KCmdLineArgs *parsedArgs(const char *id=0);
+ static TDECmdLineArgs *parsedArgs(const char *id=0);
/**
* Get the CWD (Current Working Directory) associated with the
@@ -512,14 +512,14 @@ public:
/**
* Used by url().
- * Made public for apps that don't use KCmdLineArgs
+ * Made public for apps that don't use TDECmdLineArgs
* @param urlArg the argument
* @return the url.
*/
static KURL makeURL( const char * urlArg );
/**
- * Made public for apps that don't use KCmdLineArgs
+ * Made public for apps that don't use TDECmdLineArgs
* To be done before makeURL, to set the current working
* directory in case makeURL needs it.
* @param cwd the new working directory
@@ -564,7 +564,7 @@ protected:
* @internal
* Constructor.
*/
- KCmdLineArgs( const KCmdLineOptions *_options, const char *_name,
+ TDECmdLineArgs( const KCmdLineOptions *_options, const char *_name,
const char *_id);
/**
@@ -574,7 +574,7 @@ protected:
*
* Destructor.
*/
- ~KCmdLineArgs();
+ ~TDECmdLineArgs();
private:
/**
@@ -670,7 +670,7 @@ private:
* @param appname The untranslated name of your application. This should
* match with @p argv[0].
*
- * This function makes KCmdLineArgs ignore all unknown options as well as
+ * This function makes TDECmdLineArgs ignore all unknown options as well as
* all arguments.
*/
static void initIgnore(int _argc, char **_argv, const char *_appname);
@@ -684,7 +684,7 @@ private:
KCmdLineParsedArgs *parsedArgList;
bool isTQt;
- static KCmdLineArgsList *argsList; // All options.
+ static TDECmdLineArgsList *argsList; // All options.
static const KAboutData *about;
static int argc; // The original argc
@@ -694,7 +694,7 @@ private:
static char *mCwd; // Current working directory. Important for KUnqiueApp!
static bool parseArgs;
- KCmdLineArgsPrivate *d;
+ TDECmdLineArgsPrivate *d;
};
#endif
diff --git a/src/libgui/toplevel.cpp b/src/libgui/toplevel.cpp
index bcc9f3a..df055a7 100644
--- a/src/libgui/toplevel.cpp
+++ b/src/libgui/toplevel.cpp
@@ -378,7 +378,7 @@ void MainWindow::readDockConfig()
void MainWindow::initialLoading()
{
::PBusyCursor bc;
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if ( args->count()!=0 ) { // opened urls provided on the command line
for (int i = 0; i<args->count(); i++) {
PURL::Url url(args->url(i));
diff --git a/src/piklab-test/base/main_test.cpp b/src/piklab-test/base/main_test.cpp
index bfacdf8..769af87 100644
--- a/src/piklab-test/base/main_test.cpp
+++ b/src/piklab-test/base/main_test.cpp
@@ -15,7 +15,7 @@ Test::Test()
void Test::runTest()
{
- _args = KCmdLineArgs::parsedArgs();
+ _args = TDECmdLineArgs::parsedArgs();
checkArguments();
fflush(stdout);
execute();
diff --git a/src/piklab-test/base/main_test.h b/src/piklab-test/base/main_test.h
index 4006bd9..2d44f84 100644
--- a/src/piklab-test/base/main_test.h
+++ b/src/piklab-test/base/main_test.h
@@ -35,7 +35,7 @@ public:
virtual void runTest();
protected:
- KCmdLineArgs *_args;
+ TDECmdLineArgs *_args;
TQString _message;
void passed() { _nbPassed++; }