Rename KCmd to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent 9df097f810
commit ea720a87cc

@ -23,9 +23,9 @@
#include "ui/kis_aboutdata.h"
static const KCmdLineOptions options[] = {
static const TDECmdLineOptions options[] = {
{ "+[file(s)]", I18N_NOOP("File(s) or URL(s) to open"), 0 },
KCmdLineLastOption
TDECmdLineLastOption
};
extern "C" KRITA_EXPORT int kdemain(int argc, char **argv)

@ -26,10 +26,10 @@
#include "example_aboutdata.h"
#include <koffice_export.h>
static const KCmdLineOptions options[]=
static const TDECmdLineOptions options[]=
{
{"+[file]", I18N_NOOP("File to open"),0},
KCmdLineLastOption
TDECmdLineLastOption
};
extern "C" EXAMPLE_EXPORT int kdemain( int argc, char **argv )

@ -28,10 +28,10 @@
#include "karbon_aboutdata.h"
static const KCmdLineOptions options[] =
static const TDECmdLineOptions options[] =
{
{ "+[file]", I18N_NOOP( "File to open" ), 0 } ,
KCmdLineLastOption
TDECmdLineLastOption
};
extern "C" KARBONBASE_EXPORT int kdemain( int argc, char* argv[] )

@ -27,10 +27,10 @@ using namespace KChart;
namespace KChart
{
static const KCmdLineOptions options[]=
static const TDECmdLineOptions options[]=
{
{"+[file]", I18N_NOOP("File to open"),0},
KCmdLineLastOption
TDECmdLineLastOption
};
} //namespace KChart

@ -25,7 +25,7 @@
#include <kcmdlineargs.h>
#include <klocale.h>
static KCmdLineOptions options[] =
static TDECmdLineOptions options[] =
{
{ ":", I18N_NOOP("Options related to entire projects:"), 0 },
{ "createdb", I18N_NOOP(
@ -174,7 +174,7 @@ static KCmdLineOptions options[] =
"or name of a Kexi database\n"
"project on a server to open."), 0 },
// INSERT YOUR COMMANDLINE OPTIONS HERE
KCmdLineLastOption
TDECmdLineLastOption
};
#endif

@ -3592,7 +3592,7 @@ KexiDB/parser
- Connection::createTable() now also allows table replacing
- Connection::storeObjectSchemaData() now reuses schema's id if > 0
NEWAPI Test
- now KCmdLineOptions are used, see README
- now TDECmdLineOptions are used, see README
- "parser" test added
KexiTableView
- KexiTableViewPropertyBuffer: a fix for maintaining `dirty' flag

@ -29,10 +29,10 @@ static const char *description =
static const char *version = "0.3";
static KCmdLineOptions options[] =
static TDECmdLineOptions options[] =
{
{ "+[URL]", I18N_NOOP( "Document to open" ), 0 },
KCmdLineLastOption
TDECmdLineLastOption
};
int main(int argc, char **argv)

@ -29,7 +29,7 @@
using namespace KexiDB;
static KCmdLineOptions predefinedOptions[] =
static TDECmdLineOptions predefinedOptions[] =
{
{ "drv", 0, 0 },
{ "driver <name>", I18N_NOOP("Database driver name"), 0 },
@ -42,7 +42,7 @@ static KCmdLineOptions predefinedOptions[] =
{ "port <number>", I18N_NOOP("Server's port number"), 0 },
{ "s", 0, 0 },
{ "local-socket <filename>", I18N_NOOP("Server's local socket filename"), 0 },
KCmdLineLastOption
TDECmdLineLastOption
};
//-----------------------------------------
@ -62,7 +62,7 @@ public:
}
delete instance;
for (KCmdLineOptions *optionsPtr = allOptions; optionsPtr->name; optionsPtr++) {
for (TDECmdLineOptions *optionsPtr = allOptions; optionsPtr->name; optionsPtr++) {
delete optionsPtr->name;
delete optionsPtr->description;
delete optionsPtr->def;
@ -71,7 +71,7 @@ public:
}
KexiDB::DriverManager manager;
KCmdLineOptions *allOptions;
TDECmdLineOptions *allOptions;
TDEInstance* instance;
ConnectionData connData;
TQGuardedPtr<Connection> conn;
@ -80,7 +80,7 @@ public:
//-----------------------------------------
SimpleCommandLineApp::SimpleCommandLineApp(
int argc, char** argv, KCmdLineOptions *options,
int argc, char** argv, TDECmdLineOptions *options,
const char *programName, const char *version,
const char *shortDescription, int licenseType,
const char *copyrightStatement, const char *text,
@ -96,18 +96,18 @@ SimpleCommandLineApp::SimpleCommandLineApp(
homePageAddress, bugsEmailAddress));
int predefinedOptionsCount = 0;
for (KCmdLineOptions *optionsPtr = predefinedOptions; optionsPtr->name; optionsPtr++, predefinedOptionsCount++)
for (TDECmdLineOptions *optionsPtr = predefinedOptions; optionsPtr->name; optionsPtr++, predefinedOptionsCount++)
;
int userOptionsCount = 0;
for (KCmdLineOptions *optionsPtr = options; optionsPtr->name; optionsPtr++, userOptionsCount++)
for (TDECmdLineOptions *optionsPtr = options; optionsPtr->name; optionsPtr++, userOptionsCount++)
;
d->instance = new TDEInstance(appName);
// join the predefined options and user options
d->allOptions = new KCmdLineOptions[predefinedOptionsCount + userOptionsCount + 1];
KCmdLineOptions *allOptionsPtr = d->allOptions;
for (KCmdLineOptions *optionsPtr = predefinedOptions; optionsPtr->name; optionsPtr++, allOptionsPtr++) {
d->allOptions = new TDECmdLineOptions[predefinedOptionsCount + userOptionsCount + 1];
TDECmdLineOptions *allOptionsPtr = d->allOptions;
for (TDECmdLineOptions *optionsPtr = predefinedOptions; optionsPtr->name; optionsPtr++, allOptionsPtr++) {
allOptionsPtr->name = tqstrdup(optionsPtr->name);
allOptionsPtr->description = tqstrdup(optionsPtr->description);
if (optionsPtr == predefinedOptions) //first row == drv
@ -115,7 +115,7 @@ SimpleCommandLineApp::SimpleCommandLineApp(
else
allOptionsPtr->def = tqstrdup(optionsPtr->def);
}
for (KCmdLineOptions *optionsPtr = options; optionsPtr->name; optionsPtr++, allOptionsPtr++) {
for (TDECmdLineOptions *optionsPtr = options; optionsPtr->name; optionsPtr++, allOptionsPtr++) {
allOptionsPtr->name = tqstrdup(optionsPtr->name);
allOptionsPtr->description = tqstrdup(optionsPtr->description);
allOptionsPtr->def = tqstrdup(optionsPtr->def);

@ -25,7 +25,7 @@
#include <kaboutdata.h>
struct KCmdLineOptions;
struct TDECmdLineOptions;
namespace KexiDB
{
@ -47,7 +47,7 @@ namespace KexiDB
{
public:
SimpleCommandLineApp(
int argc, char** argv, KCmdLineOptions *options, const char *programName,
int argc, char** argv, TDECmdLineOptions *options, const char *programName,
const char *version, const char *shortDescription=0,
int licenseType=TDEAboutData::License_Unknown,
const char *copyrightStatement=0, const char *text=0,

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

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

@ -54,7 +54,7 @@ TQGuardedPtr<KexiDB::Driver> driver;
TDEApplication *app = 0;
TDEInstance *instance = 0;
static KCmdLineOptions options[] =
static TDECmdLineOptions options[] =
{
{ "test <test_name>",
"Available tests:\n"
@ -89,7 +89,7 @@ static KCmdLineOptions options[] =
{ "+driver_name", "Driver name", 0},
{ "+[db_name]", "Database name", 0},
{ "+[sql_statement]", "Optional SQL statement (for parser test)", 0},
KCmdLineLastOption
TDECmdLineLastOption
};
#include "dbcreation_test.h"

@ -25,10 +25,10 @@
#include "kformula_aboutdata.h"
static const KCmdLineOptions options[]=
static const TDECmdLineOptions options[]=
{
{"+[file]", I18N_NOOP("File to open"),0},
KCmdLineLastOption
TDECmdLineLastOption
};
extern "C" KFORMULA_EXPORT int kdemain( int argc, char **argv )

@ -25,10 +25,10 @@
#include "kivio_aboutdata.h"
static const KCmdLineOptions options[]=
static const TDECmdLineOptions options[]=
{
{"+[file]", I18N_NOOP("File to open"),0},
KCmdLineLastOption
TDECmdLineLastOption
};
extern "C" KIVIO_EXPORT int kdemain( int argc, char **argv )

@ -27,10 +27,10 @@
namespace KPlato
{
static const KCmdLineOptions options[]=
static const TDECmdLineOptions options[]=
{
{"+[file]", I18N_NOOP("File to open"),0},
KCmdLineLastOption
TDECmdLineLastOption
};
} //KPlato namespace

@ -26,10 +26,10 @@
#include <klocale.h>
static const KCmdLineOptions options[]=
static const TDECmdLineOptions options[]=
{
{"+[file]", I18N_NOOP("File to open"),0},
KCmdLineLastOption
TDECmdLineLastOption
};
extern "C" KPRESENTER_EXPORT int kdemain( int argc, char **argv )

@ -25,10 +25,10 @@
using namespace KSpread;
static const KCmdLineOptions options[]=
static const TDECmdLineOptions options[]=
{
{"+[file]", I18N_NOOP("File to open"),0},
KCmdLineLastOption
TDECmdLineLastOption
};
extern "C" KSPREAD_EXPORT int kdemain( int argc, char **argv )

@ -26,11 +26,11 @@
#include "kudesigner_aboutdata.h"
static const KCmdLineOptions options[] =
static const TDECmdLineOptions options[] =
{
{"+[file]", I18N_NOOP( "File to open" ), 0
},
KCmdLineLastOption
TDECmdLineLastOption
};
extern "C" KUGARDESIGNER_EXPORT int kdemain( int argc, char **argv )

@ -21,11 +21,11 @@
#include "kugar_about.h"
static KCmdLineOptions options[] =
static TDECmdLineOptions options[] =
{
{ "+[File]", I18N_NOOP( "File to open" ), 0 },
// INSERT YOUR COMMANDLINE OPTIONS HERE
KCmdLineLastOption
TDECmdLineLastOption
};
extern "C" KUGAR_EXPORT int kdemain( int argc, char *argv[] )

@ -22,10 +22,10 @@
#include <dcopclient.h>
#include "KWAboutData.h"
static const KCmdLineOptions options[]=
static const TDECmdLineOptions options[]=
{
{"+[file]", I18N_NOOP("File to open"),0},
KCmdLineLastOption
TDECmdLineLastOption
};
extern "C" KWORD_EXPORT int kdemain( int argc, char **argv )

@ -229,9 +229,9 @@ void ScrollView::cursorChanged(bool visible, bool /*selecting*/)
}
static const KCmdLineOptions options[]= {
static const TDECmdLineOptions options[]= {
{ "+file", "File to open", 0 },
KCmdLineLastOption
TDECmdLineLastOption
};
int main(int argc, char** argv)

@ -24,7 +24,7 @@ which is used to locate the application's own data
Q: What is the "+[file]" option passed to TDECmdLineArgs?
A: KCmdLineOptions describe the TDECmdLineArgs. "+[file]" means that the
A: TDECmdLineOptions describe the TDECmdLineArgs. "+[file]" means that the
command line arguments can be one or more file names, and that these
arguments are optional.

@ -36,12 +36,12 @@
void tqt_generate_epsf( bool b );
static const KCmdLineOptions options[]=
static const TDECmdLineOptions options[]=
{
{"print", I18N_NOOP("Only print and exit"),0},
{"template", I18N_NOOP("Open a new document with a template"), 0},
{"dpi <dpiX,dpiY>", I18N_NOOP("Override display DPI"), 0},
KCmdLineLastOption
TDECmdLineLastOption
};
bool KoApplication::m_starting = true;

@ -27,11 +27,11 @@ static const char description[] = "A test application for the KoProperty library
static const char version[] = "0.2";
static KCmdLineOptions options[] =
static TDECmdLineOptions options[] =
{
{ "flat", "Flat display: don't display groups\n(useful for testing)", 0 },
{ "ro", "Set all properties as read-only:\n(useful for testing read-only mode)", 0 },
KCmdLineLastOption
TDECmdLineLastOption
};
int main(int argc, char **argv)

@ -112,9 +112,9 @@ int main(int argc, char **argv)
// Initialize command line args
TDECmdLineArgs::init(argc, argv, &about);
// Tell which options are supported and parse them.
static KCmdLineOptions options[] = {
static TDECmdLineOptions options[] = {
{ "+file", I18N_NOOP("Scriptfile"), 0 },
KCmdLineLastOption
TDECmdLineLastOption
};
TDECmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

@ -53,7 +53,7 @@ TDEApplication *app = 0;
static KCmdLineOptions options[] =
static TDECmdLineOptions options[] =
{
{ "interpreter <interpretername>", I18N_NOOP("Name of the interpreter being used"), "python" },
{ "scriptfile <filename>", I18N_NOOP("Script file to execute with the defined interpreter"), "testcase.py" },

@ -35,7 +35,7 @@
#include "koconverter.h"
static const KCmdLineOptions options[]=
static const TDECmdLineOptions options[]=
{
{"+in", I18N_NOOP("Input file"),0},
{"+out", I18N_NOOP("Output file"),0},
@ -43,7 +43,7 @@ static const KCmdLineOptions options[]=
{"batch", I18N_NOOP("Batch mode: do not show dialogs"),0},
{"interactive", I18N_NOOP("Interactive mode: show dialogs (default)"),0},
{"mimetype <mime>", I18N_NOOP("Mimetype of the output file"),0},
KCmdLineLastOption
TDECmdLineLastOption
};
bool convert( const KURL & uIn, const TQString & /*inputFormat*/, const KURL & uOut, const TQString & outputFormat, const bool batch )

@ -26,10 +26,10 @@
#include <kglobal.h>
#include <klocale.h>
#include <koffice_export.h>
static KCmdLineOptions options[] =
static TDECmdLineOptions options[] =
{
{ "+[term]", I18N_NOOP("Term to search for when starting up"), 0 },
KCmdLineLastOption
TDECmdLineLastOption
};
extern "C" KOFFICETOOLS_EXPORT int kdemain(int argc, char **argv)

Loading…
Cancel
Save