summaryrefslogtreecommitdiffstats
path: root/libktorrent/util/mmapfile.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 20:34:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 20:34:15 +0000
commit1c1403293485f35fd53db45aaa77a01cdd9627e7 (patch)
tree38559cd68cd4f63023fb5f6375def9db3b8b491e /libktorrent/util/mmapfile.cpp
parent894f94545727610df22c4f73911d62d58266f695 (diff)
downloadktorrent-1c1403293485f35fd53db45aaa77a01cdd9627e7.tar.gz
ktorrent-1c1403293485f35fd53db45aaa77a01cdd9627e7.zip
TQt4 port ktorrent
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktorrent@1238733 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libktorrent/util/mmapfile.cpp')
-rw-r--r--libktorrent/util/mmapfile.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/libktorrent/util/mmapfile.cpp b/libktorrent/util/mmapfile.cpp
index 579c67a..811acd7 100644
--- a/libktorrent/util/mmapfile.cpp
+++ b/libktorrent/util/mmapfile.cpp
@@ -29,7 +29,7 @@
#include <sys/mman.h>
#include <sys/stat.h>
#include <errno.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kfileitem.h>
#include <kio/netaccess.h>
#include <klocale.h>
@@ -51,20 +51,20 @@ namespace bt
close();
}
- bool MMapFile::open(const QString & file,Mode mode)
+ bool MMapFile::open(const TQString & file,Mode mode)
{
#if HAVE_STAT64
struct stat64 sb;
- stat64(QFile::encodeName(file),&sb);
+ stat64(TQFile::encodeName(file),&sb);
#else
struct stat sb;
- stat(QFile::encodeName(file),&sb);
+ stat(TQFile::encodeName(file),&sb);
#endif
return open(file,mode,(Uint64)sb.st_size);
}
- bool MMapFile::open(const QString & file,Mode mode,Uint64 size)
+ bool MMapFile::open(const TQString & file,Mode mode,Uint64 size)
{
// close already open file
if (fd > 0)
@@ -97,7 +97,7 @@ namespace bt
#endif
// open the file
- fd = ::open(QFile::encodeName(file) , flag);//(int)flag);
+ fd = ::open(TQFile::encodeName(file) , flag);//(int)flag);
if (fd == -1)
return false;
@@ -107,10 +107,10 @@ namespace bt
#if HAVE_STAT64
struct stat64 sb;
- stat64(QFile::encodeName(file),&sb);
+ stat64(TQFile::encodeName(file),&sb);
#else
struct stat sb;
- stat(QFile::encodeName(file),&sb);
+ stat(TQFile::encodeName(file),&sb);
#endif
file_size = (Uint64)sb.st_size;
filename = file;
@@ -146,7 +146,7 @@ namespace bt
ptr = size = 0;
data = 0;
fd = -1;
- filename = QString::null;
+ filename = TQString();
}
}
@@ -274,7 +274,7 @@ namespace bt
return ptr;
}
- QString MMapFile::errorString() const
+ TQString MMapFile::errorString() const
{
return strerror(errno);
}