remove unnecessary calls to formaters
This commit is contained in:
parent
18712f4855
commit
acfa9a8dbd
|
@ -1019,7 +1019,7 @@ void DetailsDialog::Impl::refreshInfo(std::vector<tr_torrent*> const& torrents)
|
|||
if (failed != 0)
|
||||
{
|
||||
str = fmt::format(
|
||||
_("{downloaded_size} (+{discarded_size} discarded after failed checksum)"),
|
||||
_("{downloaded_size} verified (+{discarded_size} discarded after failed checksum)"),
|
||||
fmt::arg("downloaded_size", downloaded_str),
|
||||
fmt::arg("discarded_size", tr_strlsize(failed)));
|
||||
}
|
||||
|
@ -1068,7 +1068,7 @@ void DetailsDialog::Impl::refreshInfo(std::vector<tr_torrent*> const& torrents)
|
|||
std::end(stats),
|
||||
uint64_t{},
|
||||
[](auto sum, auto const* st) { return sum + st->uploadedThisSession; });
|
||||
str = fmt::format(_("{uploaded_size}"), fmt::arg("uploaded_size", tr_strlsize(uploaded)));
|
||||
str = tr_strlsize(uploaded);
|
||||
}
|
||||
|
||||
ul_ts_lb_->set_text(str);
|
||||
|
|
|
@ -669,10 +669,10 @@ void DetailsDialog::refreshUI()
|
|||
}
|
||||
|
||||
QString const dstr = Formatter::storage_to_string(d);
|
||||
QString const fstr = Formatter::storage_to_string(f);
|
||||
|
||||
if (f != 0)
|
||||
{
|
||||
QString const fstr = Formatter::storage_to_string(f);
|
||||
string = tr("%1 (+%2 discarded after failed checksum)").arg(dstr).arg(fstr);
|
||||
}
|
||||
else
|
||||
|
@ -720,7 +720,7 @@ void DetailsDialog::refreshUI()
|
|||
uploaded_this_session += t->uploadedThisSession();
|
||||
}
|
||||
|
||||
string = tr("%1").arg(Formatter::storage_to_string(uploaded_this_session));
|
||||
string = Formatter::storage_to_string(uploaded_this_session);
|
||||
}
|
||||
|
||||
ui_.uploadedThisSessionValueLabel->setText(string);
|
||||
|
|
Loading…
Reference in New Issue