summaryrefslogtreecommitdiffstats
path: root/src/kvilib/file/kvi_file.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
commit0a80cfd57d271dd44221467efb426675fa470356 (patch)
tree6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/kvilib/file/kvi_file.h
parent3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff)
downloadkvirc-0a80cfd57d271dd44221467efb426675fa470356.tar.gz
kvirc-0a80cfd57d271dd44221467efb426675fa470356.zip
TQt4 port kvirc
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kvilib/file/kvi_file.h')
-rw-r--r--src/kvilib/file/kvi_file.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/kvilib/file/kvi_file.h b/src/kvilib/file/kvi_file.h
index 188a9dad..7cce041f 100644
--- a/src/kvilib/file/kvi_file.h
+++ b/src/kvilib/file/kvi_file.h
@@ -33,29 +33,33 @@
#include "kvi_inttypes.h"
#include "kvi_qcstring.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <time.h>
#ifdef COMPILE_USE_QT4
#define kvi_file_offset_t qlonglong
#else
- #define kvi_file_offset_t QFile::Offset
+#ifdef USE_QT4
+ #define kvi_file_offset_t qint64
+#else // USE_QT4
+ #define kvi_file_offset_t TQFile::Offset
+#endif // USE_QT4
#endif
-class KVILIB_API KviFile : public QFile, public KviHeapObject
+class KVILIB_API KviFile : public TQFile, public KviHeapObject
{
public:
KviFile();
- KviFile(const QString &name);
+ KviFile(const TQString &name);
~KviFile();
public:
- // Wrappers portable across Qt 3.x and Qt 4.x
+ // Wrappers portable across TQt 3.x and TQt 4.x
bool openForReading();
bool openForWriting(bool bAppend = false);
#ifndef COMPILE_USE_QT4
- // Functions present in Qt 4.x but not Qt 3.x
+ // Functions present in TQt 4.x but not TQt 3.x
bool putChar(char c){ return putch(c) != -1; };
bool ungetChar(char c){ return ungetch(c) != -1; };
bool getChar(char * c){ *c = getch(); return *c != -1; };
@@ -64,7 +68,7 @@ public:
#endif
#ifdef COMPILE_USE_QT4
- // Missing functions in Qt 4.x
+ // Missing functions in TQt 4.x
quint64 writeBlock(const char * data,quint64 uLen){ return write(data,uLen); };
quint64 readBlock(char * data,quint64 uLen){ return read(data,uLen); };
#endif
@@ -98,16 +102,16 @@ public:
bool load(KviStr &szData);
#ifndef COMPILE_USE_QT4
- // Under Qt 4.x these collide with QByteArray
- bool save(const KviQCString &szData);
- bool load(KviQCString &szData);
+ // Under TQt 4.x these collide with TQByteArray
+ bool save(const KviTQCString &szData);
+ bool load(KviTQCString &szData);
#endif
- bool save(const QByteArray &bData);
- bool load(QByteArray &bData);
+ bool save(const TQByteArray &bData);
+ bool load(TQByteArray &bData);
- bool save(const QString &szData);
- bool load(QString &szData);
+ bool save(const TQString &szData);
+ bool load(TQString &szData);
bool skipFirst(char t,unsigned int maxdist = 0xffffffff);
bool skipFirst(const KviStr &t,unsigned int maxdist = 0xffffffff);