[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/network/ktorrent/libbtcore
From: Joris Guisson <joris.guisson () gmail ! com>
Date: 2008-11-05 8:35:55
Message-ID: 1225874155.184507.28488.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 880336 by guisson:
Added some minor optimizations (thanks to MoDaX for the patch)
M +4 -2 diskio/chunkmanager.cpp
M +3 -2 torrent/torrentcontrol.cpp
--- trunk/extragear/network/ktorrent/libbtcore/diskio/chunkmanager.cpp #880335:880336
@@ -745,7 +745,8 @@
}
cache->downloadStatusChanged(tf,download);
savePriorityInfo();
- tor.updateFilePercentage(*this);
+ if (!during_load)
+ tor.updateFilePercentage(*this);
return;
}
@@ -776,7 +777,8 @@
// alert the cache but first put things in critical operation mode
cache->downloadStatusChanged(tf,download);
savePriorityInfo();
- tor.updateFilePercentage(*this);
+ if (!during_load)
+ tor.updateFilePercentage(*this);
}
void ChunkManager::downloadPriorityChanged(TorrentFile* tf,Priority newpriority,Priority oldpriority)
--- trunk/extragear/network/ktorrent/libbtcore/torrent/torrentcontrol.cpp #880335:880336
@@ -663,10 +663,11 @@
// Create chunkmanager, load the index file if it exists
// else create all the necesarry files
cman = new ChunkManager(*tor,tordir,outputdir,istats.custom_output_name,cache_factory);
- connect(cman,SIGNAL(updateStats()),this,SLOT(updateStats()));
if (bt::Exists(tordir + "index"))
cman->loadIndexFile();
-
+
+ connect(cman,SIGNAL(updateStats()),this,SLOT(updateStats()));
+ updateStats();
stats.completed = cman->completed();
// create downloader,uploader and choker
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic