mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-30 04:08:05 -06:00
Revise string literal usage
This commit covers src/gui folder. PR #16757.
This commit is contained in:
@@ -90,9 +90,9 @@ void StatsDialog::update()
|
||||
#ifndef QBT_USES_LIBTORRENT2
|
||||
// Cache hits
|
||||
const qreal readRatio = cs.readRatio;
|
||||
m_ui->labelCacheHits->setText(QString::fromLatin1("%1%").arg((readRatio > 0)
|
||||
? Utils::String::fromDouble(100 * readRatio, 2)
|
||||
: QLatin1String("0")));
|
||||
m_ui->labelCacheHits->setText(u"%1%"_qs.arg((readRatio > 0)
|
||||
? Utils::String::fromDouble((100 * readRatio), 2)
|
||||
: u"0"_qs));
|
||||
#endif
|
||||
// Buffers size
|
||||
m_ui->labelTotalBuf->setText(Utils::Misc::friendlyUnit(cs.totalUsedBuffers * 16 * 1024));
|
||||
@@ -100,12 +100,12 @@ void StatsDialog::update()
|
||||
// From lt manual: disk_write_queue and disk_read_queue are the number of peers currently waiting on a disk write or disk read
|
||||
// to complete before it receives or sends any more data on the socket. It's a metric of how disk bound you are.
|
||||
|
||||
m_ui->labelWriteStarve->setText(QString::fromLatin1("%1%").arg(((ss.diskWriteQueue > 0) && (ss.peersCount > 0))
|
||||
m_ui->labelWriteStarve->setText(u"%1%"_qs.arg(((ss.diskWriteQueue > 0) && (ss.peersCount > 0))
|
||||
? Utils::String::fromDouble((100. * ss.diskWriteQueue / ss.peersCount), 2)
|
||||
: QLatin1String("0")));
|
||||
m_ui->labelReadStarve->setText(QString::fromLatin1("%1%").arg(((ss.diskReadQueue > 0) && (ss.peersCount > 0))
|
||||
: u"0"_qs));
|
||||
m_ui->labelReadStarve->setText(u"%1%"_qs.arg(((ss.diskReadQueue > 0) && (ss.peersCount > 0))
|
||||
? Utils::String::fromDouble((100. * ss.diskReadQueue / ss.peersCount), 2)
|
||||
: QLatin1String("0")));
|
||||
: u"0"_qs));
|
||||
|
||||
// Disk queues
|
||||
m_ui->labelQueuedJobs->setText(QString::number(cs.jobQueueLength));
|
||||
|
||||
Reference in New Issue
Block a user