Call TorrentModelItem::state() directly in getTorrentStatusReport

There is no point in wraping/unwraping QVariant.
This commit is contained in:
Ivan Sorokin
2014-10-25 14:13:09 +04:00
parent 80297697dd
commit 2d98b8f192
2 changed files with 2 additions and 2 deletions

View File

@@ -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;