static inline QString formatProgress(uint progress)
{
- return QString::number(((double)progress) / torrent_progress_max * 100);
+ return QString::number(progress / torrent_progress_percent);
}
namespace
namespace qtrapids
{
- static const uint32_t torrent_progress_max = std::numeric_limits<uint32_t>::max();
+ static const uint32_t torrent_progress_max = 1000000;
+ static const uint32_t torrent_progress_percent = 10000;
+ //std::numeric_limits<uint32_t>::max();
typedef libtorrent::torrent_status TorrentStatus_t;
typedef libtorrent::torrent_status::state_t TorrentStatusIds_t;