mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Use appropriate type
This commit is contained in:
parent
516c968373
commit
4880dc812c
3 changed files with 5 additions and 5 deletions
|
@ -1532,7 +1532,7 @@ void Session::processShareLimits()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (torrent->seedingTimeLimit() != TorrentHandle::NO_SEEDING_TIME_LIMIT) {
|
if (torrent->seedingTimeLimit() != TorrentHandle::NO_SEEDING_TIME_LIMIT) {
|
||||||
const int seedingTimeInMinutes = torrent->seedingTime() / 60;
|
const qlonglong seedingTimeInMinutes = torrent->seedingTime() / 60;
|
||||||
int seedingTimeLimit = torrent->seedingTimeLimit();
|
int seedingTimeLimit = torrent->seedingTimeLimit();
|
||||||
if (seedingTimeLimit == TorrentHandle::USE_GLOBAL_SEEDING_TIME)
|
if (seedingTimeLimit == TorrentHandle::USE_GLOBAL_SEEDING_TIME)
|
||||||
// If Global Seeding Time Limit is really set...
|
// If Global Seeding Time Limit is really set...
|
||||||
|
|
|
@ -437,12 +437,12 @@ void PropertiesWidget::loadDynamicData()
|
||||||
.arg(QString::number(m_torrent->leechsCount())
|
.arg(QString::number(m_torrent->leechsCount())
|
||||||
, QString::number(m_torrent->totalLeechersCount())));
|
, QString::number(m_torrent->totalLeechersCount())));
|
||||||
|
|
||||||
const int dlDuration = m_torrent->activeTime() - m_torrent->finishedTime();
|
const qlonglong dlDuration = m_torrent->activeTime() - m_torrent->finishedTime();
|
||||||
const QString dlAvg = Utils::Misc::friendlyUnit((m_torrent->totalDownload() / ((dlDuration == 0) ? -1 : dlDuration)), true);
|
const QString dlAvg = Utils::Misc::friendlyUnit((m_torrent->totalDownload() / ((dlDuration == 0) ? -1 : dlDuration)), true);
|
||||||
m_ui->labelDlSpeedVal->setText(tr("%1 (%2 avg.)", "%1 and %2 are speed rates, e.g. 200KiB/s (100KiB/s avg.)")
|
m_ui->labelDlSpeedVal->setText(tr("%1 (%2 avg.)", "%1 and %2 are speed rates, e.g. 200KiB/s (100KiB/s avg.)")
|
||||||
.arg(Utils::Misc::friendlyUnit(m_torrent->downloadPayloadRate(), true), dlAvg));
|
.arg(Utils::Misc::friendlyUnit(m_torrent->downloadPayloadRate(), true), dlAvg));
|
||||||
|
|
||||||
const int ulDuration = m_torrent->activeTime();
|
const qlonglong ulDuration = m_torrent->activeTime();
|
||||||
const QString ulAvg = Utils::Misc::friendlyUnit((m_torrent->totalUpload() / ((ulDuration == 0) ? -1 : ulDuration)), true);
|
const QString ulAvg = Utils::Misc::friendlyUnit((m_torrent->totalUpload() / ((ulDuration == 0) ? -1 : ulDuration)), true);
|
||||||
m_ui->labelUpSpeedVal->setText(tr("%1 (%2 avg.)", "%1 and %2 are speed rates, e.g. 200KiB/s (100KiB/s avg.)")
|
m_ui->labelUpSpeedVal->setText(tr("%1 (%2 avg.)", "%1 and %2 are speed rates, e.g. 200KiB/s (100KiB/s avg.)")
|
||||||
.arg(Utils::Misc::friendlyUnit(m_torrent->uploadPayloadRate(), true), ulAvg));
|
.arg(Utils::Misc::friendlyUnit(m_torrent->uploadPayloadRate(), true), ulAvg));
|
||||||
|
|
|
@ -324,10 +324,10 @@ void TorrentsController::propertiesAction()
|
||||||
dataDict[KEY_PROP_UPLOADED] = torrent->totalUpload();
|
dataDict[KEY_PROP_UPLOADED] = torrent->totalUpload();
|
||||||
dataDict[KEY_PROP_UPLOADED_SESSION] = torrent->totalPayloadUpload();
|
dataDict[KEY_PROP_UPLOADED_SESSION] = torrent->totalPayloadUpload();
|
||||||
dataDict[KEY_PROP_DL_SPEED] = torrent->downloadPayloadRate();
|
dataDict[KEY_PROP_DL_SPEED] = torrent->downloadPayloadRate();
|
||||||
const int dlDuration = torrent->activeTime() - torrent->finishedTime();
|
const qlonglong dlDuration = torrent->activeTime() - torrent->finishedTime();
|
||||||
dataDict[KEY_PROP_DL_SPEED_AVG] = torrent->totalDownload() / ((dlDuration == 0) ? -1 : dlDuration);
|
dataDict[KEY_PROP_DL_SPEED_AVG] = torrent->totalDownload() / ((dlDuration == 0) ? -1 : dlDuration);
|
||||||
dataDict[KEY_PROP_UP_SPEED] = torrent->uploadPayloadRate();
|
dataDict[KEY_PROP_UP_SPEED] = torrent->uploadPayloadRate();
|
||||||
const int ulDuration = torrent->activeTime();
|
const qlonglong ulDuration = torrent->activeTime();
|
||||||
dataDict[KEY_PROP_UP_SPEED_AVG] = torrent->totalUpload() / ((ulDuration == 0) ? -1 : ulDuration);
|
dataDict[KEY_PROP_UP_SPEED_AVG] = torrent->totalUpload() / ((ulDuration == 0) ? -1 : ulDuration);
|
||||||
dataDict[KEY_PROP_DL_LIMIT] = torrent->downloadLimit() <= 0 ? -1 : torrent->downloadLimit();
|
dataDict[KEY_PROP_DL_LIMIT] = torrent->downloadLimit() <= 0 ? -1 : torrent->downloadLimit();
|
||||||
dataDict[KEY_PROP_UP_LIMIT] = torrent->uploadLimit() <= 0 ? -1 : torrent->uploadLimit();
|
dataDict[KEY_PROP_UP_LIMIT] = torrent->uploadLimit() <= 0 ? -1 : torrent->uploadLimit();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue