mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 20:58:07 -06:00
Call TorrentModelItem::state() directly in getTorrentStatusReport
There is no point in wraping/unwraping QVariant.
This commit is contained in:
@@ -504,7 +504,7 @@ TorrentStatusReport TorrentModel::getTorrentStatusReport() const
|
||||
QList<TorrentModelItem*>::const_iterator it = m_torrents.constBegin();
|
||||
QList<TorrentModelItem*>::const_iterator itend = m_torrents.constEnd();
|
||||
for ( ; it != itend; ++it) {
|
||||
switch((*it)->data(TorrentModelItem::TR_STATUS).toInt()) {
|
||||
switch((*it)->state()) {
|
||||
case TorrentModelItem::STATE_DOWNLOADING:
|
||||
++report.nb_active;
|
||||
++report.nb_downloading;
|
||||
|
||||
Reference in New Issue
Block a user