diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-28 20:34:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-28 20:34:15 +0000 |
commit | 1c1403293485f35fd53db45aaa77a01cdd9627e7 (patch) | |
tree | 38559cd68cd4f63023fb5f6375def9db3b8b491e /libktorrent/kademlia/announcetask.cpp | |
parent | 894f94545727610df22c4f73911d62d58266f695 (diff) | |
download | ktorrent-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 'libktorrent/kademlia/announcetask.cpp')
-rw-r--r-- | libktorrent/kademlia/announcetask.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libktorrent/kademlia/announcetask.cpp b/libktorrent/kademlia/announcetask.cpp index b7350a2..5e5b925 100644 --- a/libktorrent/kademlia/announcetask.cpp +++ b/libktorrent/kademlia/announcetask.cpp @@ -52,13 +52,13 @@ namespace dht if (gpr->containsNodes()) { - const QByteArray & n = gpr->getData(); + const TQByteArray & n = gpr->getData(); Uint32 nval = n.size() / 26; for (Uint32 i = 0;i < nval;i++) { // add node to todo list KBucketEntry e = UnpackBucketEntry(n,i*26); - if (!todo.contains(e) && !visited.contains(e) && + if (!todo.tqcontains(e) && !visited.tqcontains(e) && todo.count() < 100) { todo.append(e); @@ -78,7 +78,7 @@ namespace dht // add the peer who responded to the answered list, so we can do an announce KBucketEntry e(rsp->getOrigin(),rsp->getID()); - if (!answered.contains(KBucketEntryAndToken(e,gpr->getToken())) && !answered_visited.contains(e)) + if (!answered.tqcontains(KBucketEntryAndToken(e,gpr->getToken())) && !answered_visited.tqcontains(e)) { answered.append(KBucketEntryAndToken(e,gpr->getToken())); } @@ -101,7 +101,7 @@ namespace dht while (!answered.empty() && canDoRequest()) { KBucketEntryAndToken & e = answered.first(); - if (!answered_visited.contains(e)) + if (!answered_visited.tqcontains(e)) { AnnounceReq* anr = new AnnounceReq(node->getOurID(),info_hash,port,e.getToken()); anr->setOrigin(e.getAddress()); @@ -117,7 +117,7 @@ namespace dht { KBucketEntry e = todo.first(); // onLy send a findNode if we haven't allrready visited the node - if (!visited.contains(e)) + if (!visited.tqcontains(e)) { // send a findNode to the node GetPeersReq* gpr = new GetPeersReq(node->getOurID(),info_hash); |