Formatting

This commit is contained in:
Jonas Kvinge
2021-07-11 09:49:38 +02:00
parent a6742d401c
commit e48b7d83a3
161 changed files with 370 additions and 369 deletions

View File

@@ -178,7 +178,7 @@ QString PlaylistDelegateBase::displayText(const QVariant &value, const QLocale&)
QString text;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
switch(value.metaType().id()) {
switch (value.metaType().id()) {
#else
switch (static_cast<QMetaType::Type>(value.type())) {
#endif
@@ -536,7 +536,7 @@ QString RatingItemDelegate::displayText(const QVariant &value, const QLocale&) c
if (value.isNull() || value.toDouble() <= 0) return QString();
// Round to the nearest 0.5
const double rating = double(int(value.toDouble() * RatingPainter::kStarCount * 2 + 0.5)) / 2;
const double rating = double(int(value.toDouble() * RatingPainter::kStarCount * 2 + 0.5)) / 2;
return QString::number(rating, 'f', 1);