From 2de4c50d4fdebbfc3073c6f577791d392c69078a Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 14 Nov 2010 18:56:06 +0000 Subject: [PATCH] Fix size display for torrents without metadata --- src/qtlibtorrent/torrentmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qtlibtorrent/torrentmodel.cpp b/src/qtlibtorrent/torrentmodel.cpp index cbb11e686..b600f3099 100644 --- a/src/qtlibtorrent/torrentmodel.cpp +++ b/src/qtlibtorrent/torrentmodel.cpp @@ -116,7 +116,7 @@ QVariant TorrentModelItem::data(int column, int role) const case TR_PRIORITY: return m_torrent.queue_position(); case TR_SIZE: - return static_cast(m_torrent.actual_size()); + return m_torrent.has_metadata() ? static_cast(m_torrent.actual_size()) : -1; case TR_PROGRESS: return m_torrent.progress(); case TR_STATUS: