Show torrent error message in transfer list

This commit is contained in:
Chocobo1 2019-11-26 02:40:31 +08:00
parent 2ca70cf6cc
commit b6050463f4
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
2 changed files with 4 additions and 1 deletions

View file

@ -184,7 +184,7 @@ QVariant TransferListModel::data(const QModelIndex &index, const int role) const
case TR_PROGRESS:
return torrent->progress();
case TR_STATUS:
return QVariant::fromValue(torrent->state());
return (role == Qt::DisplayRole) ? QVariant::fromValue(torrent->state()) : torrent->error();
case TR_SEEDS:
return (role == Qt::DisplayRole) ? torrent->seedsCount() : torrent->totalSeedsCount();
case TR_PEERS: