Revise string literal usage

This commit covers src/gui folder.
PR #16757.
This commit is contained in:
Chocobo1 2022-03-29 10:41:17 +08:00 committed by GitHub
parent 746fe7ba09
commit 75c93d72be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 275 additions and 280 deletions

View file

@ -57,7 +57,7 @@ void PreviewListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o
{
const qreal progress = (index.data().toReal() * 100);
const QString text = (progress >= 100)
? QString::fromLatin1("100%")
? u"100%"_qs
: (Utils::String::fromDouble(progress, 1) + u'%');
m_progressBarPainter.paint(painter, option, text, static_cast<int>(progress));