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/interfaces/functions.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'libktorrent/interfaces/functions.cpp') diff --git a/libktorrent/interfaces/functions.cpp b/libktorrent/interfaces/functions.cpp index 2c6286f..cade53a 100644 --- a/libktorrent/interfaces/functions.cpp +++ b/libktorrent/interfaces/functions.cpp @@ -17,7 +17,7 @@ * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include +#include #include #include #include "functions.h" @@ -28,32 +28,32 @@ namespace kt { - QString BytesToString(Uint64 bytes,int precision) + TQString BytesToString(Uint64 bytes,int precision) { KLocale* loc = KGlobal::locale(); if (bytes >= 1024 * 1024 * 1024) - return i18n("%1 GB").arg(loc->formatNumber(bytes / TO_GIG,precision < 0 ? 2 : precision)); + return i18n("%1 GB").tqarg(loc->formatNumber(bytes / TO_GIG,precision < 0 ? 2 : precision)); else if (bytes >= 1024*1024) - return i18n("%1 MB").arg(loc->formatNumber(bytes / TO_MEG,precision < 0 ? 1 : precision)); + return i18n("%1 MB").tqarg(loc->formatNumber(bytes / TO_MEG,precision < 0 ? 1 : precision)); else if (bytes >= 1024) - return i18n("%1 KB").arg(loc->formatNumber(bytes / TO_KB,precision < 0 ? 1 : precision)); + return i18n("%1 KB").tqarg(loc->formatNumber(bytes / TO_KB,precision < 0 ? 1 : precision)); else - return i18n("%1 B").arg(bytes); + return i18n("%1 B").tqarg(bytes); } - QString KBytesPerSecToString(double speed,int precision) + TQString KBytesPerSecToString(double speed,int precision) { KLocale* loc = KGlobal::locale(); - return i18n("%1 KB/s").arg(loc->formatNumber(speed,precision)); + return i18n("%1 KB/s").tqarg(loc->formatNumber(speed,precision)); } - QString DurationToString(Uint32 nsecs) + TQString DurationToString(Uint32 nsecs) { KLocale* loc = KGlobal::locale(); - QTime t; + TQTime t; int ndays = nsecs / 86400; t = t.addSecs(nsecs % 86400); - QString s = loc->formatTime(t,true,true); + TQString s = loc->formatTime(t,true,true); if (ndays > 0) s = i18n("1 day ","%n days ",ndays) + s; -- cgit v1.2.1