mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-09 06:17:58 +00:00
- Fixed finished downloads state on restart
This commit is contained in:
parent
f17b047910
commit
631a9676f4
14
src/GUI.cpp
14
src/GUI.cpp
@ -480,6 +480,12 @@ void GUI::updateDlList(){
|
||||
case torrent_status::finished:
|
||||
case torrent_status::seeding:
|
||||
DLListModel->setData(DLListModel->index(row, UPSPEED), QVariant((double)torrentStatus.upload_payload_rate));
|
||||
DLListModel->setData(DLListModel->index(row, STATUS), QVariant(tr("Finished")));
|
||||
DLListModel->setData(DLListModel->index(row, DLSPEED), QVariant((double)0.));
|
||||
DLListModel->setData(DLListModel->index(row, ETA), QVariant((qlonglong)-1));
|
||||
DLListModel->setData(DLListModel->index(row, NAME), QVariant(QIcon(":/Icons/skin/seeding.png")), Qt::DecorationRole);
|
||||
DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)1.));
|
||||
setRowColor(row, "orange");
|
||||
break;
|
||||
case torrent_status::checking_files:
|
||||
case torrent_status::queued_for_checking:
|
||||
@ -1854,14 +1860,6 @@ void GUI::checkConnectionStatus(){
|
||||
if(options->getUseOSDAlways() || (options->getUseOSDWhenHiddenOnly() && (isMinimized() || isHidden()))) {
|
||||
OSDWindow->display(fileName+tr(" has finished downloading."));
|
||||
}
|
||||
// Update download list
|
||||
int row = getRowFromName(fileName);
|
||||
DLListModel->setData(DLListModel->index(row, STATUS), QVariant(tr("Finished")));
|
||||
DLListModel->setData(DLListModel->index(row, DLSPEED), QVariant((double)0.));
|
||||
DLListModel->setData(DLListModel->index(row, ETA), QVariant((qlonglong)-1));
|
||||
DLListModel->setData(DLListModel->index(row, NAME), QVariant(QIcon(":/Icons/skin/seeding.png")), Qt::DecorationRole);
|
||||
DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)1.));
|
||||
setRowColor(row, "orange");
|
||||
QString scan_dir = options->getScanDir();
|
||||
bool isScanningDir = !scan_dir.isNull();
|
||||
if(isScanningDir && scan_dir.at(scan_dir.length()-1) != QDir::separator()){
|
||||
|
Loading…
Reference in New Issue
Block a user