mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Multithreaded deletionThread (harmonized with deleteThread)
This commit is contained in:
parent
5518144b26
commit
570296c29e
4 changed files with 108 additions and 26 deletions
|
@ -194,20 +194,16 @@ class downloadThread : public QThread {
|
|||
protected slots:
|
||||
void propagateDownloadedFile(subDownloadThread* st, QString url, QString path){
|
||||
int index = subThreads.indexOf(st);
|
||||
if(index == -1)
|
||||
std::cerr << "ERROR: Couldn't delete download subThread!\n";
|
||||
else
|
||||
subThreads.takeAt(index);
|
||||
Q_ASSERT(index != -1);
|
||||
subThreads.removeAt(index);
|
||||
delete st;
|
||||
emit downloadFinished(url, path);
|
||||
}
|
||||
|
||||
void propagateDownloadFailure(subDownloadThread* st, QString url, QString reason){
|
||||
int index = subThreads.indexOf(st);
|
||||
if(index == -1)
|
||||
std::cerr << "ERROR: Couldn't delete download subThread!\n";
|
||||
else
|
||||
subThreads.takeAt(index);
|
||||
Q_ASSERT(index != -1);
|
||||
subThreads.removeAt(index);
|
||||
delete st;
|
||||
emit downloadFailure(url, reason);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue