From 5075b3a008195981bf4bea3e3e54df524883f06d Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 6 Feb 2013 19:38:52 -0600 Subject: Rename KCmd to avoid conflicts with KDE4 --- src/common/nokde/nokde_kcmdlineargs.cpp | 36 ++++++++++++++++----------------- src/common/nokde/nokde_kcmdlineargs.h | 36 ++++++++++++++++----------------- 2 files changed, 36 insertions(+), 36 deletions(-) (limited to 'src/common/nokde') diff --git a/src/common/nokde/nokde_kcmdlineargs.cpp b/src/common/nokde/nokde_kcmdlineargs.cpp index 6f45ef0..481f0b6 100644 --- a/src/common/nokde/nokde_kcmdlineargs.cpp +++ b/src/common/nokde/nokde_kcmdlineargs.cpp @@ -73,14 +73,14 @@ template class TQAsciiDict; template class TQPtrList; -class KCmdLineParsedOptions : public TQAsciiDict +class TDECmdLineParsedOptions : public TQAsciiDict { public: - KCmdLineParsedOptions() + TDECmdLineParsedOptions() : TQAsciiDict( 7 ) { } // WABA: Huh? - // The compiler doesn't find KCmdLineParsedOptions::write(s) by itself ??? + // The compiler doesn't find TDECmdLineParsedOptions::write(s) by itself ??? // WABA: No, because there is another write function that hides the // write function in the base class even though this function has a // different signature. (obscure C++ feature) @@ -108,10 +108,10 @@ protected: }; -class KCmdLineParsedArgs : public TQStrList +class TDECmdLineParsedArgs : public TQStrList { public: - KCmdLineParsedArgs() + TDECmdLineParsedArgs() : TQStrList( true ) { } TQDataStream& save( TQDataStream &s) const { return TQGList::write(s); } @@ -220,7 +220,7 @@ const char * TDECmdLineArgs::appName() } void -TDECmdLineArgs::addCmdLineOptions( const KCmdLineOptions *options, const char *name, +TDECmdLineArgs::addCmdLineOptions( const TDECmdLineOptions *options, const char *name, const char *id, const char *afterId) { if (!argsList) @@ -367,7 +367,7 @@ void TDECmdLineArgs::removeArgs(const char *id) * +4 - no more options follow // !fork */ static int -findOption(const KCmdLineOptions *options, TQCString &opt, +findOption(const TDECmdLineOptions *options, TQCString &opt, const char *&opt_name, const char *&def, bool &enabled) { int result; @@ -574,7 +574,7 @@ TDECmdLineArgs::parseAllArgs() TDECmdLineArgs *appOptions = argsList->last(); if (!appOptions->id) { - const KCmdLineOptions *option = appOptions->options; + const TDECmdLineOptions *option = appOptions->options; while(option && option->name) { if (option->name[0] == '+') @@ -823,7 +823,7 @@ TDECmdLineArgs::usage(const char *id) TDECmdLineArgs *appOptions = argsList->last(); if (!appOptions->id) { - const KCmdLineOptions *option = appOptions->options; + const TDECmdLineOptions *option = appOptions->options; while(option && option->name) { if (option->name[0] == '+') @@ -886,7 +886,7 @@ TDECmdLineArgs::usage(const char *id) while (args) { - const KCmdLineOptions *option = args->options; + const TDECmdLineOptions *option = args->options; TQCString opt = ""; // while(option && option->name) @@ -1012,7 +1012,7 @@ TDECmdLineArgs::usage(const char *id) * * The given arguments are assumed to be constants. */ -TDECmdLineArgs::TDECmdLineArgs( const KCmdLineOptions *_options, +TDECmdLineArgs::TDECmdLineArgs( const TDECmdLineOptions *_options, const char *_name, const char *_id) : options(_options), name(_name), id(_id) { @@ -1071,8 +1071,8 @@ TDECmdLineArgs::save( TQDataStream &ds) const void TDECmdLineArgs::load( TQDataStream &ds) { - if (!parsedOptionList) parsedOptionList = new KCmdLineParsedOptions; - if (!parsedArgList) parsedArgList = new KCmdLineParsedArgs; + if (!parsedOptionList) parsedOptionList = new TDECmdLineParsedOptions; + if (!parsedArgList) parsedArgList = new TDECmdLineParsedArgs; parsedOptionList->load( ds ); parsedArgList->load( ds ); @@ -1102,7 +1102,7 @@ TDECmdLineArgs::setOption(const TQCString &opt, bool enabled) addArgument(arg); } if (!parsedOptionList) { - parsedOptionList = new KCmdLineParsedOptions; + parsedOptionList = new TDECmdLineParsedOptions; parsedOptionList->setAutoDelete(true); } @@ -1132,7 +1132,7 @@ TDECmdLineArgs::setOption(const TQCString &opt, const char *value) #endif } if (!parsedOptionList) { - parsedOptionList = new KCmdLineParsedOptions; + parsedOptionList = new TDECmdLineParsedOptions; parsedOptionList->setAutoDelete(true); } @@ -1303,15 +1303,15 @@ void TDECmdLineArgs::addArgument(const char *argument) { if (!parsedArgList) - parsedArgList = new KCmdLineParsedArgs; + parsedArgList = new TDECmdLineParsedArgs; parsedArgList->append(argument); } -static const KCmdLineOptions kde_tempfile_option[] = +static const TDECmdLineOptions kde_tempfile_option[] = { { "tempfile", I18N_NOOP("The files/URLs opened by the application will be deleted after use"), 0}, - KCmdLineLastOption + TDECmdLineLastOption }; void diff --git a/src/common/nokde/nokde_kcmdlineargs.h b/src/common/nokde/nokde_kcmdlineargs.h index 8622f10..58931a6 100644 --- a/src/common/nokde/nokde_kcmdlineargs.h +++ b/src/common/nokde/nokde_kcmdlineargs.h @@ -48,7 +48,7 @@ typedef TQValueList QCStringList; * * @see TDECmdLineArgs for additional usage information */ -struct TDECORE_EXPORT KCmdLineOptions +struct TDECORE_EXPORT TDECmdLineOptions { /** * The name of the argument as it should be called on the command line and @@ -76,13 +76,13 @@ struct TDECORE_EXPORT KCmdLineOptions const char *def; // Default }; -#define KCmdLineLastOption { 0, 0, 0 } +#define TDECmdLineLastOption { 0, 0, 0 } class TDECmdLineArgsList; class TDEApplication; class KUniqueApplication; -class KCmdLineParsedOptions; -class KCmdLineParsedArgs; +class TDECmdLineParsedOptions; +class TDECmdLineParsedArgs; class TDEAboutData; class TDECmdLineArgsPrivate; @@ -147,10 +147,10 @@ class TDECmdLineArgsPrivate; * \endcode * * The options that an application supports are configured using the - * KCmdLineOptions class. An example is shown below: + * TDECmdLineOptions class. An example is shown below: * * \code - * static const KCmdLineOptions options[] = + * static const TDECmdLineOptions options[] = * { * { "a", I18N_NOOP("A short binary option"), 0 }, * { "b \", I18N_NOOP("A short option which takes an argument"), 0 }, @@ -171,7 +171,7 @@ class TDECmdLineArgsPrivate; * { "+[arg1]", I18N_NOOP("An optional argument 'arg1'"), 0 }, * { "!+command", I18N_NOOP("A required argument 'command', that can contain multiple words, even starting with '-'"), 0 }, * { "", I18N_NOOP("Additional help text not associated with any particular option") 0 }, - * KCmdLineLastOption // End of options. + * TDECmdLineLastOption // End of options. * }; * \endcode * @@ -310,13 +310,13 @@ public: * The list of options should look like this: * * \code - * static KCmdLineOptions options[] = + * static TDECmdLineOptions options[] = * { * { "option1 \", I18N_NOOP("Description 1"), "my_extra_arg" }, * { "o", 0, 0 }, * { "option2", I18N_NOOP("Description 2"), 0 }, * { "nooption3", I18N_NOOP("Description 3"), 0 }, - * KCmdLineLastOption + * TDECmdLineLastOption * } * \endcode * @@ -365,7 +365,7 @@ public: * @param id A name with which these options can be identified, can be 0. * @param afterId The options are inserted after this set of options, can be 0. */ - static void addCmdLineOptions( const KCmdLineOptions *options, + static void addCmdLineOptions( const TDECmdLineOptions *options, const char *name=0, const char *id = 0, const char *afterId=0); @@ -426,7 +426,7 @@ public: /** * Read out a string option. * - * The option must have a corresponding KCmdLineOptions entry + * The option must have a corresponding TDECmdLineOptions entry * of the form: * \code * { "option \", I18N_NOOP("Description"), "default" } @@ -446,7 +446,7 @@ public: /** * Read out all occurrences of a string option. * - * The option must have a corresponding KCmdLineOptions entry + * The option must have a corresponding TDECmdLineOptions entry * of the form: * \code * { "option \", I18N_NOOP("Description"), "default" } @@ -468,11 +468,11 @@ public: * * @return The value of the option. It will be true if the option * was specifically turned on in the command line, or if the option - * is turned on by default (in the KCmdLineOptions list) and was + * is turned on by default (in the TDECmdLineOptions list) and was * not specifically turned off in the command line. Equivalently, * it will be false if the option was specifically turned off in * the command line, or if the option is turned off by default (in - * the KCmdLineOptions list) and was not specifically turned on in + * the TDECmdLineOptions list) and was not specifically turned on in * the command line. */ bool isSet(const char *option) const; @@ -564,7 +564,7 @@ protected: * @internal * Constructor. */ - TDECmdLineArgs( const KCmdLineOptions *_options, const char *_name, + TDECmdLineArgs( const TDECmdLineOptions *_options, const char *_name, const char *_id); /** @@ -677,11 +677,11 @@ private: static void printQ(const TQString &msg); - const KCmdLineOptions *options; + const TDECmdLineOptions *options; const char *name; const char *id; - KCmdLineParsedOptions *parsedOptionList; - KCmdLineParsedArgs *parsedArgList; + TDECmdLineParsedOptions *parsedOptionList; + TDECmdLineParsedArgs *parsedArgList; bool isTQt; static TDECmdLineArgsList *argsList; // All options. -- cgit v1.2.1