summaryrefslogtreecommitdiffstats
path: root/src/modules/torrent/tc_ktorrentdcopinterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/torrent/tc_ktorrentdcopinterface.cpp')
-rw-r--r--src/modules/torrent/tc_ktorrentdcopinterface.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/modules/torrent/tc_ktorrentdcopinterface.cpp b/src/modules/torrent/tc_ktorrentdcopinterface.cpp
index 8e770bfc..d6047194 100644
--- a/src/modules/torrent/tc_ktorrentdcopinterface.cpp
+++ b/src/modules/torrent/tc_ktorrentdcopinterface.cpp
@@ -36,7 +36,7 @@
#include "kvi_locale.h"
-#include <qtimer.h>
+#include <tqtimer.h>
TORR_IMPLEMENT_DESCRIPTOR(
KviKTorrentDCOPInterface,
@@ -49,16 +49,16 @@ TORR_IMPLEMENT_DESCRIPTOR(
)
#define ERROR_MSG \
- QCString msg; \
+ TQCString msg; \
if (!findRunningApp(m_szAppId)) \
msg = "KTorrent's isn't running!"; \
else \
msg = "Something's wrong here! KTorrent's DCOP interface has probably changed."; \
- m_lastError = __tr2qs_ctx(QString(msg), "torrent"); \
+ m_lastError = __tr2qs_ctx(TQString(msg), "torrent"); \
debug("%s (%s:%d): %s", __PRETTY_FUNCTION__, __FILE__, __LINE__, (const char*)msg); \
#define ERROR_MSG_RANGE(I, SIZE) \
- KviQString::sprintf(m_lastError, __tr2qs_ctx("Index out of range: %d [0-%d]!", "torrent"), I, (SIZE>0)?(SIZE-1):0); \
+ KviTQString::sprintf(m_lastError, __tr2qs_ctx("Index out of range: %d [0-%d]!", "torrent"), I, (SIZE>0)?(SIZE-1):0); \
debug("%s (%s:%d): Index out of range: %d [0-%d]!", __PRETTY_FUNCTION__ , __FILE__, __LINE__, I, (SIZE>0)?(SIZE-1):0);
#define ERROR_RET_BOOL \
@@ -112,8 +112,8 @@ KviKTorrentDCOPInterface::KviKTorrentDCOPInterface()
{
printf("KviKTorrentDCOPInterface\n");
- QTimer *timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()), this, SLOT(slotTimer()));
+ TQTimer *timer = new TQTimer(this);
+ connect(timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimer()));
timer->start(250, FALSE);
// make sure we have a list of files,
@@ -166,7 +166,7 @@ int KviKTorrentDCOPInterface::detect()
return 100;
}
-bool makeSize(float &sz, const QString &s, const QString &u)
+bool makeSize(float &sz, const TQString &s, const TQString &u)
{
bool ok;
sz = s.toFloat(&ok);
@@ -222,14 +222,14 @@ bool KviKTorrentDCOPInterface::announce(int i)
return true;
}
-QString KviKTorrentDCOPInterface::state(int i)
+TQString KviKTorrentDCOPInterface::state(int i)
{
CHECK_RANGE_STRING(i, m_ti.size())
return m_ti[i].state;
}
-QString KviKTorrentDCOPInterface::name(int i)
+TQString KviKTorrentDCOPInterface::name(int i)
{
CHECK_RANGE_STRING(i, m_ti.size())
@@ -247,7 +247,7 @@ int KviKTorrentDCOPInterface::fileCount(int i)
return ret;
}
-QString KviKTorrentDCOPInterface::fileName(int i, int file)
+TQString KviKTorrentDCOPInterface::fileName(int i, int file)
{
CHECK_RANGE_STRING(i, m_ti.size())
@@ -260,11 +260,11 @@ QString KviKTorrentDCOPInterface::fileName(int i, int file)
return ret[file];
}
-QString KviKTorrentDCOPInterface::filePriority(int i, int file)
+TQString KviKTorrentDCOPInterface::filePriority(int i, int file)
{
CHECK_RANGE_STRING(i, m_ti.size())
- QValueList<int> ret;
+ TQValueList<int> ret;
if (!qvalueListIntRetIntDCOPCall("KTorrent", "getFilePriorities(int)",ret, m_ti[i].num))
ERROR_RET_STRING
@@ -281,7 +281,7 @@ QString KviKTorrentDCOPInterface::filePriority(int i, int file)
ERROR_RET_STRING
}
-bool KviKTorrentDCOPInterface::setFilePriority(int i, int file, const QString &prio)
+bool KviKTorrentDCOPInterface::setFilePriority(int i, int file, const TQString &prio)
{
CHECK_RANGE_BOOL(i, m_ti.size())
@@ -330,7 +330,7 @@ float KviKTorrentDCOPInterface::speedUp()
if (!qcstringListRetVoidDCOPCall("KTorrent", "getInfo()", ret))
ERROR_RET_NUM
- QStringList tmp = QStringList::split(" ", ret[2]);
+ TQStringList tmp = TQStringList::split(" ", ret[2]);
if (tmp.size() != 8)
ERROR_RET_NUM
@@ -348,7 +348,7 @@ float KviKTorrentDCOPInterface::speedDown()
if (!qcstringListRetVoidDCOPCall("KTorrent", "getInfo()", ret))
ERROR_RET_NUM
- QStringList tmp = QStringList::split(" ", ret[2]);
+ TQStringList tmp = TQStringList::split(" ", ret[2]);
if (tmp.size() != 8)
ERROR_RET_NUM
@@ -366,7 +366,7 @@ float KviKTorrentDCOPInterface::trafficUp()
if (!qcstringListRetVoidDCOPCall("KTorrent", "getInfo()", ret))
ERROR_RET_NUM
- QStringList tmp = QStringList::split(" ", ret[1]);
+ TQStringList tmp = TQStringList::split(" ", ret[1]);
if (tmp.size() != 8)
ERROR_RET_NUM
@@ -383,7 +383,7 @@ float KviKTorrentDCOPInterface::trafficDown()
if (!qcstringListRetVoidDCOPCall("KTorrent", "getInfo()", ret))
ERROR_RET_NUM
- QStringList tmp = QStringList::split(" ", ret[1]);
+ TQStringList tmp = TQStringList::split(" ", ret[1]);
if (tmp.size() != 8)
ERROR_RET_NUM
@@ -412,29 +412,29 @@ bool KviKTorrentDCOPInterface::makeTorrentInfo(TorrentInfo &ti, const KviQCStrin
ti.state = "Stopped";
- QStringList tmp;
- tmp = QStringList::split(" ", ret[2]);
+ TQStringList tmp;
+ tmp = TQStringList::split(" ", ret[2]);
if (tmp.size()!=2 || !makeSize(ti.trafficDown, tmp[0], tmp[1]))
ERROR_RET_BOOL
- tmp = QStringList::split(" ", ret[3]);
+ tmp = TQStringList::split(" ", ret[3]);
if (tmp.size()!=2 || !makeSize(ti.size, tmp[0], tmp[1]))
ERROR_RET_BOOL
- tmp = QStringList::split(" ", ret[4]);
+ tmp = TQStringList::split(" ", ret[4]);
if (tmp.size()!=2 || !makeSize(ti.trafficUp, tmp[0], tmp[1]))
ERROR_RET_BOOL
bool ok;
- tmp = QStringList::split(" ", ret[5]);
+ tmp = TQStringList::split(" ", ret[5]);
if (tmp.size()!=2)
ERROR_RET_BOOL
ti.speedDown = tmp[0].toFloat(&ok);
if (!ok)
ERROR_RET_BOOL
- tmp = QStringList::split(" ", ret[6]);
+ tmp = TQStringList::split(" ", ret[6]);
if (tmp.size()!=2)
ERROR_RET_BOOL
ti.speedUp = tmp[0].toFloat(&ok);
@@ -447,7 +447,7 @@ bool KviKTorrentDCOPInterface::makeTorrentInfo(TorrentInfo &ti, const KviQCStrin
if (!ok)
ERROR_RET_BOOL
- tmp = QStringList::split(" ", ret[9]);
+ tmp = TQStringList::split(" ", ret[9]);
if (tmp.size()!=2)
ERROR_RET_BOOL
ti.percent = tmp[0].toFloat(&ok);