|
|
@ -690,14 +690,14 @@ KCmdLineArgs::parseAllArgs()
|
|
|
|
* Return argc
|
|
|
|
* Return argc
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
int *
|
|
|
|
int *
|
|
|
|
KCmdLineArgs::qt_argc()
|
|
|
|
KCmdLineArgs::tqt_argc()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// if (!argsList)
|
|
|
|
// if (!argsList)
|
|
|
|
// KApplication::addCmdLineOptions(); // Lazy bastards!
|
|
|
|
// KApplication::addCmdLineOptions(); // Lazy bastards!
|
|
|
|
|
|
|
|
|
|
|
|
static int qt_argc = -1;
|
|
|
|
static int tqt_argc = -1;
|
|
|
|
if( qt_argc != -1 )
|
|
|
|
if( tqt_argc != -1 )
|
|
|
|
return &qt_argc;
|
|
|
|
return &tqt_argc;
|
|
|
|
|
|
|
|
|
|
|
|
KCmdLineArgs *args = parsedArgs("qt");
|
|
|
|
KCmdLineArgs *args = parsedArgs("qt");
|
|
|
|
assert(args); // No qt options have been added!
|
|
|
|
assert(args); // No qt options have been added!
|
|
|
@ -711,8 +711,8 @@ KCmdLineArgs::qt_argc()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
assert(argc >= (args->count()+1));
|
|
|
|
assert(argc >= (args->count()+1));
|
|
|
|
qt_argc = args->count() +1;
|
|
|
|
tqt_argc = args->count() +1;
|
|
|
|
return &qt_argc;
|
|
|
|
return &tqt_argc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -721,14 +721,14 @@ KCmdLineArgs::qt_argc()
|
|
|
|
* Return argv
|
|
|
|
* Return argv
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
char ***
|
|
|
|
char ***
|
|
|
|
KCmdLineArgs::qt_argv()
|
|
|
|
KCmdLineArgs::tqt_argv()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// if (!argsList)
|
|
|
|
// if (!argsList)
|
|
|
|
// KApplication::addCmdLineOptions(); // Lazy bastards!
|
|
|
|
// KApplication::addCmdLineOptions(); // Lazy bastards!
|
|
|
|
|
|
|
|
|
|
|
|
static char** qt_argv;
|
|
|
|
static char** tqt_argv;
|
|
|
|
if( qt_argv != NULL )
|
|
|
|
if( tqt_argv != NULL )
|
|
|
|
return &qt_argv;
|
|
|
|
return &tqt_argv;
|
|
|
|
|
|
|
|
|
|
|
|
KCmdLineArgs *args = parsedArgs("qt");
|
|
|
|
KCmdLineArgs *args = parsedArgs("qt");
|
|
|
|
assert(args); // No qt options have been added!
|
|
|
|
assert(args); // No qt options have been added!
|
|
|
@ -741,16 +741,16 @@ KCmdLineArgs::qt_argv()
|
|
|
|
exit(255);
|
|
|
|
exit(255);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
qt_argv = new char*[ args->count() + 2 ];
|
|
|
|
tqt_argv = new char*[ args->count() + 2 ];
|
|
|
|
qt_argv[ 0 ] = tqstrdup( appName());
|
|
|
|
tqt_argv[ 0 ] = tqstrdup( appName());
|
|
|
|
int i = 0;
|
|
|
|
int i = 0;
|
|
|
|
for(; i < args->count(); i++)
|
|
|
|
for(; i < args->count(); i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
qt_argv[i+1] = tqstrdup((char *) args->arg(i));
|
|
|
|
tqt_argv[i+1] = tqstrdup((char *) args->arg(i));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
qt_argv[i+1] = 0;
|
|
|
|
tqt_argv[i+1] = 0;
|
|
|
|
|
|
|
|
|
|
|
|
return &qt_argv;
|
|
|
|
return &tqt_argv;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|