|
|
@ -65,6 +65,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){ |
|
|
|
systrayIntegration = false; |
|
|
|
systrayIntegration = false; |
|
|
|
qDebug("Info: System tray unavailable\n"); |
|
|
|
qDebug("Info: System tray unavailable\n"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
delayedSorting = false; |
|
|
|
// Finished torrents tab
|
|
|
|
// Finished torrents tab
|
|
|
|
finishedTorrentTab = new FinishedTorrents(this, &BTSession); |
|
|
|
finishedTorrentTab = new FinishedTorrents(this, &BTSession); |
|
|
|
tabs->addTab(finishedTorrentTab, tr("Finished")); |
|
|
|
tabs->addTab(finishedTorrentTab, tr("Finished")); |
|
|
@ -486,6 +487,8 @@ void GUI::updateDlList(bool force){ |
|
|
|
qDebug("Paused torrent finished checking with state: %d", torrentStatus.state); |
|
|
|
qDebug("Paused torrent finished checking with state: %d", torrentStatus.state); |
|
|
|
DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)torrentStatus.progress)); |
|
|
|
DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)torrentStatus.progress)); |
|
|
|
BTSession.pauseTorrent(fileHash); |
|
|
|
BTSession.pauseTorrent(fileHash); |
|
|
|
|
|
|
|
if(delayedSorting) |
|
|
|
|
|
|
|
sortDownloadListFloat(PROGRESS, delayedSortingOrder); |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -661,9 +664,13 @@ void GUI::sortDownloadList(int index, Qt::SortOrder startSortOrder, bool fromLoa |
|
|
|
case ETA: |
|
|
|
case ETA: |
|
|
|
case UPSPEED: |
|
|
|
case UPSPEED: |
|
|
|
case DLSPEED: |
|
|
|
case DLSPEED: |
|
|
|
case PROGRESS: |
|
|
|
|
|
|
|
sortDownloadListFloat(index, sortOrder); |
|
|
|
sortDownloadListFloat(index, sortOrder); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case PROGRESS: |
|
|
|
|
|
|
|
// Progress sorting must be delayed until files are checked
|
|
|
|
|
|
|
|
delayedSorting = true; |
|
|
|
|
|
|
|
delayedSortingOrder = sortOrder; |
|
|
|
|
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
sortDownloadListString(index, sortOrder); |
|
|
|
sortDownloadListString(index, sortOrder); |
|
|
|
} |
|
|
|
} |
|
|
|