Rename KCmd to avoid conflicts with KDE4

pull/16/head
Timothy Pearson 11 years ago
parent 84341c0486
commit 5466d52073

@ -18,10 +18,10 @@
using namespace std; using namespace std;
using namespace Arts; using namespace Arts;
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "+[URL]", I18N_NOOP("URL to open"), 0 }, { "+[URL]", I18N_NOOP("URL to open"), 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
KConvertTest::KConvertTest() KConvertTest::KConvertTest()

@ -12,10 +12,10 @@ using namespace std;
using namespace Arts; using namespace Arts;
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "+[URL]", I18N_NOOP("URL to open"), 0 }, { "+[URL]", I18N_NOOP("URL to open"), 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
int main(int argc, char **argv) int main(int argc, char **argv)

@ -78,10 +78,10 @@ public:
REGISTER_IMPLEMENTATION(KIOTestSlow_impl); REGISTER_IMPLEMENTATION(KIOTestSlow_impl);
}; };
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "+[URL]", I18N_NOOP("URL to open"), 0 }, { "+[URL]", I18N_NOOP("URL to open"), 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
#undef USE_FILEINPUTSTREAM #undef USE_FILEINPUTSTREAM

@ -39,7 +39,7 @@ Gnome, etc. and used instead.
#include <kcmdlineargs.h> #include <kcmdlineargs.h>
// command line options // command line options
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "e", 0,0 }, { "e", 0,0 },
{ "error", I18N_NOOP("Display error message (default)"), 0 }, { "error", I18N_NOOP("Display error message (default)"), 0 },
@ -48,7 +48,7 @@ static KCmdLineOptions options[] =
{ "i", 0, 0 }, { "i", 0, 0 },
{ "info", I18N_NOOP("Display informational message"), 0 }, { "info", I18N_NOOP("Display informational message"), 0 },
{ "+message", I18N_NOOP("Message string to be displayed"), 0 }, { "+message", I18N_NOOP("Message string to be displayed"), 0 },
KCmdLineLastOption // End of options. TDECmdLineLastOption // End of options.
}; };
TDEAboutData aboutData("artsmessage", I18N_NOOP("artsmessage"), "0.1", TDEAboutData aboutData("artsmessage", I18N_NOOP("artsmessage"), "0.1",

@ -37,13 +37,13 @@
using namespace KABC; using namespace KABC;
static const KCmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {
{ "disable-autostart", I18N_NOOP( "Disable automatic startup on login" ), 0 }, { "disable-autostart", I18N_NOOP( "Disable automatic startup on login" ), 0 },
{ "quiet", "", 0 }, { "quiet", "", 0 },
{ "o", 0, 0 }, { "o", 0, 0 },
{ "override", I18N_NOOP( "Override existing entries" ), "1" }, { "override", I18N_NOOP( "Override existing entries" ), "1" },
KCmdLineLastOption TDECmdLineLastOption
}; };
void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab ) void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab )

@ -13,11 +13,11 @@
using namespace KABC; using namespace KABC;
static const KCmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {
{ "save", "", 0 }, { "save", "", 0 },
{ "number", "", 0 }, { "number", "", 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
int main(int argc,char **argv) int main(int argc,char **argv)

@ -10,11 +10,11 @@
using namespace KABC; using namespace KABC;
static const KCmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {
{ "save", "", 0 }, { "save", "", 0 },
{ "number", "", 0 }, { "number", "", 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
int main(int /*argc*/,char /* **argv*/) int main(int /*argc*/,char /* **argv*/)

@ -10,11 +10,11 @@
using namespace KABC; using namespace KABC;
static const KCmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {
{ "save", "", 0 }, { "save", "", 0 },
{ "number", "", 0 }, { "number", "", 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
int main(int argc,char **argv) int main(int argc,char **argv)

@ -13,10 +13,10 @@
using namespace KABC; using namespace KABC;
static const KCmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {
{"list <listname>", I18N_NOOP("Show distribution list with name <listname>"), 0}, {"list <listname>", I18N_NOOP("Show distribution list with name <listname>"), 0},
KCmdLineLastOption TDECmdLineLastOption
}; };

@ -10,10 +10,10 @@
using namespace KABC; using namespace KABC;
static const KCmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {
{"multiple", I18N_NOOP("Allow selection of multiple addressees"), 0}, {"multiple", I18N_NOOP("Allow selection of multiple addressees"), 0},
KCmdLineLastOption TDECmdLineLastOption
}; };
int main(int argc,char **argv) int main(int argc,char **argv)

@ -153,14 +153,14 @@ void LockWidget::unlock()
} }
static const KCmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {
{ "a", 0, 0 }, { "a", 0, 0 },
{ "addressbook", "Standard address book", 0 }, { "addressbook", "Standard address book", 0 },
{ "d", 0, 0 }, { "d", 0, 0 },
{ "diraddressbook", "Standard address book directory resource", 0 }, { "diraddressbook", "Standard address book directory resource", 0 },
{ "+identifier", "Identifier of resource to be locked, e.g. filename", 0 }, { "+identifier", "Identifier of resource to be locked, e.g. filename", 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
int main(int argc,char **argv) int main(int argc,char **argv)

@ -33,11 +33,11 @@
#include "vcardconverter.h" #include "vcardconverter.h"
#include "vcard.h" #include "vcard.h"
static const KCmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {
{"vcard21", I18N_NOOP("vCard 2.1"), 0}, {"vcard21", I18N_NOOP("vCard 2.1"), 0},
{"+inputfile", I18N_NOOP("Input file"), 0}, {"+inputfile", I18N_NOOP("Input file"), 0},
KCmdLineLastOption TDECmdLineLastOption
}; };
int main( int argc, char **argv ) int main( int argc, char **argv )

@ -371,7 +371,7 @@ static TQString findMostRecentFailureSnapshot() {
return dir[0].mid(sizeof failureSnapshotPrefix - 1); return dir[0].mid(sizeof failureSnapshotPrefix - 1);
} }
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "b", 0, 0 }, { "b", 0, 0 },
{ "base <base_dir>", "Directory containing tests, basedir and output directories.", 0}, { "base <base_dir>", "Directory containing tests, basedir and output directories.", 0},
@ -390,7 +390,7 @@ static KCmdLineOptions options[] =
{ "output <directory>", "Put output in <directory> instead of <base_dir>/output", 0 } , { "output <directory>", "Put output in <directory> instead of <base_dir>/output", 0 } ,
{ "+[base_dir]", "Directory containing tests,basedir and output directories. Only regarded if -b is not specified.", 0 } , { "+[base_dir]", "Directory containing tests,basedir and output directories. Only regarded if -b is not specified.", 0 } ,
{ "+[testcases]", "Relative path to testcase, or directory of testcases to be run (equivalent to -t).", 0 } , { "+[testcases]", "Relative path to testcase, or directory of testcases to be run (equivalent to -t).", 0 } ,
KCmdLineLastOption TDECmdLineLastOption
}; };
int main(int argc, char *argv[]) int main(int argc, char *argv[])

