Bug 384547 - IMDB rating are sorted incorrectly and not integer rating values are not shown (no stars shown)
Summary: IMDB rating are sorted incorrectly and not integer rating values are not show...
Status: RESOLVED FIXED
Alias: None
Product: tellico
Classification: Applications
Component: general (show other bugs)
Version: 3.0.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Robby Stephenson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-10 08:08 UTC by Alessandro Russo
Modified: 2017-09-10 21:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 3.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Russo 2017-09-10 08:08:33 UTC
I've a collection of films, I'm showing in the right table the column "IMDB Rating". Several rows are missing the stars, if I hover the mouse pointer on the IMDB cell it show a tooltip with the rating but no stars are shown. This happens with all not integer ratings (ie 6.5 7.9, this works for all integer rating 8.0, 7.0).
If I choose to order by IMDB rating by clicking on the cell "IMDB Rating" the rows are only roughly ordered by the rating.
This is an example:
6
6
5.7
5
5.4
6.4
6
5.8
5
6
5.1
4.7
4.2
7

I think this my be related to the changes made for fixing this https://bugs.kde.org/show_bug.cgi?id=372560
Comment 1 Robby Stephenson 2017-09-10 21:46:05 UTC
Git commit 798a1c90a8a72eb07da36faead592e56b2a79bea by Robby Stephenson.
Committed on 10/09/2017 at 21:21.
Pushed by rstephenson into branch 'master'.

Round the float value for star ratings in the view delegate

Ratings can have decimal values and were converting to 0. Use qRound
with toFloat() to properly handle them.

M  +4    -0    ChangeLog
M  +1    -1    src/gui/ratingdelegate.cpp
M  +2    -2    src/gui/starrating.h

https://commits.kde.org/tellico/798a1c90a8a72eb07da36faead592e56b2a79bea
Comment 2 Robby Stephenson 2017-09-10 21:46:05 UTC
Git commit 8cc6308aec884b016589775e9fc085762c60c6cc by Robby Stephenson.
Committed on 10/09/2017 at 21:44.
Pushed by rstephenson into branch 'master'.

Fix bug when rounding difference of floats when < 0.5.
FIXED-IN: 3.1

M  +1    -0    ChangeLog
M  +5    -3    src/models/stringcomparison.cpp
M  +4    -0    src/tests/comparisontest.cpp

https://commits.kde.org/tellico/8cc6308aec884b016589775e9fc085762c60c6cc