Improve loading of magnet metadata in the background.

Conflicts:
	src/qtlibtorrent/qbtsession.cpp
This commit is contained in:
sledgehammer999
2013-09-18 00:44:18 +03:00
parent 1e802f2090
commit 14310f9b05
6 changed files with 132 additions and 72 deletions

View File

@@ -151,9 +151,14 @@ QVariant TorrentModelItem::data(int column, int role) const
if (role != Qt::DisplayRole && role != Qt::UserRole) return QVariant();
switch(column) {
case TR_NAME:
return m_name.isEmpty()? m_torrent.name() : m_name;
case TR_PRIORITY:
return m_torrent.queue_position();
return m_name.isEmpty() ? m_torrent.name() : m_name;
case TR_PRIORITY: {
int pos = m_torrent.queue_position();
if (pos > -1)
return pos - HiddenData::getSize();
else
return pos;
}
case TR_SIZE:
return m_torrent.has_metadata() ? static_cast<qlonglong>(m_torrent.actual_size()) : -1;
case TR_PROGRESS: