summaryrefslogtreecommitdiffstats
path: root/lib/libchmfile/qt34.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-29 19:00:37 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-29 19:00:37 +0000
commit25794f504692e5a36c490438814e9dfda8aaa2dd (patch)
tree8061e6d27b5bc9042afdff177872779c4e8c9015 /lib/libchmfile/qt34.cpp
parent35ff2a942f63b5201c04f41c3097e61cdd7817e9 (diff)
downloadkchmviewer-25794f504692e5a36c490438814e9dfda8aaa2dd.tar.gz
kchmviewer-25794f504692e5a36c490438814e9dfda8aaa2dd.zip
TQt4 port kchmviewer
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kchmviewer@1234150 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/libchmfile/qt34.cpp')
-rw-r--r--lib/libchmfile/qt34.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/lib/libchmfile/qt34.cpp b/lib/libchmfile/qt34.cpp
index fd7028a..e1194f9 100644
--- a/lib/libchmfile/qt34.cpp
+++ b/lib/libchmfile/qt34.cpp
@@ -19,9 +19,9 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qdir.h>
+#include <tqdir.h>
-#include "qt34.h"
+#include "tqt34.h"
LIBCHMCString::LIBCHMCString()
{
@@ -29,10 +29,10 @@ LIBCHMCString::LIBCHMCString()
LIBCHMCString::LIBCHMCString(const char *string)
{
-#if defined (USE_QT_4)
- cs = QByteArray(string);
+#if defined (USE_TQT_4)
+ cs = TQByteArray(string);
#else
- cs = QCString(string);
+ cs = TQCString(string);
#endif
}
@@ -45,16 +45,16 @@ const char *LIBCHMCString::toCString() const
void LIBCHMCString::clear()
{
-#if defined (USE_QT_4)
- cs = QByteArray();
+#if defined (USE_TQT_4)
+ cs = TQByteArray();
#else
- cs = QCString();
+ cs = TQCString();
#endif
}
-bool LIBCHMCString::operator==(const QString &string) const
+bool LIBCHMCString::operator==(const TQString &string) const
{
- return QString(cs) == string;
+ return TQString(cs) == string;
}
uint LIBCHMCString::length() const
@@ -77,9 +77,9 @@ char LIBCHMCString::at(uint i) const
return cs.at(i);
}
-void LIBCHMCString::replace(uint index, uint len, const char *str)
+void LIBCHMCString::tqreplace(uint index, uint len, const char *str)
{
- cs.replace(index, len, str);
+ cs.tqreplace(index, len, str);
}
void LIBCHMCString::remove(uint index, uint len)
@@ -89,7 +89,7 @@ void LIBCHMCString::remove(uint index, uint len)
LIBCHMCString LIBCHMCString::lower()
{
-#if defined (USE_QT_4)
+#if defined (USE_TQT_4)
return cs.toLower().data();
#else
return cs.lower().data();
@@ -98,21 +98,21 @@ LIBCHMCString LIBCHMCString::lower()
-LIBCHMRegExp::LIBCHMRegExp(const QString &regexp)
+LIBCHMRegExp::LIBCHMRegExp(const TQString &regexp)
{
- re = QRegExp(regexp);
+ re = TQRegExp(regexp);
}
-int LIBCHMRegExp::search(const QString &str, int offset)
+int LIBCHMRegExp::search(const TQString &str, int offset)
{
-#if defined (USE_QT_4)
+#if defined (USE_TQT_4)
return re.indexIn(str, offset);
#else
return re.search(str, offset);
#endif
}
-QString LIBCHMRegExp::cap(int nth)
+TQString LIBCHMRegExp::cap(int nth)
{
return re.cap(nth);
}
@@ -134,19 +134,19 @@ LIBCHMString::LIBCHMString()
{
}
-LIBCHMString::LIBCHMString(const QString &string)
+LIBCHMString::LIBCHMString(const TQString &string)
{
s = string;
}
LIBCHMString::LIBCHMString(const char *string)
{
- s = QString(string);
+ s = TQString(string);
}
-QString LIBCHMString::lower() const
+TQString LIBCHMString::lower() const
{
-#if defined (USE_QT_4)
+#if defined (USE_TQT_4)
return s.toLower();
#else
return s.lower();
@@ -155,58 +155,58 @@ QString LIBCHMString::lower() const
const char *LIBCHMString::ascii() const
{
-#if defined (USE_QT_4)
+#if defined (USE_TQT_4)
return s.toAscii();
#else
return s.ascii();
#endif
}
-int LIBCHMString::find(char c, int index) const
+int LIBCHMString::tqfind(char c, int index) const
{
-#if defined (USE_QT_4)
+#if defined (USE_TQT_4)
return s.indexOf(c, index);
#else
- return s.find(c, index);
+ return s.tqfind(c, index);
#endif
}
-int LIBCHMString::find(const QChar &c, int index) const
+int LIBCHMString::tqfind(const TQChar &c, int index) const
{
-#if defined (USE_QT_4)
+#if defined (USE_TQT_4)
return s.indexOf(c, index);
#else
- return s.find(c, index);
+ return s.tqfind(c, index);
#endif
}
-int LIBCHMString::find(const QString &string, int index, bool cs) const
+int LIBCHMString::tqfind(const TQString &string, int index, bool cs) const
{
-#if defined (USE_QT_4)
- Qt::CaseSensitivity cse;
- if (cs) cse = Qt::CaseSensitive;
- else cse = Qt::CaseInsensitive;
+#if defined (USE_TQT_4)
+ TQt::CaseSensitivity cse;
+ if (cs) cse = TQt::CaseSensitive;
+ else cse = TQt::CaseInsensitive;
return s.indexOf(string, index, cse);
#else
- return s.find(string, index, cs);
+ return s.tqfind(string, index, cs);
#endif
}
-int LIBCHMString::findRev(char c) const
+int LIBCHMString::tqfindRev(char c) const
{
-#if defined (USE_QT_4)
+#if defined (USE_TQT_4)
return s.lastIndexOf(c);
#else
- return s.findRev(c);
+ return s.tqfindRev(c);
#endif
}
-QChar LIBCHMString::at(uint i) const
+TQChar LIBCHMString::at(uint i) const
{
return s.at(i);
}
-QString LIBCHMString::left(uint len) const
+TQString LIBCHMString::left(uint len) const
{
return s.left(len);
}
@@ -221,39 +221,39 @@ bool LIBCHMString::isEmpty() const
return s.isEmpty();
}
-QString LIBCHMString::toString() const
+TQString LIBCHMString::toString() const
{
return s;
}
-bool LIBCHMString::operator==(const QString &string) const
+bool LIBCHMString::operator==(const TQString &string) const
{
return s == string;
}
-QString LIBCHMDir::cleanDirPath(const QString &dir)
+TQString LIBCHMDir::cleanDirPath(const TQString &dir)
{
-#if defined (USE_QT_4)
- return QDir::cleanPath(dir);
+#if defined (USE_TQT_4)
+ return TQDir::cleanPath(dir);
#else
- return QDir::cleanDirPath(dir);
+ return TQDir::cleanDirPath(dir);
#endif
}
-bool LIBCHMStringList::contains(const QStringList &list, const QString &string)
+bool LIBCHMStringList::tqcontains(const TQStringList &list, const TQString &string)
{
- return list.contains(string);
+ return list.tqcontains(string);
}
-QStringList LIBCHMStringList::split(const QRegExp &regexp, const QString &string)
+TQStringList LIBCHMStringList::split(const TQRegExp &regexp, const TQString &string)
{
-#if defined (USE_QT_4)
- return string.split(regexp, QString::SkipEmptyParts);
+#if defined (USE_TQT_4)
+ return string.split(regexp, TQString::SkipEmptyParts);
#else
- return QStringList::split(regexp, string);
+ return TQStringList::split(regexp, string);
#endif
}