mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
- A queueing system ASSERT hit fix
This commit is contained in:
parent
db1bbea26a
commit
48ec57604f
@ -204,6 +204,7 @@ void bittorrent::setMaxActiveTorrents(int val) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void bittorrent::increaseDlTorrentPriority(QString hash) {
|
void bittorrent::increaseDlTorrentPriority(QString hash) {
|
||||||
|
Q_ASSERT(queueingEnabled);
|
||||||
int index = downloadQueue->indexOf(hash);
|
int index = downloadQueue->indexOf(hash);
|
||||||
Q_ASSERT(index != -1);
|
Q_ASSERT(index != -1);
|
||||||
if(index > 0) {
|
if(index > 0) {
|
||||||
@ -215,6 +216,7 @@ void bittorrent::increaseDlTorrentPriority(QString hash) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void bittorrent::increaseUpTorrentPriority(QString hash) {
|
void bittorrent::increaseUpTorrentPriority(QString hash) {
|
||||||
|
Q_ASSERT(queueingEnabled);
|
||||||
int index = uploadQueue->indexOf(hash);
|
int index = uploadQueue->indexOf(hash);
|
||||||
Q_ASSERT(index != -1);
|
Q_ASSERT(index != -1);
|
||||||
if(index > 0) {
|
if(index > 0) {
|
||||||
@ -226,6 +228,7 @@ void bittorrent::increaseUpTorrentPriority(QString hash) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void bittorrent::decreaseDlTorrentPriority(QString hash) {
|
void bittorrent::decreaseDlTorrentPriority(QString hash) {
|
||||||
|
Q_ASSERT(queueingEnabled);
|
||||||
int index = downloadQueue->indexOf(hash);
|
int index = downloadQueue->indexOf(hash);
|
||||||
Q_ASSERT(index != -1);
|
Q_ASSERT(index != -1);
|
||||||
if(index >= 0 && index < (downloadQueue->size()-1)) {
|
if(index >= 0 && index < (downloadQueue->size()-1)) {
|
||||||
@ -237,6 +240,7 @@ void bittorrent::decreaseDlTorrentPriority(QString hash) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void bittorrent::decreaseUpTorrentPriority(QString hash) {
|
void bittorrent::decreaseUpTorrentPriority(QString hash) {
|
||||||
|
Q_ASSERT(queueingEnabled);
|
||||||
int index = uploadQueue->indexOf(hash);
|
int index = uploadQueue->indexOf(hash);
|
||||||
Q_ASSERT(index != -1);
|
Q_ASSERT(index != -1);
|
||||||
if(index >= 0 && index < (uploadQueue->size()-1)) {
|
if(index >= 0 && index < (uploadQueue->size()-1)) {
|
||||||
@ -817,8 +821,10 @@ bool bittorrent::resumeTorrent(QString hash) {
|
|||||||
torrentsToPauseAfterChecking.removeAt(index);
|
torrentsToPauseAfterChecking.removeAt(index);
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
updateDownloadQueue();
|
if(queueingEnabled) {
|
||||||
updateUploadQueue();
|
updateDownloadQueue();
|
||||||
|
updateUploadQueue();
|
||||||
|
}
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user