summaryrefslogtreecommitdiffstats
path: root/src/common/nokde/nokde_kcmdlineargs.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
commit0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch)
treeb95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/common/nokde/nokde_kcmdlineargs.cpp
parentb79a2c28534cf09987eeeba3077fff9236df182a (diff)
downloadpiklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz
piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip
TQt4 port piklab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/common/nokde/nokde_kcmdlineargs.cpp')
-rw-r--r--src/common/nokde/nokde_kcmdlineargs.cpp304
1 files changed, 152 insertions, 152 deletions
diff --git a/src/common/nokde/nokde_kcmdlineargs.cpp b/src/common/nokde/nokde_kcmdlineargs.cpp
index 7f026fe..f06f20e 100644
--- a/src/common/nokde/nokde_kcmdlineargs.cpp
+++ b/src/common/nokde/nokde_kcmdlineargs.cpp
@@ -32,23 +32,23 @@
#include <limits.h>
#endif
-#include <qdir.h>
-#include <qfile.h>
-#include <qurl.h>
-
-#include <qstringlist.h>
-#if QT_VERSION<0x040000
-# include <qasciidict.h>
-# include <qstrlist.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqurl.h>
+
+#include <tqstringlist.h>
+#if [[[TQT_VERSION IS DEPRECATED]]]<0x040000
+# include <tqasciidict.h>
+# include <tqstrlist.h>
#else
-# include <Qt3Support/Q3StrList>
-# define QGList Q3GList
-# define QStrList Q3StrList
-# include <Qt3Support/Q3AsciiDict>
-# define QGDict Q3GDict
-# define QAsciiDict Q3AsciiDict
-# include <Qt3Support/Q3PtrCollection>
-# define QPtrCollection Q3PtrCollection
+# include <TQt3Support/Q3StrList>
+# define TQGList Q3GList
+# define TQStrList Q3StrList
+# include <TQt3Support/Q3AsciiDict>
+# define TQGDict Q3GDict
+# define TQAsciiDict Q3AsciiDict
+# include <TQt3Support/Q3PtrCollection>
+# define TQPtrCollection Q3PtrCollection
#endif
@@ -60,47 +60,47 @@
//#include <kstringhandler.h>
//#include <kstaticdeleter.h>
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
#define DISPLAY "DISPLAY"
-#elif defined(Q_WS_QWS)
-#define DISPLAY "QWS_DISPLAY"
+#elif defined(TQ_WS_TQWS)
+#define DISPLAY "TQWS_DISPLAY"
#endif
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
#include <win32_utils.h>
#endif
-template class QAsciiDict<QCString>;
-template class QPtrList<KCmdLineArgs>;
+template class TQAsciiDict<TQCString>;
+template class TQPtrList<KCmdLineArgs>;
-class KCmdLineParsedOptions : public QAsciiDict<QCString>
+class KCmdLineParsedOptions : public TQAsciiDict<TQCString>
{
public:
KCmdLineParsedOptions()
- : QAsciiDict<QCString>( 7 ) { }
+ : TQAsciiDict<TQCString>( 7 ) { }
// WABA: Huh?
// The compiler doesn't find KCmdLineParsedOptions::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)
- QDataStream& save( QDataStream &s) const
- { return QGDict::write(s); }
+ TQDataStream& save( TQDataStream &s) const
+ { return TQGDict::write(s); }
- QDataStream& load( QDataStream &s)
- { return QGDict::read(s); }
+ TQDataStream& load( TQDataStream &s)
+ { return TQGDict::read(s); }
protected:
- virtual QDataStream& write( QDataStream &s, QPtrCollection::Item data) const
+ virtual TQDataStream& write( TQDataStream &s, TQPtrCollection::Item data) const
{
- QCString *str = (QCString *) data;
+ TQCString *str = (TQCString *) data;
s << (*str);
return s;
}
- virtual QDataStream& read( QDataStream &s, QPtrCollection::Item &item)
+ virtual TQDataStream& read( TQDataStream &s, TQPtrCollection::Item &item)
{
- QCString *str = new QCString;
+ TQCString *str = new TQCString;
s >> (*str);
item = (void *)str;
return s;
@@ -108,20 +108,20 @@ protected:
};
-class KCmdLineParsedArgs : public QStrList
+class KCmdLineParsedArgs : public TQStrList
{
public:
KCmdLineParsedArgs()
- : QStrList( true ) { }
- QDataStream& save( QDataStream &s) const
- { return QGList::write(s); }
+ : TQStrList( true ) { }
+ TQDataStream& save( TQDataStream &s) const
+ { return TQGList::write(s); }
- QDataStream& load( QDataStream &s)
- { return QGList::read(s); }
+ TQDataStream& load( TQDataStream &s)
+ { return TQGList::read(s); }
};
-class KCmdLineArgsList: public QPtrList<KCmdLineArgs>
+class KCmdLineArgsList: public TQPtrList<KCmdLineArgs>
{
public:
KCmdLineArgsList() { }
@@ -201,16 +201,16 @@ KCmdLineArgs::init(int _argc, char **_argv, const KAboutData *_about, bool /*noK
parsed = false;
mCwd = /*mCwdd.setObject(mCwd, */new char [PATH_MAX+1];//, true);
getcwd(mCwd, PATH_MAX);
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
win32_slashify(mCwd, PATH_MAX);
#endif
// if (!noKApp)
// KApplication::addCmdLineOptions();
}
-QString KCmdLineArgs::cwd()
+TQString KCmdLineArgs::cwd()
{
- return QFile::decodeName(QCString(mCwd));
+ return TQFile::decodeName(TQCString(mCwd));
}
const char * KCmdLineArgs::appName()
@@ -252,16 +252,16 @@ KCmdLineArgs::addCmdLineOptions( const KCmdLineOptions *options, const char *nam
}
void
-KCmdLineArgs::saveAppArgs( QDataStream &ds)
+KCmdLineArgs::saveAppArgs( TQDataStream &ds)
{
if (!parsed)
parseAllArgs();
- // Remove Qt and KDE options.
+ // Remove TQt and KDE options.
removeArgs("qt");
removeArgs("kde");
- QCString qCwd = mCwd;
+ TQCString qCwd = mCwd;
ds << qCwd;
uint count = argsList ? argsList->count() : 0;
@@ -272,15 +272,15 @@ KCmdLineArgs::saveAppArgs( QDataStream &ds)
KCmdLineArgs *args;
for(args = argsList->first(); args; args = argsList->next())
{
- ds << QCString(args->id);
+ ds << TQCString(args->id);
args->save(ds);
}
}
void
-KCmdLineArgs::loadAppArgs( QDataStream &ds)
+KCmdLineArgs::loadAppArgs( TQDataStream &ds)
{
- // Remove Qt and KDE options.
+ // Remove TQt and KDE options.
removeArgs("qt");
removeArgs("kde");
@@ -295,7 +295,7 @@ KCmdLineArgs::loadAppArgs( QDataStream &ds)
if (ds.atEnd())
return;
- QCString qCwd;
+ TQCString qCwd;
ds >> qCwd;
delete [] mCwd;
@@ -307,7 +307,7 @@ KCmdLineArgs::loadAppArgs( QDataStream &ds)
while(count--)
{
- QCString id;
+ TQCString id;
ds >> id;
assert( argsList );
for(args = argsList->first(); args; args = argsList->next())
@@ -367,7 +367,7 @@ void KCmdLineArgs::removeArgs(const char *id)
* +4 - no more options follow // !fork
*/
static int
-findOption(const KCmdLineOptions *options, QCString &opt,
+findOption(const KCmdLineOptions *options, TQCString &opt,
const char *&opt_name, const char *&def, bool &enabled)
{
int result;
@@ -407,11 +407,11 @@ findOption(const KCmdLineOptions *options, QCString &opt,
options++;
if (!options->name)
return result+0;
- QCString nextOption = options->name;
-# if QT_VERSION<0x040000
- int p = nextOption.find(' ');
+ TQCString nextOption = options->name;
+# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000
+ int p = nextOption.tqfind(' ');
#else
- int p = QString(nextOption).indexOf(' ');
+ int p = TQString(nextOption).indexOf(' ');
#endif
if (p > 0)
nextOption = nextOption.left(p);
@@ -443,16 +443,16 @@ findOption(const KCmdLineOptions *options, QCString &opt,
void
-KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled, bool &moreOptions)
+KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled, bool &moreOptions)
{
KCmdLineArgs *args = argsList->first();
const char *opt_name;
const char *def;
- QCString argument;
-# if QT_VERSION<0x040000
- int j = opt.find('=');
+ TQCString argument;
+# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000
+ int j = opt.tqfind('=');
#else
- int j = QString(opt).indexOf('=');
+ int j = TQString(opt).indexOf('=');
#endif
if (j != -1)
{
@@ -476,7 +476,7 @@ KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled,
int p = 1;
while (true)
{
- QCString singleCharOption = " ";
+ TQCString singleCharOption = " ";
singleCharOption[0] = _opt[p];
args = argsList->first();
while (args)
@@ -518,7 +518,7 @@ KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled,
if (ignoreUnknown)
return;
enable_i18n();
- usage( i18n("Unknown option '%1'.").arg(QString::fromLocal8Bit(_opt)));
+ usage( i18n("Unknown option '%1'.").tqarg(TQString::fromLocal8Bit(_opt)));
}
if ((result & 4) != 0)
@@ -534,7 +534,7 @@ KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled,
if (ignoreUnknown)
return;
enable_i18n();
- usage( i18n("Unknown option '%1'.").arg(QString::fromLocal8Bit(_opt)));
+ usage( i18n("Unknown option '%1'.").tqarg(TQString::fromLocal8Bit(_opt)));
}
if (argument.isEmpty())
{
@@ -542,7 +542,7 @@ KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled,
if (i >= argc)
{
enable_i18n();
- usage( i18n("'%1' missing.").arg( opt_name));
+ usage( i18n("'%1' missing.").tqarg( opt_name));
}
argument = argv[i];
}
@@ -555,12 +555,12 @@ KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled,
}
void
-KCmdLineArgs::printQ(const QString &msg)
+KCmdLineArgs::printQ(const TQString &msg)
{
-# if QT_VERSION<0x040000
- QCString localMsg = msg.local8Bit();
+# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000
+ TQCString localMsg = msg.local8Bit();
#else
- QCString localMsg = msg.toLocal8Bit();
+ TQCString localMsg = msg.toLocal8Bit();
#endif
fprintf(stdout, "%s", localMsg.data());
}
@@ -618,10 +618,10 @@ KCmdLineArgs::parseAllArgs()
else if ( (::qstrcmp(option, "version") == 0) ||
(::qstrcmp(option, "v") == 0))
{
- printQ( QString("Qt: %1\n").arg(qVersion()));
-// printQ( QString("KDE: %1\n").arg(KDE_VERSION_STRING));
- printQ( QString("%1: %2\n").
- arg(about->programName()).arg(about->version()));
+ printQ( TQString("TQt: %1\n").tqarg(qVersion()));
+// printQ( TQString("KDE: %1\n").tqarg(KDE_VERSION_STRING));
+ printQ( TQString("%1: %2\n").
+ arg(about->programName()).tqarg(about->version()));
exit(0);
} else if ( (::qstrcmp(option, "license") == 0) )
{
@@ -632,26 +632,26 @@ KCmdLineArgs::parseAllArgs()
} else if ( ::qstrcmp( option, "author") == 0 ) {
enable_i18n();
if ( about ) {
- const QValueList<KAboutPerson> authors = about->authors();
+ const TQValueList<KAboutPerson> authors = about->authors();
if ( !authors.isEmpty() ) {
- QString authorlist;
- for (QValueList<KAboutPerson>::ConstIterator it = authors.begin(); it != authors.end(); ++it ) {
- QString email;
+ TQString authorlist;
+ for (TQValueList<KAboutPerson>::ConstIterator it = authors.begin(); it != authors.end(); ++it ) {
+ TQString email;
if ( !(*it).emailAddress().isEmpty() )
email = " <" + (*it).emailAddress() + ">";
- authorlist += QString(" ") + (*it).name() + email + "\n";
+ authorlist += TQString(" ") + (*it).name() + email + "\n";
}
- printQ( i18n("the 2nd argument is a list of name+address, one on each line","%1 was written by\n%2").arg ( QString(about->programName()) ).arg( authorlist ) );
+ printQ( i18n("the 2nd argument is a list of name+address, one on each line","%1 was written by\n%2").arg ( TQString(about->programName()) ).tqarg( authorlist ) );
}
} else {
- printQ( i18n("%1 was written by somebody who wants to remain anonymous.").arg(about->programName()) );
+ printQ( i18n("%1 was written by somebody who wants to remain anonymous.").tqarg(about->programName()) );
}
if (!about->bugAddress().isEmpty())
{
if (about->bugAddress() == "submit@bugs.kde.org")
printQ( i18n( "Please use http://bugs.kde.org to report bugs, do not mail the authors directly.\n" ) );
else
- printQ( i18n( "Please use %1 to report bugs, do not mail the authors directly.\n" ).arg(about->bugAddress()) );
+ printQ( i18n( "Please use %1 to report bugs, do not mail the authors directly.\n" ).tqarg(about->bugAddress()) );
}
exit(0);
} else {
@@ -671,7 +671,7 @@ KCmdLineArgs::parseAllArgs()
if (ignoreUnknown)
continue;
enable_i18n();
- usage( i18n("Unexpected argument '%1'.").arg(QString::fromLocal8Bit(argv[i])));
+ usage( i18n("Unexpected argument '%1'.").tqarg(TQString::fromLocal8Bit(argv[i])));
}
else
{
@@ -768,20 +768,20 @@ KCmdLineArgs::enable_i18n()
}
void
-KCmdLineArgs::usage(const QString &error)
+KCmdLineArgs::usage(const TQString &error)
{
// assert(KGlobal::_locale);
-# if QT_VERSION<0x040000
- QCString localError = error.local8Bit();
+# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000
+ TQCString localError = error.local8Bit();
#else
- QCString localError = error.toLocal8Bit();
+ TQCString localError = error.toLocal8Bit();
#endif
if (localError[error.length()-1] == '\n')
localError = localError.left(error.length()-1);
fprintf(stderr, "%s: %s\n", argv[0], localError.data());
- QString tmp = i18n("Use --help to get a list of available command line options.");
-# if QT_VERSION<0x040000
+ TQString tmp = i18n("Use --help to get a list of available command line options.");
+# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000
localError = tmp.local8Bit();
#else
localError = tmp.toLocal8Bit();
@@ -797,11 +797,11 @@ KCmdLineArgs::usage(const char *id)
assert(argsList != 0); // It's an error to call usage(...) without
// having done addCmdLineOptions first!
- QString optionFormatString = " %1 %2\n";
- QString optionFormatStringDef = " %1 %2 [%3]\n";
- QString optionHeaderString = i18n("\n%1:\n");
- QString tmp;
- QString usage;
+ TQString optionFormatString = " %1 %2\n";
+ TQString optionFormatStringDef = " %1 %2 [%3]\n";
+ TQString optionHeaderString = i18n("\n%1:\n");
+ TQString tmp;
+ TQString usage;
KCmdLineArgs *args = argsList->last();
@@ -815,7 +815,7 @@ KCmdLineArgs::usage(const char *id)
{
if (args->name)
{
- usage = i18n("[%1-options]").arg(args->name)+" "+usage;
+ usage = i18n("[%1-options]").tqarg(args->name)+" "+usage;
}
args = argsList->prev();
}
@@ -835,30 +835,30 @@ KCmdLineArgs::usage(const char *id)
}
}
- printQ(i18n("Usage: %1 %2\n").arg(argv[0]).arg(usage));
+ printQ(i18n("Usage: %1 %2\n").tqarg(argv[0]).tqarg(usage));
printQ("\n"+about->shortDescription()+"\n");
- printQ(optionHeaderString.arg(i18n("Generic options")));
- printQ(optionFormatString.arg("--help", -25).arg(i18n("Show help about options")));
+ printQ(optionHeaderString.tqarg(i18n("Generic options")));
+ printQ(optionFormatString.tqarg("--help", -25).tqarg(i18n("Show help about options")));
args = argsList->first();
while(args)
{
if (args->name && args->id)
{
- QString option = QString("--help-%1").arg(args->id);
- QString desc = i18n("Show %1 specific options").arg(args->name);
+ TQString option = TQString("--help-%1").tqarg(args->id);
+ TQString desc = i18n("Show %1 specific options").tqarg(args->name);
- printQ(optionFormatString.arg(option, -25).arg(desc));
+ printQ(optionFormatString.tqarg(option, -25).tqarg(desc));
}
args = argsList->next();
}
- printQ(optionFormatString.arg("--help-all",-25).arg(i18n("Show all options")));
- printQ(optionFormatString.arg("--author",-25).arg(i18n("Show author information")));
- printQ(optionFormatString.arg("-v, --version",-25).arg(i18n("Show version information")));
- printQ(optionFormatString.arg("--license",-25).arg(i18n("Show license information")));
- printQ(optionFormatString.arg("--", -25).arg(i18n("End of options")));
+ printQ(optionFormatString.tqarg("--help-all",-25).tqarg(i18n("Show all options")));
+ printQ(optionFormatString.tqarg("--author",-25).tqarg(i18n("Show author information")));
+ printQ(optionFormatString.tqarg("-v, --version",-25).tqarg(i18n("Show version information")));
+ printQ(optionFormatString.tqarg("--license",-25).tqarg(i18n("Show license information")));
+ printQ(optionFormatString.tqarg("--", -25).tqarg(i18n("End of options")));
args = argsList->first(); // Sets current to 1st.
@@ -878,22 +878,22 @@ KCmdLineArgs::usage(const char *id)
{
bool hasArgs = false;
bool hasOptions = false;
- QString optionsHeader;
+ TQString optionsHeader;
if (args->name)
- optionsHeader = optionHeaderString.arg(i18n("%1 options").arg(QString::fromLatin1(args->name)));
+ optionsHeader = optionHeaderString.tqarg(i18n("%1 options").tqarg(TQString::tqfromLatin1(args->name)));
else
optionsHeader = i18n("\nOptions:\n");
while (args)
{
const KCmdLineOptions *option = args->options;
- QCString opt = "";
+ TQCString opt = "";
//
while(option && option->name)
{
- QString description;
- QString descriptionRest;
- QStringList dl;
+ TQString description;
+ TQString descriptionRest;
+ TQStringList dl;
// Option header
if (option->name[0] == ':')
@@ -914,7 +914,7 @@ KCmdLineArgs::usage(const char *id)
{
if (option->description)
{
- QString tmp = "\n"+i18n(option->description);
+ TQString tmp = "\n"+i18n(option->description);
if (!tmp.endsWith("\n"))
tmp.append("\n");
printQ(tmp);
@@ -927,15 +927,15 @@ KCmdLineArgs::usage(const char *id)
if (option->description)
{
description = i18n(option->description);
-# if QT_VERSION<0x040000
- dl = QStringList::split("\n", description, true);
+# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000
+ dl = TQStringList::split("\n", description, true);
#else
dl = description.split("\n");
#endif
description = dl.first();
dl.erase( dl.begin() );
}
- QCString name = option->name;
+ TQCString name = option->name;
if (name[0] == '!')
name = name.mid(1);
@@ -950,8 +950,8 @@ KCmdLineArgs::usage(const char *id)
name = name.mid(1);
if ((name[0] == '[') && (name[name.length()-1] == ']'))
name = name.mid(1, name.length()-2);
- printQ(optionFormatString.arg(QString(name), -25)
- .arg(description));
+ printQ(optionFormatString.tqarg(TQString(name), -25)
+ .tqarg(description));
}
else
{
@@ -974,22 +974,22 @@ KCmdLineArgs::usage(const char *id)
opt = opt + name;
if (!option->def)
{
- printQ(optionFormatString.arg(QString(opt), -25)
- .arg(description));
+ printQ(optionFormatString.tqarg(TQString(opt), -25)
+ .tqarg(description));
}
else
{
- printQ(optionFormatStringDef.arg(QString(opt), -25)
- .arg(description).arg(option->def));
+ printQ(optionFormatStringDef.tqarg(TQString(opt), -25)
+ .tqarg(description).tqarg(option->def));
}
opt = "";
}
}
- for(QStringList::Iterator it = dl.begin();
+ for(TQStringList::Iterator it = dl.begin();
it != dl.end();
++it)
{
- printQ(optionFormatString.arg("", -25).arg(*it));
+ printQ(optionFormatString.tqarg("", -25).tqarg(*it));
}
option++;
@@ -1018,7 +1018,7 @@ KCmdLineArgs::KCmdLineArgs( const KCmdLineOptions *_options,
{
parsedOptionList = 0;
parsedArgList = 0;
- isQt = (::qstrcmp(id, "qt") == 0);
+ isTQt = (::qstrcmp(id, "qt") == 0);
}
/**
@@ -1054,7 +1054,7 @@ KCmdLineArgs::reset()
}
void
-KCmdLineArgs::save( QDataStream &ds) const
+KCmdLineArgs::save( TQDataStream &ds) const
{
uint count = 0;
if (parsedOptionList)
@@ -1069,7 +1069,7 @@ KCmdLineArgs::save( QDataStream &ds) const
}
void
-KCmdLineArgs::load( QDataStream &ds)
+KCmdLineArgs::load( TQDataStream &ds)
{
if (!parsedOptionList) parsedOptionList = new KCmdLineParsedOptions;
if (!parsedArgList) parsedArgList = new KCmdLineParsedArgs;
@@ -1090,12 +1090,12 @@ KCmdLineArgs::load( QDataStream &ds)
}
void
-KCmdLineArgs::setOption(const QCString &opt, bool enabled)
+KCmdLineArgs::setOption(const TQCString &opt, bool enabled)
{
- if (isQt)
+ if (isTQt)
{
- // Qt does it own parsing.
- QCString arg = "-";
+ // TQt does it own parsing.
+ TQCString arg = "-";
if( !enabled )
arg += "no";
arg += opt;
@@ -1107,23 +1107,23 @@ KCmdLineArgs::setOption(const QCString &opt, bool enabled)
}
if (enabled)
- parsedOptionList->replace( opt, new QCString("t") );
+ parsedOptionList->tqreplace( opt, new TQCString("t") );
else
- parsedOptionList->replace( opt, new QCString("f") );
+ parsedOptionList->tqreplace( opt, new TQCString("f") );
}
void
-KCmdLineArgs::setOption(const QCString &opt, const char *value)
+KCmdLineArgs::setOption(const TQCString &opt, const char *value)
{
- if (isQt)
+ if (isTQt)
{
- // Qt does it's own parsing.
- QCString arg = "-";
+ // TQt does it's own parsing.
+ TQCString arg = "-";
arg += opt;
addArgument(arg);
addArgument(value);
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
// Hack coming up!
if (arg == "-display")
{
@@ -1136,16 +1136,16 @@ KCmdLineArgs::setOption(const QCString &opt, const char *value)
parsedOptionList->setAutoDelete(true);
}
- parsedOptionList->insert( opt, new QCString(value) );
+ parsedOptionList->insert( opt, new TQCString(value) );
}
-QCString
+TQCString
KCmdLineArgs::getOption(const char *_opt) const
{
- QCString *value = 0;
+ TQCString *value = 0;
if (parsedOptionList)
{
- value = parsedOptionList->find(_opt);
+ value = parsedOptionList->tqfind(_opt);
}
if (value)
@@ -1155,7 +1155,7 @@ KCmdLineArgs::getOption(const char *_opt) const
const char *opt_name;
const char *def;
bool dummy = true;
- QCString opt = _opt;
+ TQCString opt = _opt;
int result = ::findOption( options, opt, opt_name, def, dummy) & ~4;
if (result != 3)
@@ -1168,7 +1168,7 @@ KCmdLineArgs::getOption(const char *_opt) const
assert( 0 );
exit(255);
}
- return QCString(def);
+ return TQCString(def);
}
QCStringList
@@ -1180,7 +1180,7 @@ KCmdLineArgs::getOptionList(const char *_opt) const
while(true)
{
- QCString *value = parsedOptionList->take(_opt);
+ TQCString *value = parsedOptionList->take(_opt);
if (!value)
break;
result.prepend(*value);
@@ -1196,7 +1196,7 @@ KCmdLineArgs::getOptionList(const char *_opt) const
it != result.end();
++it)
{
- parsedOptionList->insert(_opt, new QCString(*it));
+ parsedOptionList->insert(_opt, new TQCString(*it));
}
return result;
}
@@ -1208,7 +1208,7 @@ KCmdLineArgs::isSet(const char *_opt) const
const char *opt_name;
const char *def;
bool dummy = true;
- QCString opt = _opt;
+ TQCString opt = _opt;
int result = ::findOption( options, opt, opt_name, def, dummy) & ~4;
if (result == 0)
@@ -1222,10 +1222,10 @@ KCmdLineArgs::isSet(const char *_opt) const
exit(255);
}
- QCString *value = 0;
+ TQCString *value = 0;
if (parsedOptionList)
{
- value = parsedOptionList->find(opt);
+ value = parsedOptionList->tqfind(opt);
}
if (value)
@@ -1276,18 +1276,18 @@ KCmdLineArgs::url(int n) const
KURL KCmdLineArgs::makeURL(const char *_urlArg)
{
- QString urlArg = QFile::decodeName(_urlArg);
- if (!QDir::isRelativePath(urlArg))
+ TQString urlArg = TQFile::decodeName(_urlArg);
+ if (!TQDir::isRelativePath(urlArg))
{
//KURL result;
//result.setPath(urlArg);
//return result; // Absolute path.
return urlArg;
}
-# if QT_VERSION<0x040000
- if ( !QUrl::isRelativeUrl(urlArg) )
+# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000
+ if ( !TQUrl::isRelativeUrl(urlArg) )
#else
- if ( !QUrl(urlArg).isRelative() )
+ if ( !TQUrl(urlArg).isRelative() )
#endif
//return KURL(urlArg); // Argument is a URL
return urlArg;