@ -730,11 +730,11 @@ void KHostnameD::checkHostname()
} }
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "check", I18N_NOOP("Check Sycoca database only once"), 0 }, { "check", I18N_NOOP("Check Sycoca database only once"), 0 },
{ "new-startup", "Internal", 0 }, { "new-startup", "Internal", 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
class KDEDQtDCOPObject : public DCOPObject class KDEDQtDCOPObject : public DCOPObject

@ -37,10 +37,10 @@
#include <kprocess.h> #include <kprocess.h>
#include <kde_file.h> #include <kde_file.h>
static KCmdLineOptions options[] = { static TDECmdLineOptions options[] = {
{ "+old", I18N_NOOP("Old hostname"), 0 }, { "+old", I18N_NOOP("Old hostname"), 0 },
{ "+new", I18N_NOOP("New hostname"), 0 }, { "+new", I18N_NOOP("New hostname"), 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
static const char appName[] = "kdontchangethehostname"; static const char appName[] = "kdontchangethehostname";

@ -32,14 +32,14 @@
#include "kservicegroup.h" #include "kservicegroup.h"
#include "kstandarddirs.h" #include "kstandarddirs.h"
static KCmdLineOptions options[] = { static TDECmdLineOptions options[] = {
{ "utf8", I18N_NOOP("Output data in UTF-8 instead of local encoding"), 0 }, { "utf8", I18N_NOOP("Output data in UTF-8 instead of local encoding"), 0 },
{ "print-menu-id", I18N_NOOP("Print menu-id of the menu that contains\nthe application"), 0 }, { "print-menu-id", I18N_NOOP("Print menu-id of the menu that contains\nthe application"), 0 },
{ "print-menu-name", I18N_NOOP("Print menu name (caption) of the menu that\ncontains the application"), 0 }, { "print-menu-name", I18N_NOOP("Print menu name (caption) of the menu that\ncontains the application"), 0 },
{ "highlight", I18N_NOOP("Highlight the entry in the menu"), 0 }, { "highlight", I18N_NOOP("Highlight the entry in the menu"), 0 },
{ "nocache-update", I18N_NOOP("Do not check if sycoca database is up to date"), 0 }, { "nocache-update", I18N_NOOP("Do not check if sycoca database is up to date"), 0 },
{ "+<application-id>", I18N_NOOP("The id of the menu entry to locate"), 0 }, { "+<application-id>", I18N_NOOP("The id of the menu entry to locate"), 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
static const char appName[] = "tde-menu"; static const char appName[] = "tde-menu";

@ -691,7 +691,7 @@ TQStringList KBuildSycoca::existingResourceDirs()
return *dirs; return *dirs;
} }
static KCmdLineOptions options[] = { static TDECmdLineOptions options[] = {
{ "nosignal", I18N_NOOP("Do not signal applications to update"), 0 }, { "nosignal", I18N_NOOP("Do not signal applications to update"), 0 },
{ "noincremental", I18N_NOOP("Disable incremental update, re-read everything"), 0 }, { "noincremental", I18N_NOOP("Disable incremental update, re-read everything"), 0 },
{ "checkstamps", I18N_NOOP("Check file timestamps"), 0 }, { "checkstamps", I18N_NOOP("Check file timestamps"), 0 },
@ -703,7 +703,7 @@ static KCmdLineOptions options[] = {
{ "silent", I18N_NOOP("Silent - work without windows and stderr"), 0 }, { "silent", I18N_NOOP("Silent - work without windows and stderr"), 0 },
{ "showprogress", I18N_NOOP("Show progress information (even if 'silent' mode is on)"), 0 }, { "showprogress", I18N_NOOP("Show progress information (even if 'silent' mode is on)"), 0 },
#endif #endif
KCmdLineLastOption TDECmdLineLastOption
}; };
static const char appName[] = "tdebuildsycoca"; static const char appName[] = "tdebuildsycoca";

@ -107,14 +107,14 @@ static const char endCreate[] = " return 0;\n"
"KDE_Q_EXPORT_PLUGIN(%PluginName)\n"; "KDE_Q_EXPORT_PLUGIN(%PluginName)\n";
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "+file", I18N_NOOP( "Input file" ), 0 }, { "+file", I18N_NOOP( "Input file" ), 0 },
{ "o <file>", I18N_NOOP( "Output file" ), 0 }, { "o <file>", I18N_NOOP( "Output file" ), 0 },
{ "n <plugin name>", I18N_NOOP( "Name of the plugin class to generate" ), "WidgetsPlugin" }, { "n <plugin name>", I18N_NOOP( "Name of the plugin class to generate" ), "WidgetsPlugin" },
{ "g <group>", I18N_NOOP( "Default widget group name to display in designer" ), "Custom" }, { "g <group>", I18N_NOOP( "Default widget group name to display in designer" ), "Custom" },
{ "p <pixmap dir>", I18N_NOOP( "Embed pixmaps from a source directory" ), 0 }, { "p <pixmap dir>", I18N_NOOP( "Embed pixmaps from a source directory" ), 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
static TQString buildWidgetDef( const TQString &name, TDEConfig &input, const TQString &group ); static TQString buildWidgetDef( const TQString &name, TDEConfig &input, const TQString &group );

@ -69,7 +69,7 @@ void parseEntry(PairList &list, xmlNodePtr cur, int base)
} }
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "stylesheet <xsl>", I18N_NOOP( "Stylesheet to use" ), 0 }, { "stylesheet <xsl>", I18N_NOOP( "Stylesheet to use" ), 0 },
{ "stdout", I18N_NOOP( "Output whole document to stdout" ), 0 }, { "stdout", I18N_NOOP( "Output whole document to stdout" ), 0 },
@ -81,7 +81,7 @@ static KCmdLineOptions options[] =
{ "srcdir <dir>", I18N_NOOP( "Set the srcdir, for tdelibs" ), 0}, { "srcdir <dir>", I18N_NOOP( "Set the srcdir, for tdelibs" ), 0},
{ "param <key>=<value>", I18N_NOOP( "Parameters to pass to the stylesheet" ), 0}, { "param <key>=<value>", I18N_NOOP( "Parameters to pass to the stylesheet" ), 0},
{ "+xml", I18N_NOOP("The file to transform"), 0}, { "+xml", I18N_NOOP("The file to transform"), 0},
KCmdLineLastOption // End of options. TDECmdLineLastOption // End of options.
}; };

@ -44,10 +44,10 @@ static void sig_handler(int sig_num)
TDELauncher::destruct(255); TDELauncher::destruct(255);
} }
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "new-startup", "Internal", 0 }, { "new-startup", "Internal", 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
extern "C" KDE_EXPORT int kdemain( int argc, char**argv ) extern "C" KDE_EXPORT int kdemain( int argc, char**argv )

@ -26,11 +26,11 @@
#include "downloaddialog.h" #include "downloaddialog.h"
static const KCmdLineOptions op[] = static const TDECmdLineOptions op[] =
{ {
{"type <type>", I18N_NOOP("Display only media of this type"), 0}, {"type <type>", I18N_NOOP("Display only media of this type"), 0},
{"+[providerlist]", I18N_NOOP("Provider list to use"), 0}, {"+[providerlist]", I18N_NOOP("Provider list to use"), 0},
KCmdLineLastOption TDECmdLineLastOption
}; };
int main(int argc, char **argv) int main(int argc, char **argv)

@ -43,13 +43,13 @@ extern "C"
TQDialog *kss_setup(); TQDialog *kss_setup();
} }
static const KCmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {
{ "setup", I18N_NOOP("Setup screen saver"), 0 }, { "setup", I18N_NOOP("Setup screen saver"), 0 },
{ "window-id wid", I18N_NOOP("Run in the specified XWindow"), 0 }, { "window-id wid", I18N_NOOP("Run in the specified XWindow"), 0 },
{ "root", I18N_NOOP("Run in the root XWindow"), 0 }, { "root", I18N_NOOP("Run in the root XWindow"), 0 },
{ "demo", I18N_NOOP("Start screen saver in demo mode"), "default"}, { "demo", I18N_NOOP("Start screen saver in demo mode"), "default"},
KCmdLineLastOption TDECmdLineLastOption
}; };
static void crashHandler( int ) static void crashHandler( int )

