Fix formatting
This commit is contained in:
parent
f81a3aa8d8
commit
7f6e7f8b30
|
@ -99,9 +99,10 @@ QString PrettyTime(int seconds, bool always_show_hours) {
|
|||
QString ret;
|
||||
if (hours || always_show_hours)
|
||||
ret = QString::asprintf("%d:%02d:%02d", hours, minutes,
|
||||
seconds); // NOLINT(runtime/printf)
|
||||
seconds); // NOLINT(runtime/printf)
|
||||
else
|
||||
ret = QString::asprintf("%d:%02d", minutes, seconds); // NOLINT(runtime/printf)
|
||||
ret = QString::asprintf("%d:%02d", minutes,
|
||||
seconds); // NOLINT(runtime/printf)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -165,15 +166,18 @@ QString PrettySize(quint64 bytes) {
|
|||
if (bytes <= 1000)
|
||||
ret = QString::number(bytes) + " bytes";
|
||||
else if (bytes <= 1000 * 1000)
|
||||
ret = QString::asprintf("%.1f KB",
|
||||
static_cast<float>(bytes) / 1000); // NOLINT(runtime/printf)
|
||||
ret = QString::asprintf(
|
||||
"%.1f KB",
|
||||
static_cast<float>(bytes) / 1000); // NOLINT(runtime/printf)
|
||||
else if (bytes <= 1000 * 1000 * 1000)
|
||||
ret = QString::asprintf("%.1f MB", static_cast<float>(bytes) /
|
||||
(1000 * 1000)); // NOLINT(runtime/printf)
|
||||
ret = QString::asprintf(
|
||||
"%.1f MB",
|
||||
static_cast<float>(bytes) / (1000 * 1000)); // NOLINT(runtime/printf)
|
||||
else
|
||||
ret = QString::asprintf("%.1f GB",
|
||||
static_cast<float>(bytes) /
|
||||
(1000 * 1000 * 1000)); // NOLINT(runtime/printf)
|
||||
ret = QString::asprintf(
|
||||
"%.1f GB",
|
||||
static_cast<float>(bytes) /
|
||||
(1000 * 1000 * 1000)); // NOLINT(runtime/printf)
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -138,8 +138,8 @@ void StyleHelper::verticalGradient(QPainter* painter, const QRect& spanRect,
|
|||
QString key;
|
||||
QColor keyColor = baseColor(lightColored);
|
||||
key = QString::asprintf("mh_vertical %d %d %d %d %d", spanRect.width(),
|
||||
spanRect.height(), clipRect.width(), clipRect.height(),
|
||||
keyColor.rgb());
|
||||
spanRect.height(), clipRect.width(),
|
||||
clipRect.height(), keyColor.rgb());
|
||||
;
|
||||
|
||||
QPixmap pixmap;
|
||||
|
|
Loading…
Reference in New Issue