summaryrefslogtreecommitdiffstats
path: root/plugins/scheduler/bwscheduler.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 /plugins/scheduler/bwscheduler.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 'plugins/scheduler/bwscheduler.cpp')
-rw-r--r--plugins/scheduler/bwscheduler.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/plugins/scheduler/bwscheduler.cpp b/plugins/scheduler/bwscheduler.cpp
index 56375b5..a669360 100644
--- a/plugins/scheduler/bwscheduler.cpp
+++ b/plugins/scheduler/bwscheduler.cpp
@@ -31,9 +31,9 @@
#include <util/constants.h>
#include <util/log.h>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqptrlist.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -160,9 +160,9 @@ namespace kt
if(!m_enabled)
return;
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::tqcurrentDateTime();
- QString prefix = QString("BWS: %1 :: ").arg(now.toString());
+ TQString prefix = TQString("BWS: %1 :: ").tqarg(now.toString());
int t1 = now.date().dayOfWeek();
int t2 = now.time().hour();
@@ -172,8 +172,8 @@ namespace kt
{
case CAT_NORMAL:
Out(SYS_SCD|LOG_NOTICE) << prefix << "Switching to NORMAL category" << endl;
- Out(SYS_SCD|LOG_NOTICE) << prefix << QString("%1 Up, %2 Down")
- .arg(m_core->getMaxUploadSpeed()).arg(m_core->getMaxDownloadSpeed()) << endl;
+ Out(SYS_SCD|LOG_NOTICE) << prefix << TQString("%1 Up, %2 Down")
+ .tqarg(m_core->getMaxUploadSpeed()).tqarg(m_core->getMaxDownloadSpeed()) << endl;
if(!m_core)
break;
m_core->setPausedState(false);
@@ -182,8 +182,8 @@ namespace kt
break;
case CAT_FIRST:
Out(SYS_SCD|LOG_NOTICE) << prefix << "Switching to FIRST category" << endl;
- Out(SYS_SCD|LOG_NOTICE) << prefix << QString("%1 Up, %2 Down")
- .arg(m_schedule.getUpload(0)).arg(m_schedule.getDownload(0)) << endl;
+ Out(SYS_SCD|LOG_NOTICE) << prefix << TQString("%1 Up, %2 Down")
+ .tqarg(m_schedule.getUpload(0)).tqarg(m_schedule.getDownload(0)) << endl;
if(!m_core)
break;
m_core->setPausedState(false);
@@ -192,8 +192,8 @@ namespace kt
break;
case CAT_SECOND:
Out(SYS_SCD|LOG_NOTICE) << prefix << "Switching to SECOND category" << endl;
- Out(SYS_SCD|LOG_NOTICE) << prefix << QString("%1 Up, %2 Down")
- .arg(m_schedule.getUpload(1)).arg(m_schedule.getDownload(1)) << endl;
+ Out(SYS_SCD|LOG_NOTICE) << prefix << TQString("%1 Up, %2 Down")
+ .tqarg(m_schedule.getUpload(1)).tqarg(m_schedule.getDownload(1)) << endl;
if(!m_core)
break;
m_core->setPausedState(false);
@@ -202,8 +202,8 @@ namespace kt
break;
case CAT_THIRD:
Out(SYS_SCD|LOG_NOTICE) << prefix << "Switching to THIRD category" << endl;
- Out(SYS_SCD|LOG_NOTICE) << prefix << QString("%1 Up, %2 Down")
- .arg(m_schedule.getUpload(2)).arg(m_schedule.getDownload(2)) << endl;
+ Out(SYS_SCD|LOG_NOTICE) << prefix << TQString("%1 Up, %2 Down")
+ .tqarg(m_schedule.getUpload(2)).tqarg(m_schedule.getDownload(2)) << endl;
if(!m_core)
break;
m_core->setPausedState(false);
@@ -222,13 +222,13 @@ namespace kt
void BWScheduler::loadSchedule()
{
- QFile file(KGlobal::dirs()->saveLocation("data","ktorrent") + "bwschedule");
+ TQFile file(KGlobal::dirs()->saveLocation("data","ktorrent") + "bwschedule");
if(!file.exists())
return;
file.open(IO_ReadOnly);
- QDataStream stream(&file);
+ TQDataStream stream(&file);
int tmp;
@@ -256,10 +256,10 @@ namespace kt
void BWScheduler::saveSchedule()
{
- QFile file(KGlobal::dirs()->saveLocation("data","ktorrent") + "bwschedule");
+ TQFile file(KGlobal::dirs()->saveLocation("data","ktorrent") + "bwschedule");
file.open(IO_WriteOnly);
- QDataStream stream(&file);
+ TQDataStream stream(&file);
for(int i=0; i<3; ++i)
{