@ -51,7 +51,7 @@ using namespace std;
KService::List m_modules; KService::List m_modules;
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "list", I18N_NOOP("List all possible modules"), 0}, { "list", I18N_NOOP("List all possible modules"), 0},
{ "+module", I18N_NOOP("Configuration module to open"), 0 }, { "+module", I18N_NOOP("Configuration module to open"), 0 },
@ -59,7 +59,7 @@ static KCmdLineOptions options[] =
{ "embed <id>", I18N_NOOP("Embeds the module with buttons in window with id <id>"), 0 }, { "embed <id>", I18N_NOOP("Embeds the module with buttons in window with id <id>"), 0 },
{ "embed-proxy <id>", I18N_NOOP("Embeds the module without buttons in window with id <id>"), 0 }, { "embed-proxy <id>", I18N_NOOP("Embeds the module without buttons in window with id <id>"), 0 },
{ "silent", I18N_NOOP("Do not display main window"), 0 }, { "silent", I18N_NOOP("Do not display main window"), 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
static void listModules(const TQString &baseGroup) static void listModules(const TQString &baseGroup)

@ -38,12 +38,12 @@
#include <kinstance.h> #include <kinstance.h>
#include <ktempfile.h> #include <ktempfile.h>
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "debug", I18N_NOOP("Keep output results from scripts"), 0 }, { "debug", I18N_NOOP("Keep output results from scripts"), 0 },
{ "check <update-file>", I18N_NOOP("Check whether config file itself requires updating"), 0 }, { "check <update-file>", I18N_NOOP("Check whether config file itself requires updating"), 0 },
{ "+[file]", I18N_NOOP("File to read update instructions from"), 0 }, { "+[file]", I18N_NOOP("File to read update instructions from"), 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
class KonfUpdate class KonfUpdate

@ -1505,7 +1505,7 @@ void TDEApplication::dcopFailure(const TQString &msg)
} }
} }
static const KCmdLineOptions qt_options[] = static const TDECmdLineOptions qt_options[] =
{ {
//FIXME: Check if other options are specific to Qt/X11 //FIXME: Check if other options are specific to Qt/X11
#ifdef Q_WS_X11 #ifdef Q_WS_X11
@ -1539,10 +1539,10 @@ static const KCmdLineOptions qt_options[] =
{ "qws", I18N_NOOP("forces the application to run as QWS Server"), 0}, { "qws", I18N_NOOP("forces the application to run as QWS Server"), 0},
#endif #endif
{ "reverse", I18N_NOOP("mirrors the whole layout of widgets"), 0}, { "reverse", I18N_NOOP("mirrors the whole layout of widgets"), 0},
KCmdLineLastOption TDECmdLineLastOption
}; };
static const KCmdLineOptions kde_options[] = static const TDECmdLineOptions kde_options[] =
{ {
{ "caption <caption>", I18N_NOOP("Use 'caption' as name in the titlebar"), 0}, { "caption <caption>", I18N_NOOP("Use 'caption' as name in the titlebar"), 0},
{ "icon <icon>", I18N_NOOP("Use 'icon' as the application icon"), 0}, { "icon <icon>", I18N_NOOP("Use 'icon' as the application icon"), 0},
@ -1556,7 +1556,7 @@ static const KCmdLineOptions kde_options[] =
{ "smkey <sessionKey>", 0, 0}, // this option is obsolete and exists only to allow smooth upgrades from sessions { "smkey <sessionKey>", 0, 0}, // this option is obsolete and exists only to allow smooth upgrades from sessions
// saved under Qt 3.0.x -- Qt 3.1.x includes the session key now automatically in // saved under Qt 3.0.x -- Qt 3.1.x includes the session key now automatically in
// the session id (Simon) // the session id (Simon)
KCmdLineLastOption TDECmdLineLastOption
}; };
void void

