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/kademlia/kbucket.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'libktorrent/kademlia/kbucket.cpp') diff --git a/libktorrent/kademlia/kbucket.cpp b/libktorrent/kademlia/kbucket.cpp index fb60d1b..76986b9 100644 --- a/libktorrent/kademlia/kbucket.cpp +++ b/libktorrent/kademlia/kbucket.cpp @@ -119,7 +119,7 @@ namespace dht void KBucket::insert(const KBucketEntry & entry) { - QValueList::iterator i = entries.find(entry); + TQValueList::iterator i = entries.tqfind(entry); // If in the list, move it to the end if (i != entries.end()) @@ -149,7 +149,7 @@ namespace dht { last_modified = bt::GetCurrentTime(); - if (!pending_entries_busy_pinging.contains(c)) + if (!pending_entries_busy_pinging.tqcontains(c)) return; KBucketEntry entry = pending_entries_busy_pinging[c]; @@ -166,13 +166,13 @@ namespace dht void KBucket::onTimeout(RPCCall* c) { - if (!pending_entries_busy_pinging.contains(c)) + if (!pending_entries_busy_pinging.tqcontains(c)) return; KBucketEntry entry = pending_entries_busy_pinging[c]; // replace the entry which timed out - QValueList::iterator i; + TQValueList::iterator i; for (i = entries.begin();i != entries.end();i++) { KBucketEntry & e = *i; @@ -203,7 +203,7 @@ namespace dht return; } - QValueList::iterator i; + TQValueList::iterator i; // we haven't found any bad ones so try the questionable ones for (i = entries.begin();i != entries.end();i++) { @@ -228,7 +228,7 @@ namespace dht bool KBucket::replaceBadEntry(const KBucketEntry & entry) { - QValueList::iterator i; + TQValueList::iterator i; for (i = entries.begin();i != entries.end();i++) { KBucketEntry & e = *i; @@ -244,14 +244,14 @@ namespace dht return false; } - bool KBucket::contains(const KBucketEntry & entry) const + bool KBucket::tqcontains(const KBucketEntry & entry) const { - return entries.contains(entry); + return entries.tqcontains(entry); } void KBucket::findKClosestNodes(KClosestNodesSearch & kns) { - QValueList::iterator i = entries.begin(); + TQValueList::iterator i = entries.begin(); while (i != entries.end()) { kns.tryInsert(*i); @@ -261,7 +261,7 @@ namespace dht bool KBucket::onTimeout(const KInetSocketAddress & addr) { - QValueList::iterator i; + TQValueList::iterator i; for (i = entries.begin();i != entries.end();i++) { @@ -302,7 +302,7 @@ namespace dht hdr.num_entries = entries.count(); fptr.write(&hdr,sizeof(BucketHeader)); - QValueList::iterator i; + TQValueList::iterator i; for (i = entries.begin();i != entries.end();i++) { KBucketEntry & e = *i; @@ -345,8 +345,8 @@ namespace dht refresh_task = t; if (refresh_task) { - connect(refresh_task,SIGNAL(finished( Task* )), - this,SLOT(onFinished( Task* ))); + connect(refresh_task,TQT_SIGNAL(finished( Task* )), + this,TQT_SLOT(onFinished( Task* ))); } } -- cgit v1.2.1