summaryrefslogtreecommitdiffstats
path: root/src/common/nokde
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
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')
-rw-r--r--src/common/nokde/nokde_kaboutdata.cpp142
-rw-r--r--src/common/nokde/nokde_kaboutdata.h96
-rw-r--r--src/common/nokde/nokde_kcmdlineargs.cpp304
-rw-r--r--src/common/nokde/nokde_kcmdlineargs.h60
-rw-r--r--src/common/nokde/nokde_klocale.cpp4
-rw-r--r--src/common/nokde/nokde_klocale.h8
-rw-r--r--src/common/nokde/nokde_kprocess.cpp32
-rw-r--r--src/common/nokde/nokde_kprocess.h27
-rw-r--r--src/common/nokde/nokde_kurl.h14
-rw-r--r--src/common/nokde/win32_utils.h16
10 files changed, 352 insertions, 351 deletions
diff --git a/src/common/nokde/nokde_kaboutdata.cpp b/src/common/nokde/nokde_kaboutdata.cpp
index 21b6917..6dd8f33 100644
--- a/src/common/nokde/nokde_kaboutdata.cpp
+++ b/src/common/nokde/nokde_kaboutdata.cpp
@@ -24,52 +24,52 @@
#include "nokde_kaboutdata.h"
//#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
-QString
+TQString
KAboutPerson::name() const
{
- return QString::fromUtf8(mName);
+ return TQString::fromUtf8(mName);
}
-QString
+TQString
KAboutPerson::task() const
{
if (mTask && *mTask)
return i18n(mTask);
else
- return QString::null;
+ return TQString();
}
-QString
+TQString
KAboutPerson::emailAddress() const
{
- return QString::fromUtf8(mEmailAddress);
+ return TQString::fromUtf8(mEmailAddress);
}
-QString
+TQString
KAboutPerson::webAddress() const
{
- return QString::fromUtf8(mWebAddress);
+ return TQString::fromUtf8(mWebAddress);
}
-KAboutTranslator::KAboutTranslator(const QString & name,
- const QString & emailAddress)
+KAboutTranslator::KAboutTranslator(const TQString & name,
+ const TQString & emailAddress)
{
mName=name;
mEmail=emailAddress;
}
-QString KAboutTranslator::name() const
+TQString KAboutTranslator::name() const
{
return mName;
}
-QString KAboutTranslator::emailAddress() const
+TQString KAboutTranslator::emailAddress() const
{
return mEmail;
}
@@ -90,7 +90,7 @@ public:
const char *translatorName;
const char *translatorEmail;
const char *productName;
-// QImage* programLogo;
+// TQImage* programLogo;
};
@@ -163,9 +163,9 @@ KAboutData::setLicenseText( const char *licenseText )
}
void
-KAboutData::setLicenseTextFile( const QString &file )
+KAboutData::setLicenseTextFile( const TQString &file )
{
- mLicenseText = qstrdup(QFile::encodeName(file));
+ mLicenseText = qstrdup(TQFile::encodeName(file));
mLicenseKey = License_File;
}
@@ -244,99 +244,99 @@ KAboutData::productName() const
return appName();
}
-QString
+TQString
KAboutData::programName() const
{
if (mProgramName && *mProgramName)
return i18n(mProgramName);
else
- return QString::null;
+ return TQString();
}
/*
-QImage
+TQImage
KAboutData::programLogo() const
{
- return d->programLogo ? (*d->programLogo) : QImage();
+ return d->programLogo ? (*d->programLogo) : TQImage();
}
void
-KAboutData::setProgramLogo(const QImage& image)
+KAboutData::setProgramLogo(const TQImage& image)
{
if (!d->programLogo)
- d->programLogo = new QImage( image );
+ d->programLogo = new TQImage( image );
else
*d->programLogo = image;
}
*/
-QString
+TQString
KAboutData::version() const
{
- return QString::fromLatin1(mVersion);
+ return TQString::tqfromLatin1(mVersion);
}
-QString
+TQString
KAboutData::shortDescription() const
{
if (mShortDescription && *mShortDescription)
return i18n(mShortDescription);
else
- return QString::null;
+ return TQString();
}
-QString
+TQString
KAboutData::homepage() const
{
- return QString::fromLatin1(mHomepageAddress);
+ return TQString::tqfromLatin1(mHomepageAddress);
}
-QString
+TQString
KAboutData::bugAddress() const
{
- return QString::fromLatin1(mBugEmailAddress);
+ return TQString::tqfromLatin1(mBugEmailAddress);
}
-const QValueList<KAboutPerson>
+const TQValueList<KAboutPerson>
KAboutData::authors() const
{
return mAuthorList;
}
-const QValueList<KAboutPerson>
+const TQValueList<KAboutPerson>
KAboutData::credits() const
{
return mCreditList;
}
-const QValueList<KAboutTranslator>
+const TQValueList<KAboutTranslator>
KAboutData::translators() const
{
- QValueList<KAboutTranslator> personList;
+ TQValueList<KAboutTranslator> personList;
if(d->translatorName == 0)
return personList;
- QStringList nameList;
- QStringList emailList;
+ TQStringList nameList;
+ TQStringList emailList;
- QString names = i18n(d->translatorName);
- if(names != QString::fromUtf8(d->translatorName))
+ TQString names = i18n(d->translatorName);
+ if(names != TQString::fromUtf8(d->translatorName))
{
-#if QT_VERSION < 0x040000
- nameList = QStringList::split(',',names);
+#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000
+ nameList = TQStringList::split(',',names);
#else
- nameList = names.split(',', QString::SkipEmptyParts);
+ nameList = names.split(',', TQString::SkipEmptyParts);
#endif
}
if(d->translatorEmail)
{
- QString emails = i18n(d->translatorEmail);
+ TQString emails = i18n(d->translatorEmail);
- if(emails != QString::fromUtf8(d->translatorEmail))
+ if(emails != TQString::fromUtf8(d->translatorEmail))
{
-#if QT_VERSION < 0x040000
- emailList = QStringList::split(',',emails,true);
+#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000
+ emailList = TQStringList::split(',',emails,true);
#else
emailList = emails.split(',');
#endif
@@ -344,21 +344,21 @@ KAboutData::translators() const
}
- QStringList::Iterator nit;
- QStringList::Iterator eit=emailList.begin();
+ TQStringList::Iterator nit;
+ TQStringList::Iterator eit=emailList.begin();
for(nit = nameList.begin(); nit != nameList.end(); ++nit)
{
- QString email;
+ TQString email;
if(eit != emailList.end())
{
email=*eit;
++eit;
}
- QString name=*nit;
+ TQString name=*nit;
-#if QT_VERSION < 0x040000
+#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000
personList.append(KAboutTranslator(name.stripWhiteSpace(), email.stripWhiteSpace()));
#else
personList.append(KAboutTranslator(name.trimmed(), email.trimmed()));
@@ -368,7 +368,7 @@ KAboutData::translators() const
return personList;
}
-QString
+TQString
KAboutData::aboutTranslationTeam()
{
return i18n("replace this with information about your translation team",
@@ -378,29 +378,29 @@ KAboutData::aboutTranslationTeam()
"visit http://i18n.kde.org</p>");
}
-QString
+TQString
KAboutData::otherText() const
{
if (mOtherText && *mOtherText)
return i18n(mOtherText);
else
- return QString::null;
+ return TQString();
}
-QString
+TQString
KAboutData::license() const
{
- QString result;
+ TQString result;
if (!copyrightStatement().isEmpty())
result = copyrightStatement() + "\n\n";
- QString l;
- QString f;
+ TQString l;
+ TQString f;
switch ( mLicenseKey )
{
case License_File:
- f = QFile::decodeName(mLicenseText);
+ f = TQFile::decodeName(mLicenseText);
break;
case License_GPL_V2:
l = "GPL v2";
@@ -418,9 +418,9 @@ KAboutData::license() const
l = "Artistic License";
f = locate("data", "LICENSES/ARTISTIC");
break;
- case License_QPL_V1_0:
- l = "QPL v1.0";
- f = locate("data", "LICENSES/QPL_V1.0");
+ case License_TQPL_V1_0:
+ l = "TQPL v1.0";
+ f = locate("data", "LICENSES/TQPL_V1.0");
break;
case License_Custom:
if (mLicenseText && *mLicenseText)
@@ -434,21 +434,21 @@ KAboutData::license() const
}
if (!l.isEmpty())
- result += i18n("This program is distributed under the terms of the %1.").arg( l );
+ result += i18n("This program is distributed under the terms of the %1.").tqarg( l );
if (!f.isEmpty())
{
- QFile file(f);
-#if QT_VERSION < 0x040000
+ TQFile file(f);
+#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000
if (file.open(IO_ReadOnly))
#else
- if (file.open(QIODevice::ReadOnly))
+ if (file.open(TQIODevice::ReadOnly))
#endif
{
result += '\n';
result += '\n';
- QTextStream str(&file);
-#if QT_VERSION < 0x040000
+ TQTextStream str(&file);
+#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000
result += str.read();
#else
result += str.readAll();
@@ -459,11 +459,11 @@ KAboutData::license() const
return result;
}
-QString
+TQString
KAboutData::copyrightStatement() const
{
if (mCopyrightStatement && *mCopyrightStatement)
return i18n(mCopyrightStatement);
else
- return QString::null;
+ return TQString();
}
diff --git a/src/common/nokde/nokde_kaboutdata.h b/src/common/nokde/nokde_kaboutdata.h
index 13076d4..01a8e74 100644
--- a/src/common/nokde/nokde_kaboutdata.h
+++ b/src/common/nokde/nokde_kaboutdata.h
@@ -21,16 +21,16 @@
*
*/
-#include <qglobal.h>
-#if QT_VERSION < 0x040000
-# include <qvaluelist.h>
+#include <tqglobal.h>
+#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000
+# include <tqvaluelist.h>
#else
-# include <Qt3Support/Q3ValueList>
-# define QValueList Q3ValueList
-# include <QStringList>
+# include <TQt3Support/Q3ValueList>
+# define TQValueList Q3ValueList
+# include <TQStringList>
#endif
-#include <qstring.h>
-//#include <qimage.h>
+#include <tqstring.h>
+//#include <tqimage.h>
#include "nokde_klocale.h"
@@ -85,37 +85,37 @@ public:
}
/**
* @internal
- * Don't use. Required by QValueList
+ * Don't use. Required by TQValueList
*/
KAboutPerson() {}
/**
* The person's name
- * @return the person's name (can be QString::null, if it has been
+ * @return the person's name (can be TQString(), if it has been
* constructed with a null name)
*/
- QString name() const;
+ TQString name() const;
/**
* The person's task
- * @return the person's task (can be QString::null, if it has been
+ * @return the person's task (can be TQString(), if it has been
* constructed with a null task)
*/
- QString task() const;
+ TQString task() const;
/**
* The person's email address
- * @return the person's email address (can be QString::null, if it has been
+ * @return the person's email address (can be TQString(), if it has been
* constructed with a null email)
*/
- QString emailAddress() const;
+ TQString emailAddress() const;
/**
* The home page or a relevant link
- * @return the persons home page (can be QString::null, if it has been
+ * @return the persons home page (can be TQString(), if it has been
* constructed with a null home page)
*/
- QString webAddress() const;
+ TQString webAddress() const;
private:
const char *mName;
@@ -149,26 +149,26 @@ public:
*
* @param emailAddress The email address of the person.
*/
- KAboutTranslator(const QString & name=QString::null,
- const QString & emailAddress=QString::null);
+ KAboutTranslator(const TQString & name=TQString(),
+ const TQString & emailAddress=TQString());
/**
* The translator's name
- * @return the translators's name (can be QString::null, if it has been
+ * @return the translators's name (can be TQString(), if it has been
* constructed with a null name)
*/
- QString name() const;
+ TQString name() const;
/**
* The translator's email
- * @return the translator's email address (can be QString::null, if it has been
+ * @return the translator's email address (can be TQString(), if it has been
* constructed with a null email)
*/
- QString emailAddress() const;
+ TQString emailAddress() const;
private:
- QString mName;
- QString mEmail;
+ TQString mName;
+ TQString mEmail;
KAboutTranslatorPrivate* d;
};
@@ -204,8 +204,8 @@ class KDECORE_EXPORT KAboutData
License_LGPL_V2 = 2,
License_BSD = 3,
License_Artistic = 4,
- License_QPL = 5,
- License_QPL_V1_0 = 5
+ License_TQPL = 5,
+ License_TQPL_V1_0 = 5
};
public:
@@ -352,7 +352,7 @@ class KDECORE_EXPORT KAboutData
*
* @param file File containing the license text.
*/
- void setLicenseTextFile( const QString &file );
+ void setLicenseTextFile( const TQString &file );
/**
* Defines the program name used internally.
@@ -379,7 +379,7 @@ class KDECORE_EXPORT KAboutData
* @see programLogo()
* @since 3.4
*/
-// void setProgramLogo(const QImage& image);
+// void setProgramLogo(const TQImage& image);
/**
* Defines the program version string.
@@ -469,7 +469,7 @@ class KDECORE_EXPORT KAboutData
* Returns the translated program name.
* @return the program name (translated).
*/
- QString programName() const;
+ TQString programName() const;
/**
* Returns the program logo image.
@@ -477,63 +477,63 @@ class KDECORE_EXPORT KAboutData
* no custom application logo defined.
* @since 3.4
*/
-// QImage programLogo() const;
+// TQImage programLogo() const;
/**
* Returns the program's version.
* @return the version string.
*/
- QString version() const;
+ TQString version() const;
/**
* Returns a short, translated description.
* @return the short description (translated). Can be
- * QString::null if not set.
+ * TQString() if not set.
*/
- QString shortDescription() const;
+ TQString shortDescription() const;
/**
* Returns the application homepage.
- * @return the application homepage URL. Can be QString::null if
+ * @return the application homepage URL. Can be TQString() if
* not set.
*/
- QString homepage() const;
+ TQString homepage() const;
/**
* Returns the email address for bugs.
* @return the email address where to report bugs.
*/
- QString bugAddress() const;
+ TQString bugAddress() const;
/**
* Returns a list of authors.
* @return author information (list of persons).
*/
- const QValueList<KAboutPerson> authors() const;
+ const TQValueList<KAboutPerson> authors() const;
/**
* Returns a list of persons who contributed.
* @return credit information (list of persons).
*/
- const QValueList<KAboutPerson> credits() const;
+ const TQValueList<KAboutPerson> credits() const;
/**
* Returns a list of translators.
* @return translators information (list of persons)
*/
- const QValueList<KAboutTranslator> translators() const;
+ const TQValueList<KAboutTranslator> translators() const;
/**
* Returns a message about the translation team.
* @return a message about the translation team
*/
- static QString aboutTranslationTeam();
+ static TQString aboutTranslationTeam();
/**
* Returns a translated, free form text.
- * @return the free form text (translated). Can be QString::null if not set.
+ * @return the free form text (translated). Can be TQString() if not set.
*/
- QString otherText() const;
+ TQString otherText() const;
/**
* Returns the license. If the licenseType argument of the constructor has been
@@ -542,13 +542,13 @@ class KDECORE_EXPORT KAboutData
*
* @return The license text.
*/
- QString license() const;
+ TQString license() const;
/**
* Returns the copyright statement.
- * @return the copyright statement. Can be QString::null if not set.
+ * @return the copyright statement. Can be TQString() if not set.
*/
- QString copyrightStatement() const;
+ TQString copyrightStatement() const;
private:
const char *mAppName;
@@ -560,8 +560,8 @@ class KDECORE_EXPORT KAboutData
const char *mOtherText;
const char *mHomepageAddress;
const char *mBugEmailAddress;
- QValueList<KAboutPerson> mAuthorList;
- QValueList<KAboutPerson> mCreditList;
+ TQValueList<KAboutPerson> mAuthorList;
+ TQValueList<KAboutPerson> mCreditList;
const char *mLicenseText;
KAboutDataPrivate *d;
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;
diff --git a/src/common/nokde/nokde_kcmdlineargs.h b/src/common/nokde/nokde_kcmdlineargs.h
index 8b79b62..8808d94 100644
--- a/src/common/nokde/nokde_kcmdlineargs.h
+++ b/src/common/nokde/nokde_kcmdlineargs.h
@@ -24,20 +24,20 @@
#include "nokde_klocale.h"
#include "nokde_kurl.h"
-# if QT_VERSION<0x040000
-# include <qptrlist.h>
-# include <qvaluelist.h>
+# if [[[TQT_VERSION IS DEPRECATED]]]<0x040000
+# include <tqptrlist.h>
+# include <tqvaluelist.h>
#else
-# include <Qt3Support/Q3CString>
-# define QCString Q3CString
-# include <Qt3Support/Q3PtrList>
-# define QPtrList Q3PtrList
-# include <Qt3Support/Q3ValueList>
-# define QValueList Q3ValueList
+# include <TQt3Support/Q3CString>
+# define TQCString Q3CString
+# include <TQt3Support/Q3PtrList>
+# define TQPtrList Q3PtrList
+# include <TQt3Support/Q3ValueList>
+# define TQValueList Q3ValueList
#endif
-# include <qstring.h>
+# include <tqstring.h>
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
/**
* @short Structure that holds command line options.
@@ -90,7 +90,7 @@ class KCmdLineArgsPrivate;
* @short A class for command-line argument handling.
*
* KCmdLineArgs provides simple access to the command-line arguments
- * for an application. It takes into account Qt-specific options,
+ * for an application. It takes into account TQt-specific options,
* KDE-specific options and application specific options.
*
* This class is used in %main() via the static method
@@ -129,13 +129,13 @@ class KCmdLineArgsPrivate;
* ....
*
* // An option which takes an additional argument
- * QCString anotherOptionArg = args->getOption("another-option");
+ * TQCString anotherOptionArg = args->getOption("another-option");
*
* // Arguments (e.g. files to open)
* for(int i = 0; i < args->count(); i++) // Counting start at 0!
* {
* // don't forget to convert to Unicode!
- * openFile( QFile::decodeName( args->arg(i)));
+ * openFile( TQFile::decodeName( args->arg(i)));
* // Or more convenient:
* // openURL( args->url(i));
*
@@ -234,7 +234,7 @@ class KDECORE_EXPORT KCmdLineArgs
{
friend class KApplication;
friend class KUniqueApplication;
- friend class QPtrList<KCmdLineArgs>;
+ friend class TQPtrList<KCmdLineArgs>;
public:
// Static functions:
@@ -253,7 +253,7 @@ public:
* @param _description A short description of what your application is about.
* @param _version A version.
* @param noKApp Set this true to not add commandline options for
- * QApplication / KApplication
+ * TQApplication / KApplication
*
* @since 3.2
*/
@@ -281,7 +281,7 @@ public:
* @param _argv As passed to @p main(...).
* @param about A KAboutData object describing your program.
* @param noKApp Set this true to not add commandline options for
- * QApplication / KApplication
+ * TQApplication / KApplication
*/
static void init(int _argc, char **_argv,
const KAboutData *about, bool noKApp = false);
@@ -389,7 +389,7 @@ public:
* where the user started a second instance.
* @return the current working directory
**/
- static QString cwd();
+ static TQString cwd();
/**
* Get the appname according to argv[0].
@@ -410,7 +410,7 @@ public:
* Print an error to stderr and the usage help to stdout and exit.
* @param error the error to print
**/
- static void usage(const QString &error);
+ static void usage(const TQString &error);
/**
* Enable i18n to be able to print a translated error message.
@@ -441,7 +441,7 @@ public:
* If the option was present more than the value of the
* last occurrence is used.
*/
- QCString getOption(const char *option) const;
+ TQCString getOption(const char *option) const;
/**
* Read out all occurrences of a string option.
@@ -543,7 +543,7 @@ public:
/**
* Load arguments from a stream.
*/
- static void loadAppArgs( QDataStream &);
+ static void loadAppArgs( TQDataStream &);
/**
* Add standard option --tempfile
@@ -582,7 +582,7 @@ private:
*
* Checks what to do with a single option
*/
- static void findOption(const char *_opt, QCString opt, int &i, bool enabled, bool &moreOptions);
+ static void findOption(const char *_opt, TQCString opt, int &i, bool enabled, bool &moreOptions);
/**
* @internal
@@ -619,23 +619,23 @@ private:
/**
* @internal for KUniqueApplication only:
*
- * Save all but the Qt and KDE arguments to a stream.
+ * Save all but the TQt and KDE arguments to a stream.
*/
- static void saveAppArgs( QDataStream &);
+ static void saveAppArgs( TQDataStream &);
/**
* @internal
*
* Set a boolean option
*/
- void setOption(const QCString &option, bool enabled);
+ void setOption(const TQCString &option, bool enabled);
/**
* @internal
*
* Set a string option
*/
- void setOption(const QCString &option, const char *value);
+ void setOption(const TQCString &option, const char *value);
/**
* @internal
@@ -649,14 +649,14 @@ private:
*
* Save to a stream.
*/
- void save( QDataStream &) const;
+ void save( TQDataStream &) const;
/**
* @internal
*
* Restore from a stream.
*/
- void load( QDataStream &);
+ void load( TQDataStream &);
/**
* @internal for KApplication only
@@ -675,14 +675,14 @@ private:
*/
static void initIgnore(int _argc, char **_argv, const char *_appname);
- static void printQ(const QString &msg);
+ static void printQ(const TQString &msg);
const KCmdLineOptions *options;
const char *name;
const char *id;
KCmdLineParsedOptions *parsedOptionList;
KCmdLineParsedArgs *parsedArgList;
- bool isQt;
+ bool isTQt;
static KCmdLineArgsList *argsList; // All options.
static const KAboutData *about;
diff --git a/src/common/nokde/nokde_klocale.cpp b/src/common/nokde/nokde_klocale.cpp
index e30ba2f..aa6cb26 100644
--- a/src/common/nokde/nokde_klocale.cpp
+++ b/src/common/nokde/nokde_klocale.cpp
@@ -1,4 +1,4 @@
#include "nokde_klocale.h"
-QString i18n(const QString &, const QString &text) { return text; }
-QString locate(const QString &, const QString &) { return QString::null; }
+TQString i18n(const TQString &, const TQString &text) { return text; }
+TQString locate(const TQString &, const TQString &) { return TQString(); }
diff --git a/src/common/nokde/nokde_klocale.h b/src/common/nokde/nokde_klocale.h
index a1cf720..9a3e361 100644
--- a/src/common/nokde/nokde_klocale.h
+++ b/src/common/nokde/nokde_klocale.h
@@ -9,9 +9,9 @@
#undef I18N_NOOP
#define I18N_NOOP(x) (x)
-#include <qstring.h>
-inline QString i18n(const QString &text) { return text; }
-extern QString i18n(const QString &index, const QString &text);
-extern QString locate(const QString &, const QString &);
+#include <tqstring.h>
+inline TQString i18n(const TQString &text) { return text; }
+extern TQString i18n(const TQString &index, const TQString &text);
+extern TQString locate(const TQString &, const TQString &);
#endif
diff --git a/src/common/nokde/nokde_kprocess.cpp b/src/common/nokde/nokde_kprocess.cpp
index 92c8968..2886f20 100644
--- a/src/common/nokde/nokde_kprocess.cpp
+++ b/src/common/nokde/nokde_kprocess.cpp
@@ -1,29 +1,29 @@
#include "nokde_kprocess.h"
-#if QT_VERSION<0x040000
-# include <qprocess.h>
-# define Q3Process QProcess
+#if [[[TQT_VERSION IS DEPRECATED]]]<0x040000
+# include <tqprocess.h>
+# define Q3Process TQProcess
#else
-# include <Qt3Support/Q3Process>
+# include <TQt3Support/Q3Process>
#endif
#if defined(Q_OS_UNIX)
# include <signal.h>
#endif
-KProcess::KProcess(QObject *parent, const char *name)
- : QObject(parent, name)
+KProcess::KProcess(TQObject *tqparent, const char *name)
+ : TQObject(tqparent, name)
{
_process = new Q3Process(this);
- connect(_process, SIGNAL(processExited()), SLOT(processExitedSlot()));
- connect(_process, SIGNAL(readyReadStdout()), SLOT(readyReadStdoutSlot()));
- connect(_process, SIGNAL(readyReadStderr()), SLOT(readyReadStderrSlot()));
+ connect(_process, TQT_SIGNAL(processExited()), TQT_SLOT(processExitedSlot()));
+ connect(_process, TQT_SIGNAL(readyReadStdout()), TQT_SLOT(readyReadStdoutSlot()));
+ connect(_process, TQT_SIGNAL(readyReadStderr()), TQT_SLOT(readyReadStderrSlot()));
}
bool KProcess::start()
{
_process->setArguments(_arguments);
- QStringList env;
+ TQStringList env;
if ( !_environment.isEmpty() ) {
for (uint i=0; environ[i]; i++) env += environ[i];
env += _environment;
@@ -40,23 +40,23 @@ void KProcess::processExitedSlot()
void KProcess::readyReadStdoutSlot()
{
- QByteArray a = _process->readStdout();
+ TQByteArray a = _process->readStdout();
emit receivedStdout(this, a.data(), a.count());
}
void KProcess::readyReadStderrSlot()
{
- QByteArray a = _process->readStderr();
+ TQByteArray a = _process->readStderr();
emit receivedStderr(this, a.data(), a.count());
}
bool KProcess::writeStdin(const char *buffer, int len)
{
-#if QT_VERSION<0x040000
- QByteArray a;
+#if [[[TQT_VERSION IS DEPRECATED]]]<0x040000
+ TQByteArray a;
a.assign(buffer, len);
#else
- QByteArray a(buffer, len);
+ TQByteArray a(buffer, len);
#endif
_process->writeToStdin(a);
return true;
@@ -88,7 +88,7 @@ bool KProcess::isRunning() const
return _process->isRunning();
}
-void KProcess::setWorkingDirectory(const QDir &dir)
+void KProcess::setWorkingDirectory(const TQDir &dir)
{
return _process->setWorkingDirectory(dir);
}
diff --git a/src/common/nokde/nokde_kprocess.h b/src/common/nokde/nokde_kprocess.h
index 59ff73c..5c7effd 100644
--- a/src/common/nokde/nokde_kprocess.h
+++ b/src/common/nokde/nokde_kprocess.h
@@ -1,32 +1,33 @@
#ifndef _KPROCESS_H_
#define _KPROCESS_H_
-#include <qdir.h>
+#include <tqdir.h>
#include "common/global/global.h"
#include "common/common/synchronous.h"
-#if QT_VERSION<0x040000
-class QProcess;
+#if [[[TQT_VERSION IS DEPRECATED]]]<0x040000
+class TQProcess;
#else
class Q3Process;
#endif
-class KProcess : public QObject
+class KProcess : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KProcess(QObject *parent = 0, const char *name = 0);
+ KProcess(TQObject *tqparent = 0, const char *name = 0);
void clearArguments() { _arguments.clear(); }
- KProcess &operator<< (const QString &arg) { _arguments += arg; return *this; }
- KProcess &operator<< (const QStringList &args) { _arguments += args; return *this; }
- QStringList args() const { return _arguments; }
- void setEnvironment(const QString &name, const QString &value) { _environment += name + "=" + value; }
+ KProcess &operator<< (const TQString &arg) { _arguments += arg; return *this; }
+ KProcess &operator<< (const TQStringList &args) { _arguments += args; return *this; }
+ TQStringList args() const { return _arguments; }
+ void setEnvironment(const TQString &name, const TQString &value) { _environment += name + "=" + value; }
bool start();
bool writeStdin(const char *buffer, int len);
bool kill();
bool kill(int n);
int exitStatus() const;
bool isRunning() const;
- void setWorkingDirectory(const QDir &dir);
+ void setWorkingDirectory(const TQDir &dir);
void setUseShell(bool useShell);
signals:
@@ -40,12 +41,12 @@ private slots:
void readyReadStderrSlot();
private:
-#if QT_VERSION<0x040000
- QProcess *_process;
+#if [[[TQT_VERSION IS DEPRECATED]]]<0x040000
+ TQProcess *_process;
#else
Q3Process *_process;
#endif
- QStringList _arguments,_environment;
+ TQStringList _arguments,_environment;
};
#endif
diff --git a/src/common/nokde/nokde_kurl.h b/src/common/nokde/nokde_kurl.h
index 202c46d..c31fca1 100644
--- a/src/common/nokde/nokde_kurl.h
+++ b/src/common/nokde/nokde_kurl.h
@@ -1,7 +1,7 @@
#ifndef _KURL_H_
#define _KURL_H_
-#include <qfile.h>
+#include <tqfile.h>
#include "common/global/global.h"
@@ -9,12 +9,12 @@ class KURL : public Q3Url
{
public:
KURL() {}
- KURL(const QString &s) : Q3Url(s) {}
+ KURL(const TQString &s) : Q3Url(s) {}
void cleanPath() {}
bool isEmpty() const { return toString(false, false).isEmpty(); }
- QString fileName(bool b) const { Q_UNUSED(b); Q_ASSERT(!b); return Q3Url::fileName(); }
- static KURL fromPathOrURL(const QString &s) { return KURL(s); }
-#if QT_VERSION>=0x040000
+ TQString fileName(bool b) const { Q_UNUSED(b); Q_ASSERT(!b); return Q3Url::fileName(); }
+ static KURL fromPathOrURL(const TQString &s) { return KURL(s); }
+#if [[[TQT_VERSION IS DEPRECATED]]]>=0x040000
bool operator <(const KURL &url) const { return path()<url.path(); }
bool operator ==(const KURL &url) const { return path()==url.path(); }
bool operator !=(const KURL &url) const { return path()!=url.path(); }
@@ -25,8 +25,8 @@ public:
class KTempFile
{
public:
- const QFile *file() const { return 0; }
- QFile *file() { return 0; }
+ const TQFile *file() const { return 0; }
+ TQFile *file() { return 0; }
};
#endif
diff --git a/src/common/nokde/win32_utils.h b/src/common/nokde/win32_utils.h
index cc5e110..a5f3acd 100644
--- a/src/common/nokde/win32_utils.h
+++ b/src/common/nokde/win32_utils.h
@@ -26,7 +26,7 @@
#define KDEWIN32_EXPORT
#ifdef __cplusplus
-#include <qstring.h>
+#include <tqstring.h>
extern "C" {
#endif
@@ -60,13 +60,13 @@ KDEWIN32_EXPORT void win32_slashify(char *path, int maxlen);
@param item is an item inside subKey or "" if default folder's value should be returned
@param ok if not null, will be set to true on success and false on failure
*/
-KDEWIN32_EXPORT QString getWin32RegistryValue(HKEY key, const QString& subKey,
- const QString& item, bool *ok = 0);
+KDEWIN32_EXPORT TQString getWin32RegistryValue(HKEY key, const TQString& subKey,
+ const TQString& item, bool *ok = 0);
/**
\return a value from MS Windows native registry for shell folder \a folder.
*/
-inline QString getWin32ShellFoldersPath(const QString& folder) {
+inline TQString getWin32ShellFoldersPath(const TQString& folder) {
return getWin32RegistryValue(HKEY_CURRENT_USER,
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", folder);
}
@@ -77,7 +77,7 @@ inline QString getWin32ShellFoldersPath(const QString& folder) {
Used by KPropertiesDialog, if possible.
*/
KDEWIN32_EXPORT
-bool showWin32FilePropertyDialog(const QString& fileName);
+bool showWin32FilePropertyDialog(const TQString& fileName);
/**
\return two-letter locale name (like "en" or "pl") taken from MS Windows native registry.
@@ -85,12 +85,12 @@ bool showWin32FilePropertyDialog(const QString& fileName);
Used e.g. by kbuildsycoca application.
*/
KDEWIN32_EXPORT
-QCString getWin32LocaleName();
+TQCString getWin32LocaleName();
/*! Temporary solutiuon
- \return a KFileDialog-compatible filter string converted to QFileDialog compatible one.
+ \return a KFileDialog-compatible filter string converted to TQFileDialog compatible one.
This is temporary solution for kdelibs/win32... */
-KDEWIN32_EXPORT QString convertKFileDialogFilterToQFileDialogFilter(const QString& filter);
+KDEWIN32_EXPORT TQString convertKFileDialogFilterToTQFileDialogFilter(const TQString& filter);
#endif //__cplusplus