@ -56,14 +56,14 @@
template class TQAsciiDict<TQCString>; template class TQAsciiDict<TQCString>;
template class TQPtrList<TDECmdLineArgs>; template class TQPtrList<TDECmdLineArgs>;
class KCmdLineParsedOptions : public TQAsciiDict<TQCString> class TDECmdLineParsedOptions : public TQAsciiDict<TQCString>
{ {
public: public:
KCmdLineParsedOptions() TDECmdLineParsedOptions()
: TQAsciiDict<TQCString>( 7 ) { } : TQAsciiDict<TQCString>( 7 ) { }
// WABA: Huh? // 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 // WABA: No, because there is another write function that hides the
// write function in the base class even though this function has a // write function in the base class even though this function has a
// different signature. (obscure C++ feature) // different signature. (obscure C++ feature)
@ -91,10 +91,10 @@ protected:
}; };
class KCmdLineParsedArgs : public TQStrList class TDECmdLineParsedArgs : public TQStrList
{ {
public: public:
KCmdLineParsedArgs() TDECmdLineParsedArgs()
: TQStrList( true ) { } : TQStrList( true ) { }
TQDataStream& save( TQDataStream &s) const TQDataStream& save( TQDataStream &s) const
{ return TQGList::write(s); } { return TQGList::write(s); }
@ -203,7 +203,7 @@ const char * TDECmdLineArgs::appName()
} }
void void
TDECmdLineArgs::addCmdLineOptions( const KCmdLineOptions *options, const char *name, TDECmdLineArgs::addCmdLineOptions( const TDECmdLineOptions *options, const char *name,
const char *id, const char *afterId) const char *id, const char *afterId)
{ {
if (!argsList) if (!argsList)
@ -352,7 +352,7 @@ void TDECmdLineArgs::removeArgs(const char *id)
* +4 - no more options follow // !fork * +4 - no more options follow // !fork
*/ */
static int static int
findOption(const KCmdLineOptions *options, TQCString &opt, findOption(const TDECmdLineOptions *options, TQCString &opt,
const char *&opt_name, const char *&def, bool &enabled) const char *&opt_name, const char *&def, bool &enabled)
{ {
int result; int result;
@ -549,7 +549,7 @@ TDECmdLineArgs::parseAllArgs()
TDECmdLineArgs *appOptions = argsList->last(); TDECmdLineArgs *appOptions = argsList->last();
if (!appOptions->id) if (!appOptions->id)
{ {
const KCmdLineOptions *option = appOptions->options; const TDECmdLineOptions *option = appOptions->options;
while(option && option->name) while(option && option->name)
{ {
if (option->name[0] == '+') if (option->name[0] == '+')
@ -801,7 +801,7 @@ TDECmdLineArgs::usage(const char *id)
TDECmdLineArgs *appOptions = argsList->last(); TDECmdLineArgs *appOptions = argsList->last();
if (!appOptions->id) if (!appOptions->id)
{ {
const KCmdLineOptions *option = appOptions->options; const TDECmdLineOptions *option = appOptions->options;
while(option && option->name) while(option && option->name)
{ {
if (option->name[0] == '+') if (option->name[0] == '+')
@ -864,7 +864,7 @@ TDECmdLineArgs::usage(const char *id)
while (args) while (args)
{ {
const KCmdLineOptions *option = args->options; const TDECmdLineOptions *option = args->options;
TQCString opt = ""; TQCString opt = "";
// //
while(option && option->name) while(option && option->name)
@ -986,7 +986,7 @@ TDECmdLineArgs::usage(const char *id)
* *
* The given arguments are assumed to be constants. * The given arguments are assumed to be constants.
*/ */
TDECmdLineArgs::TDECmdLineArgs( const KCmdLineOptions *_options, TDECmdLineArgs::TDECmdLineArgs( const TDECmdLineOptions *_options,
const char *_name, const char *_id) const char *_name, const char *_id)
: options(_options), name(_name), id(_id) : options(_options), name(_name), id(_id)
{ {
@ -1045,8 +1045,8 @@ TDECmdLineArgs::save( TQDataStream &ds) const
void void
TDECmdLineArgs::load( TQDataStream &ds) TDECmdLineArgs::load( TQDataStream &ds)
{ {
if (!parsedOptionList) parsedOptionList = new KCmdLineParsedOptions; if (!parsedOptionList) parsedOptionList = new TDECmdLineParsedOptions;
if (!parsedArgList) parsedArgList = new KCmdLineParsedArgs; if (!parsedArgList) parsedArgList = new TDECmdLineParsedArgs;
parsedOptionList->load( ds ); parsedOptionList->load( ds );
parsedArgList->load( ds ); parsedArgList->load( ds );
@ -1076,7 +1076,7 @@ TDECmdLineArgs::setOption(const TQCString &opt, bool enabled)
addArgument(arg); addArgument(arg);
} }
if (!parsedOptionList) { if (!parsedOptionList) {
parsedOptionList = new KCmdLineParsedOptions; parsedOptionList = new TDECmdLineParsedOptions;
parsedOptionList->setAutoDelete(true); parsedOptionList->setAutoDelete(true);
} }
@ -1106,7 +1106,7 @@ TDECmdLineArgs::setOption(const TQCString &opt, const char *value)
#endif #endif
} }
if (!parsedOptionList) { if (!parsedOptionList) {
parsedOptionList = new KCmdLineParsedOptions; parsedOptionList = new TDECmdLineParsedOptions;
parsedOptionList->setAutoDelete(true); parsedOptionList->setAutoDelete(true);
} }
@ -1272,15 +1272,15 @@ void
TDECmdLineArgs::addArgument(const char *argument) TDECmdLineArgs::addArgument(const char *argument)
{ {
if (!parsedArgList) if (!parsedArgList)
parsedArgList = new KCmdLineParsedArgs; parsedArgList = new TDECmdLineParsedArgs;
parsedArgList->append(argument); 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}, { "tempfile", I18N_NOOP("The files/URLs opened by the application will be deleted after use"), 0},
KCmdLineLastOption TDECmdLineLastOption
}; };
void void

@ -37,7 +37,7 @@ typedef TQValueList<TQCString> QCStringList;
* *
* @see TDECmdLineArgs for additional usage information * @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 * The name of the argument as it should be called on the command line and
@ -65,13 +65,13 @@ struct TDECORE_EXPORT KCmdLineOptions
const char *def; // Default const char *def; // Default
}; };
#define KCmdLineLastOption { 0, 0, 0 } #define TDECmdLineLastOption { 0, 0, 0 }
class TDECmdLineArgsList; class TDECmdLineArgsList;
class TDEApplication; class TDEApplication;
class KUniqueApplication; class KUniqueApplication;
class KCmdLineParsedOptions; class TDECmdLineParsedOptions;
class KCmdLineParsedArgs; class TDECmdLineParsedArgs;
class TDEAboutData; class TDEAboutData;
class TDECmdLineArgsPrivate; class TDECmdLineArgsPrivate;
@ -136,10 +136,10 @@ class TDECmdLineArgsPrivate;
* \endcode * \endcode
* *
* The options that an application supports are configured using the * 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 * \code
* static const KCmdLineOptions options[] = * static const TDECmdLineOptions options[] =
* { * {
* { "a", I18N_NOOP("A short binary option"), 0 }, * { "a", I18N_NOOP("A short binary option"), 0 },
* { "b \<file>", I18N_NOOP("A short option which takes an argument"), 0 }, * { "b \<file>", I18N_NOOP("A short option which takes an argument"), 0 },
@ -160,7 +160,7 @@ class TDECmdLineArgsPrivate;
* { "+[arg1]", I18N_NOOP("An optional argument 'arg1'"), 0 }, * { "+[arg1]", I18N_NOOP("An optional argument 'arg1'"), 0 },
* { "!+command", I18N_NOOP("A required argument 'command', that can contain multiple words, even starting with '-'"), 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 }, * { "", I18N_NOOP("Additional help text not associated with any particular option") 0 },
* KCmdLineLastOption // End of options. * TDECmdLineLastOption // End of options.
* }; * };
* \endcode * \endcode
* *
@ -299,13 +299,13 @@ public:
* The list of options should look like this: * The list of options should look like this:
* *
* \code * \code
* static KCmdLineOptions options[] = * static TDECmdLineOptions options[] =
* { * {
* { "option1 \<argument>", I18N_NOOP("Description 1"), "my_extra_arg" }, * { "option1 \<argument>", I18N_NOOP("Description 1"), "my_extra_arg" },
* { "o", 0, 0 }, * { "o", 0, 0 },
* { "option2", I18N_NOOP("Description 2"), 0 }, * { "option2", I18N_NOOP("Description 2"), 0 },
* { "nooption3", I18N_NOOP("Description 3"), 0 }, * { "nooption3", I18N_NOOP("Description 3"), 0 },
* KCmdLineLastOption * TDECmdLineLastOption
* } * }
* \endcode * \endcode
* *
@ -354,7 +354,7 @@ public:
* @param id A name with which these options can be identified, can be 0. * @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. * @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 *name=0, const char *id = 0,
const char *afterId=0); const char *afterId=0);
@ -415,7 +415,7 @@ public:
/** /**
* Read out a string option. * Read out a string option.
* *
* The option must have a corresponding KCmdLineOptions entry * The option must have a corresponding TDECmdLineOptions entry
* of the form: * of the form:
* \code * \code
* { "option \<argument>", I18N_NOOP("Description"), "default" } * { "option \<argument>", I18N_NOOP("Description"), "default" }
@ -435,7 +435,7 @@ public:
/** /**
* Read out all occurrences of a string option. * 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: * of the form:
* \code * \code
* { "option \<argument>", I18N_NOOP("Description"), "default" } * { "option \<argument>", I18N_NOOP("Description"), "default" }
@ -457,11 +457,11 @@ public:
* *
* @return The value of the option. It will be true if the option * @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 * 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, * not specifically turned off in the command line. Equivalently,
* it will be false if the option was specifically turned off in * 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 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. * the command line.
*/ */
bool isSet(const char *option) const; bool isSet(const char *option) const;
@ -553,7 +553,7 @@ protected:
* @internal * @internal
* Constructor. * Constructor.
*/ */
TDECmdLineArgs( const KCmdLineOptions *_options, const char *_name, TDECmdLineArgs( const TDECmdLineOptions *_options, const char *_name,
const char *_id); const char *_id);
/** /**
@ -666,11 +666,11 @@ private:
static void printQ(const TQString &msg); static void printQ(const TQString &msg);
const KCmdLineOptions *options; const TDECmdLineOptions *options;
const char *name; const char *name;
const char *id; const char *id;
KCmdLineParsedOptions *parsedOptionList; TDECmdLineParsedOptions *parsedOptionList;
KCmdLineParsedArgs *parsedArgList; TDECmdLineParsedArgs *parsedArgList;
bool isQt; bool isQt;
static TDECmdLineArgsList *argsList; // All options. static TDECmdLineArgsList *argsList; // All options.

@ -36,9 +36,9 @@ static const char description[] =
static const char version[] = "0.1"; static const char version[] = "0.1";
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
KCmdLineLastOption TDECmdLineLastOption
}; };
int main(int argc, char **argv) int main(int argc, char **argv)

@ -64,10 +64,10 @@ bool KUniqueApplication::s_multipleInstances = false;
bool KUniqueApplication::s_uniqueTestDone = false; bool KUniqueApplication::s_uniqueTestDone = false;
bool KUniqueApplication::s_handleAutoStarted = false; bool KUniqueApplication::s_handleAutoStarted = false;
static KCmdLineOptions kunique_options[] = static TDECmdLineOptions kunique_options[] =
{ {
{ "nofork", "Don't run in the background.", 0 }, { "nofork", "Don't run in the background.", 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
struct DCOPRequest { struct DCOPRequest {

@ -13,7 +13,7 @@
static const char *description = I18N_NOOP("A little program to output installation paths"); static const char *description = I18N_NOOP("A little program to output installation paths");
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "expandvars", I18N_NOOP("expand ${prefix} and ${exec_prefix} in output"), 0 }, { "expandvars", I18N_NOOP("expand ${prefix} and ${exec_prefix} in output"), 0 },
{ "prefix", I18N_NOOP("Compiled in prefix for TDE libraries"), 0 }, { "prefix", I18N_NOOP("Compiled in prefix for TDE libraries"), 0 },

@ -13,7 +13,7 @@
static const char *description = I18N_NOOP("A little program to output installation paths"); static const char *description = I18N_NOOP("A little program to output installation paths");
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "expandvars", I18N_NOOP("expand ${prefix} and ${exec_prefix} in output"), 0 }, { "expandvars", I18N_NOOP("expand ${prefix} and ${exec_prefix} in output"), 0 },
{ "prefix", I18N_NOOP("Compiled in prefix for TDE libraries"), 0 }, { "prefix", I18N_NOOP("Compiled in prefix for TDE libraries"), 0 },

@ -39,13 +39,13 @@
#include <iostream> #include <iostream>
static const KCmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {
{ "d", 0, 0 }, { "d", 0, 0 },
{ "directory <dir>", I18N_NOOP("Directory to generate files in"), "." }, { "directory <dir>", I18N_NOOP("Directory to generate files in"), "." },
{ "+file.kcfg", I18N_NOOP("Input kcfg XML file"), 0 }, { "+file.kcfg", I18N_NOOP("Input kcfg XML file"), 0 },
{ "+file.kcfgc", I18N_NOOP("Code generation options file"), 0 }, { "+file.kcfgc", I18N_NOOP("Code generation options file"), 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };

@ -20,7 +20,7 @@ void test(TQDate & date);
static const char description[] = "KCalendarTest"; static const char description[] = "KCalendarTest";
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "help", I18N_NOOP("Prints this help"), 0 }, { "help", I18N_NOOP("Prints this help"), 0 },
{ "type hijri|gregorian|jalali|hebrew", I18N_NOOP("Supported calendar types"), 0 }, { "type hijri|gregorian|jalali|hebrew", I18N_NOOP("Supported calendar types"), 0 },

@ -11,13 +11,13 @@
static const char version[] = "v0.0.2 1999 (c) Waldo Bastian"; static const char version[] = "v0.0.2 1999 (c) Waldo Bastian";
static const char description[] = I18N_NOP("This is a test program."); static const char description[] = I18N_NOP("This is a test program.");
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "test", I18N_NOP("do a short test only, note that\n" { "test", I18N_NOP("do a short test only, note that\n"
"this is rather long comment"), 0 }, "this is rather long comment"), 0 },
{ "baud <baudrate>", I18N_NOP("set baudrate"), "9600" }, { "baud <baudrate>", I18N_NOP("set baudrate"), "9600" },
{ "+file(s)", I18N_NOP("Files to load"), 0 }, { "+file(s)", I18N_NOP("Files to load"), 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
#if 1 #if 1

@ -316,7 +316,7 @@ int main (int argc, char *argv[])
{ {
const char *version = "1.0"; const char *version = "1.0";
const char *description = "Unit test for md5, base64 encode/decode and uuencode/decode facilities"; const char *description = "Unit test for md5, base64 encode/decode and uuencode/decode facilities";
KCmdLineOptions options[] = TDECmdLineOptions options[] =
{ {
{ "c <digest>", "compare <digest> with the calculated digest for a string or file.", 0 }, { "c <digest>", "compare <digest> with the calculated digest for a string or file.", 0 },
{ "d", "decode the given string or file using base64", 0 }, { "d", "decode the given string or file using base64", 0 },
@ -331,7 +331,7 @@ int main (int argc, char *argv[])
{ "x", "uudecode the given string or file", 0 }, { "x", "uudecode the given string or file", 0 },
{ "z", "run a preset message-digest test", 0 }, { "z", "run a preset message-digest test", 0 },
{ "+command", "[input1, input2,...]", 0 }, { "+command", "[input1, input2,...]", 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
TDECmdLineArgs::init( argc, argv, "kmdcodectest", description, version ); TDECmdLineArgs::init( argc, argv, "kmdcodectest", description, version );

@ -28,7 +28,7 @@
--bg is aliased to --background but If you try it with --background or --bg is aliased to --background but If you try it with --background or
-background, you get the same thing. -background, you get the same thing.
in tdecore/kapplication.cpp, KCmdLineOption qt_options is defined and used in tdecore/kapplication.cpp, TDECmdLineOption qt_options is defined and used
by the static method Kapplication::addCmdLineOptions to add the Qt options by the static method Kapplication::addCmdLineOptions to add the Qt options
but its' entries look like this: but its' entries look like this:
@ -48,10 +48,10 @@ application palette (light and dark shades are\ncalculated)."), 0},
#include <kaboutdata.h> #include <kaboutdata.h>
#include <klocale.h> #include <klocale.h>
static const KCmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {
{ "hello ", I18N_NOOP("Says hello"), 0 }, { "hello ", I18N_NOOP("Says hello"), 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
int main(int argc, char *argv[]) int main(int argc, char *argv[])

@ -9,10 +9,10 @@
#include "java/kjavaapplet.h" #include "java/kjavaapplet.h"
#include "java/kjavaappletwidget.h" #include "java/kjavaappletwidget.h"
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "+[tdelibs_path]", "path to tdelibs directory", 0 }, { "+[tdelibs_path]", "path to tdelibs directory", 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
int main(int argc, char **argv) int main(int argc, char **argv)

@ -400,7 +400,7 @@ Value TDEHTMLPartFunction::call(ExecState *exec, Object &/*thisObj*/, const List
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "b", 0, 0 }, { "b", 0, 0 },
{ "base <base_dir>", "Directory containing tests, basedir and output directories.", 0}, { "base <base_dir>", "Directory containing tests, basedir and output directories.", 0},
@ -419,7 +419,7 @@ static KCmdLineOptions options[] =
{ "output <directory>", "Put output in <directory> instead of <base_dir>/output", 0 } , { "output <directory>", "Put output in <directory> instead of <base_dir>/output", 0 } ,
{ "+[base_dir]", "Directory containing tests,basedir and output directories. Only regarded if -b is not specified.", 0 } , { "+[base_dir]", "Directory containing tests,basedir and output directories. Only regarded if -b is not specified.", 0 } ,
{ "+[testcases]", "Relative path to testcase, or directory of testcases to be run (equivalent to -t).", 0 } , { "+[testcases]", "Relative path to testcase, or directory of testcases to be run (equivalent to -t).", 0 } ,
KCmdLineLastOption TDECmdLineLastOption
}; };
static bool existsDir(TQCString dir) static bool existsDir(TQCString dir)

@ -32,7 +32,7 @@
#include "domtreeview.h" #include "domtreeview.h"
#include <tdefiledialog.h> #include <tdefiledialog.h>
static KCmdLineOptions options[] = { { "+file", "url to open", 0 } , KCmdLineLastOption }; static TDECmdLineOptions options[] = { { "+file", "url to open", 0 } , TDECmdLineLastOption };
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {

@ -194,7 +194,7 @@ TQStringList FileProps::createKeyValueList( const KFileMetaInfoGroup& g,
// tdefile --mimetype --listsupported --listavailable --listpreferred --listwritable --getValue "key" --setValue "key=value" --allValues --preferredValues --dialog --quiet file [file...] // tdefile --mimetype --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 // "key" may be a list of keys, separated by commas
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "m", 0, 0 }, // short option for --mimetype { "m", 0, 0 }, // short option for --mimetype
{ "nomimetype", I18N_NOOP("Do not print the mimetype of the given file(s)"), 0 }, { "nomimetype", I18N_NOOP("Do not print the mimetype of the given file(s)"), 0 },
@ -253,7 +253,7 @@ static KCmdLineOptions options[] =
{ "+[files]", { "+[files]",
I18N_NOOP("The file (or a number of files) to operate on."), 0 }, I18N_NOOP("The file (or a number of files) to operate on."), 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };

@ -20,10 +20,10 @@
#include <klocale.h> #include <klocale.h>
#include <kcmdlineargs.h> #include <kcmdlineargs.h>
static const KCmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {
{ "+url", 0, 0 }, { "+url", 0, 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
int main( int argc, char **argv ) int main( int argc, char **argv )

@ -18,10 +18,10 @@
#include "smtp.h" #include "smtp.h"
static KCmdLineOptions options[] = { static TDECmdLineOptions options[] = {
{ "subject <argument>", I18N_NOOP("Subject line"), 0 }, { "subject <argument>", I18N_NOOP("Subject line"), 0 },
{ "recipient <argument>", I18N_NOOP("Recipient"), "submit@bugs.kde.org" }, { "recipient <argument>", I18N_NOOP("Recipient"), "submit@bugs.kde.org" },
KCmdLineLastOption TDECmdLineLastOption
}; };
void BugMailer::slotError(int errornum) { void BugMailer::slotError(int errornum) {

@ -29,10 +29,10 @@
#include <kprocess.h> #include <kprocess.h>
#include <ksimpleconfig.h> #include <ksimpleconfig.h>
static const KCmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {
{"+url", 0, 0}, {"+url", 0, 0},
KCmdLineLastOption TDECmdLineLastOption
}; };
int main(int argc, char **argv) int main(int argc, char **argv)

@ -49,13 +49,13 @@
static const char description[] = static const char description[] =
I18N_NOOP("KIO Exec - Opens remote files, watches modifications, asks for upload"); I18N_NOOP("KIO Exec - Opens remote files, watches modifications, asks for upload");
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "tempfiles", I18N_NOOP("Treat URLs as local files and delete them afterwards"), 0 }, { "tempfiles", I18N_NOOP("Treat URLs as local files and delete them afterwards"), 0 },
{ "suggestedfilename <file name>", I18N_NOOP("Suggested file name for the downloaded file"), 0 }, { "suggestedfilename <file name>", I18N_NOOP("Suggested file name for the downloaded file"), 0 },
{ "+command", I18N_NOOP("Command to execute"), 0 }, { "+command", I18N_NOOP("Command to execute"), 0 },
{ "+[URLs]", I18N_NOOP("URL(s) or local file(s) used for 'command'"), 0 }, { "+[URLs]", I18N_NOOP("URL(s) or local file(s) used for 'command'"), 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };

@ -16,10 +16,10 @@
#include "kdirwatchtest.h" #include "kdirwatchtest.h"
static const KCmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {
{"+[directory ...]", "Directory(ies) to watch", 0}, {"+[directory ...]", "Directory(ies) to watch", 0},
KCmdLineLastOption TDECmdLineLastOption
}; };

@ -38,10 +38,10 @@ int main(int argc, char **argv)
{ {
const char *version = "0.5"; const char *version = "0.5";
const char *description = "Unit test for .netrc and kionetrc parser."; const char *description = "Unit test for .netrc and kionetrc parser.";
KCmdLineOptions options[] = TDECmdLineOptions options[] =
{ {
{ "+command", "[url1,url2 ,...]", 0 }, { "+command", "[url1,url2 ,...]", 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
TDECmdLineArgs::init( argc, argv, "kionetrctest", description, version ); TDECmdLineArgs::init( argc, argv, "kionetrctest", description, version );

@ -23,10 +23,10 @@
#include <stdio.h> #include <stdio.h>
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "+filename", "the filename to test", 0 }, { "+filename", "the filename to test", 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
int main(int argc, char *argv[]) int main(int argc, char *argv[])

@ -5,10 +5,10 @@
#include <kcmdlineargs.h> #include <kcmdlineargs.h>
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "+url", "the path or url to the file/dir for which to show properties", 0 }, { "+url", "the path or url to the file/dir for which to show properties", 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
int main ( int argc, char** argv ) int main ( int argc, char** argv )

@ -145,10 +145,10 @@ static const char programName[] = I18N_NOOP("kurifiltertest");
static const char description[] = I18N_NOOP("Unit test for the URI filter plugin framework."); static const char description[] = I18N_NOOP("Unit test for the URI filter plugin framework.");
static const char version[] = "1.5"; static const char version[] = "1.5";
static const KCmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {
{ "s", I18N_NOOP("Use space as keyword delimeter for web shortcuts"), 0}, { "s", I18N_NOOP("Use space as keyword delimeter for web shortcuts"), 0},
KCmdLineLastOption TDECmdLineLastOption
}; };
int main(int argc, char **argv) int main(int argc, char **argv)

@ -9,7 +9,7 @@
#define I18N_NOOP #define I18N_NOOP
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "+file", "File name", 0 }, { "+file", "File name", 0 },
{ "addgroup ", "Add a group to a file", 0}, { "addgroup ", "Add a group to a file", 0},
@ -23,7 +23,7 @@
{ "set ", "Set the value of --item in --group", 0}, { "set ", "Set the value of --item in --group", 0},
{ "groups", "list the groups of this file", 0 }, { "groups", "list the groups of this file", 0 },
{ "mimetypeinfo ", "the mimetype info for a mimetype", 0 }, { "mimetypeinfo ", "the mimetype info for a mimetype", 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
void printKeyValues(KFileMetaInfo& info) void printKeyValues(KFileMetaInfo& info)

@ -57,10 +57,10 @@ void SpeedTest::finished(Job*) {
kapp->quit(); kapp->quit();
} }
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "+[URL]", "the URL to list", 0 }, { "+[URL]", "the URL to list", 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
int main(int argc, char **argv) { int main(int argc, char **argv) {

@ -480,7 +480,7 @@ void KioslaveTest::stopJob() {
static const char version[] = "v0.0.0 0000"; // :-) static const char version[] = "v0.0.0 0000"; // :-)
static const char description[] = "Test for tdeioslaves"; static const char description[] = "Test for tdeioslaves";
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "s", 0, 0 }, { "s", 0, 0 },
{ "src <src>", "Source URL", "" }, { "src <src>", "Source URL", "" },
@ -490,7 +490,7 @@ static KCmdLineOptions options[] =
{ "operation <operation>", "Operation (list,listrecursive,stat,get,put,copy,move,del,shred,mkdir)", "copy" }, { "operation <operation>", "Operation (list,listrecursive,stat,get,put,copy,move,del,shred,mkdir)", "copy" },
{ "p", 0, 0 }, { "p", 0, 0 },
{ "progress <progress>", "Progress Type (none,default,status)", "default" }, { "progress <progress>", "Progress Type (none,default,status)", "default" },
KCmdLineLastOption TDECmdLineLastOption
}; };
int main(int argc, char **argv) { int main(int argc, char **argv) {

@ -22,13 +22,13 @@
#include <kapplication.h> #include <kapplication.h>
#include <stdio.h> #include <stdio.h>
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "+query", "the query", 0 }, { "+query", "the query", 0 },
{ "+[genericServiceType]", "Application (default), or KParts/ReadOnlyPart", 0 }, { "+[genericServiceType]", "Application (default), or KParts/ReadOnlyPart", 0 },
{ "+[constraint]", "constraint", 0 }, { "+[constraint]", "constraint", 0 },
{ "+[preference]", "preference", 0 }, { "+[preference]", "preference", 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
int main( int argc, char **argv ) int main( int argc, char **argv )

@ -54,10 +54,10 @@ static const char description[] = I18N_NOOP("TDE HTTP cache maintenance tool");
static const char version[] = "1.0.0"; static const char version[] = "1.0.0";
static const KCmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {
{"clear-all", I18N_NOOP("Empty the cache"), 0}, {"clear-all", I18N_NOOP("Empty the cache"), 0},
KCmdLineLastOption TDECmdLineLastOption
}; };
struct FileInfo { struct FileInfo {

@ -31,13 +31,13 @@ static const char description[] =
static const char version[] = "1.0"; static const char version[] = "1.0";
static const KCmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {
{ "shutdown", I18N_NOOP("Shut down cookie jar"), 0 }, { "shutdown", I18N_NOOP("Shut down cookie jar"), 0 },
{ "remove <domain>", I18N_NOOP("Remove cookies for domain"), 0 }, { "remove <domain>", I18N_NOOP("Remove cookies for domain"), 0 },
{ "remove-all", I18N_NOOP("Remove all cookies"), 0 }, { "remove-all", I18N_NOOP("Remove all cookies"), 0 },
{ "reload-config", I18N_NOOP("Reload configuration file"), 0 }, { "reload-config", I18N_NOOP("Reload configuration file"), 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
extern "C" KDE_EXPORT int kdemain(int argc, char *argv[]) extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])

@ -39,10 +39,10 @@ static TQCString *nextYear;
static TDEConfig *config = 0; static TDEConfig *config = 0;
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "+testfile", "Regression test to run", 0}, { "+testfile", "Regression test to run", 0},
KCmdLineLastOption TDECmdLineLastOption
}; };
static void FAIL(const TQString &msg) static void FAIL(const TQString &msg)

@ -91,10 +91,10 @@ void Shell::slotFileOpen()
openURL( url ); openURL( url );
} }
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "+file(s)", "Files to load", 0 }, { "+file(s)", "Files to load", 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
static const char version[] = "v0.0.1 2000 (c) David Faure"; static const char version[] = "v0.0.1 2000 (c) David Faure";
static const char description[] = "This is a test shell for the kghostview part."; static const char description[] = "This is a test shell for the kghostview part.";

@ -24,10 +24,10 @@
#include <kcmdlineargs.h> #include <kcmdlineargs.h>
#include <kapplication.h> #include <kapplication.h>
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "+[file]", I18N_NOOP("Configuration file to load"), 0}, { "+[file]", I18N_NOOP("Configuration file to load"), 0},
KCmdLineLastOption TDECmdLineLastOption
}; };
extern "C" KDE_EXPORT int kdemain(int argc, char *argv[]) extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])

@ -5,11 +5,11 @@
#include <klocale.h> #include <klocale.h>
#include <kglobal.h> #include <kglobal.h>
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{ "tdeconfig", I18N_NOOP("Configure TDE Print"), 0 }, { "tdeconfig", I18N_NOOP("Configure TDE Print"), 0 },
{ "serverconfig", I18N_NOOP("Configure print server"), 0 }, { "serverconfig", I18N_NOOP("Configure print server"), 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
extern "C" KDE_EXPORT int kdemain(int argc, char *argv[]) extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])

@ -5,10 +5,10 @@
#include <kcmdlineargs.h> #include <kcmdlineargs.h>
#include <iostream> #include <iostream>
static const KCmdLineOptions options[] = static const TDECmdLineOptions options[] =
{ {
{ "+file", "The image file to open", 0 }, { "+file", "The image file to open", 0 },
KCmdLineLastOption TDECmdLineLastOption
}; };
int main(int argc, char**argv) int main(int argc, char**argv)

@ -37,12 +37,12 @@ static const char description[] =
static const char version[] = "0.1"; static const char version[] = "0.1";
static KCmdLineOptions options[] = static TDECmdLineOptions options[] =
{ {
{"query [regexp]", I18N_NOOP("Only run modules whose filenames match the regexp."), "^tdeunittest_.*\\.la$"}, {"query [regexp]", I18N_NOOP("Only run modules whose filenames match the regexp."), "^tdeunittest_.*\\.la$"},
{"folder [folder]", I18N_NOOP("Only run tests modules which are found in the folder. Use the query option to select modules."), "."}, {"folder [folder]", I18N_NOOP("Only run tests modules which are found in the folder. Use the query option to select modules."), "."},
{ "enable-dbgcap", I18N_NOOP("Disables debug capturing. You typically use this option when you use the GUI."), 0}, { "enable-dbgcap", I18N_NOOP("Disables debug capturing. You typically use this option when you use the GUI."), 0},
KCmdLineLastOption TDECmdLineLastOption
}; };

@ -143,7 +143,7 @@ SampleTest - 1 test passed, 1 test failed
* *
* static const char description[] = I18N_NOOP("SampleTests"); * static const char description[] = I18N_NOOP("SampleTests");
* static const char version[] = "0.1"; * static const char version[] = "0.1";
* static KCmdLineOptions options[] = { KCmdLineLastOption }; * static TDECmdLineOptions options[] = { TDECmdLineLastOption };
* *
* int main( int argc, char** argv ) * int main( int argc, char** argv )
* { * {

Loading…
Cancel
Save