D11360: provide sample rate in kHz
elvisangelaccio removed a reviewer: Frameworks. REPOSITORY R824 Baloo Widgets REVISION DETAIL https://phabricator.kde.org/D11360 To: astippich, #baloo, elvisangelaccio, #frameworks Cc: elvisangelaccio, ashaposhnikov, astippich, spoorun, nicolasfella, alexeymin
D11360: provide sample rate in kHz
elvisangelaccio requested changes to this revision. elvisangelaccio added inline comments. This revision now requires changes to proceed. INLINE COMMENTS > widgetfactory.cpp:122-124 > +if (prop == QLatin1String("duration")) { > valueString = form.formatDuration(value.toInt() * 1000); > +} else if (prop == QLatin1String("bitRate")) { Please only one change per commit. I meant to use QLatin1String only for the new `sampleRate` prop. I just fixed these 2 on master, please rebase this patch on top of it. > widgetfactory.cpp:125 > +} else if (prop == QLatin1String("bitRate")) { > +valueString = i18nc("@label bitrate (per second)", "%1/s", > form.formatByteSize(value.toInt(), 0, KFormat::MetricBinaryDialect)); > +} else if (prop == QLatin1String("sampleRate")) { This should go in another commit. REPOSITORY R824 Baloo Widgets REVISION DETAIL https://phabricator.kde.org/D11360 To: astippich, #frameworks, #baloo, elvisangelaccio Cc: elvisangelaccio, ashaposhnikov, astippich, spoorun, nicolasfella, alexeymin
D11360: provide sample rate in kHz
astippich updated this revision to Diff 29662. astippich added a comment. - use qlatin1string for comparison and do not display trailing zeros REPOSITORY R824 Baloo Widgets CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D11360?vs=29621=29662 BRANCH sample_rate REVISION DETAIL https://phabricator.kde.org/D11360 AFFECTED FILES src/widgetfactory.cpp To: astippich, #frameworks, #baloo Cc: elvisangelaccio, ashaposhnikov, astippich, spoorun, nicolasfella, alexeymin
D11360: provide sample rate in kHz
ngraham added a reviewer: Baloo. REPOSITORY R824 Baloo Widgets REVISION DETAIL https://phabricator.kde.org/D11360 To: astippich, #frameworks, #baloo Cc: elvisangelaccio, ashaposhnikov, astippich, spoorun, nicolasfella, alexeymin
D11360: provide sample rate in kHz
elvisangelaccio added inline comments. INLINE COMMENTS > widgetfactory.cpp:126 > valueString = i18nc("@label bitrate (per second)", "%1/s", > form.formatByteSize(value.toInt(), 1, KFormat::MetricBinaryDialect)); > +} else if (prop == QStringLiteral("sampleRate")) { > +valueString = i18nc("@label samplerate in kilohertz", "%1 kHz", > QLocale().toString(value.toDouble()/1000,'f', 1)); Please use `QLatin1String` for comparisons. > widgetfactory.cpp:127 > +} else if (prop == QStringLiteral("sampleRate")) { > +valueString = i18nc("@label samplerate in kilohertz", "%1 kHz", > QLocale().toString(value.toDouble()/1000,'f', 1)); > } else if (prop == QLatin1String("releaseYear")) { This could show "48,0 kHz". Is that what we want? Also, please add spaces before/after the division operator. REPOSITORY R824 Baloo Widgets REVISION DETAIL https://phabricator.kde.org/D11360 To: astippich, #frameworks Cc: elvisangelaccio, ashaposhnikov, astippich, spoorun, nicolasfella, alexeymin
D11360: provide sample rate in kHz
astippich added a reviewer: Frameworks. REPOSITORY R824 Baloo Widgets REVISION DETAIL https://phabricator.kde.org/D11360 To: astippich, #frameworks Cc: ashaposhnikov, spoorun, nicolasfella, alexeymin