Formatting

This commit is contained in:
Jonas Kvinge 2023-07-12 16:27:59 +02:00
parent 00372e85c5
commit 7826f77425
3 changed files with 8 additions and 0 deletions

View File

@ -690,6 +690,7 @@ QString Song::Ebur128LoudnessLUFSToText(const std::optional<double> &v) {
if (!v) return QObject::tr("Unknown");
return QString::asprintf("%+.2f ", *v) + QObject::tr("LUFS");
}
QString Song::Ebur128LoudnessLUFSToText() const {
return Ebur128LoudnessLUFSToText(d->ebur128_integrated_loudness_lufs_);
@ -700,6 +701,7 @@ QString Song::Ebur128LoudnessRangeLUToText(const std::optional<double> &v) {
if (!v) return QObject::tr("Unknown");
return QString::asprintf("%.2f ", *v) + QObject::tr("LU");
}
QString Song::Ebur128LoudnessRangeLUToText() const {
return Ebur128LoudnessRangeLUToText(d->ebur128_loudness_range_lu_);

View File

@ -145,6 +145,7 @@ channel gst_channel_to_ebur_channel(GstAudioChannelPosition pos) {
case GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT:
return EBUR128_Mp110; // +1.5 dB
}
Q_UNREACHABLE();
}

View File

@ -602,6 +602,7 @@ FilterTree *FilterParser::createSearchTermTreeNode(const QString &col, const QSt
else {
return new FilterTerm(cmp, columns_.values());
}
}
// Try and parse the string as '[[h:]m:]s' (ignoring all spaces),
@ -639,7 +640,9 @@ int FilterParser::parseTime(const QString &time_str) {
}
}
seconds = seconds * 60 + accum;
return seconds;
}
// The rating column contains the rating as a float from 0-1 or -1 if unrated.
@ -647,6 +650,7 @@ int FilterParser::parseTime(const QString &time_str) {
// To use float values directly, the search term can be prefixed with "f" (rating:>f0.2)
// If search is 0, or by default, uses -1
float FilterParser::parseRating(const QString &rating_str) {
if (rating_str.isEmpty()) {
return -1;
}
@ -675,4 +679,5 @@ float FilterParser::parseRating(const QString &rating_str) {
}
return rating;
}