From 1c1403293485f35fd53db45aaa77a01cdd9627e7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 28 Jun 2011 20:34:15 +0000 Subject: 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 --- libktorrent/util/file.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libktorrent/util/file.cpp') diff --git a/libktorrent/util/file.cpp b/libktorrent/util/file.cpp index b898e07..f757142 100644 --- a/libktorrent/util/file.cpp +++ b/libktorrent/util/file.cpp @@ -22,7 +22,7 @@ #include #endif -#include +#include #include "config.h" #include #include @@ -45,15 +45,15 @@ namespace bt close(); } - bool File::open(const QString & file,const QString & mode) + bool File::open(const TQString & file,const TQString & mode) { this->file = file; if (fptr) close(); #if HAVE_FOPEN64 - fptr = fopen64(QFile::encodeName(file),mode.ascii()); + fptr = fopen64(TQFile::encodeName(file),mode.ascii()); #else - fptr = fopen(QFile::encodeName(file),mode.ascii()); + fptr = fopen(TQFile::encodeName(file),mode.ascii()); #endif return fptr != 0; } @@ -84,7 +84,7 @@ namespace bt if (errno == ENOSPC) Out() << "Disk full !" << endl; - throw Error(i18n("Cannot write to %1 : %2").arg(file).arg(strerror(errno))); + throw Error(i18n("Cannot write to %1 : %2").tqarg(file).tqarg(strerror(errno))); } return ret; } @@ -98,7 +98,7 @@ namespace bt if (ferror(fptr)) { clearerr(fptr); - throw Error(i18n("Cannot read from %1").arg(file)); + throw Error(i18n("Cannot read from %1").tqarg(file)); } return ret; } @@ -143,8 +143,8 @@ namespace bt return ftello(fptr); } - QString File::errorString() const + TQString File::errorString() const { - return QString(strerror(errno)); + return TQString(strerror(errno)); } } -- cgit v1.2.1