Fix searches for rating 10 (5 stars)
ClosedPublic

Authored by bruns on Nov 30 2018, 11:19 PM.

Details

Summary

The comparator callback/lambda used a string comparision, which returned
the wrong documents, as "2" > "10", and "10" < "9", i.e. selecting the
"Highest rating" in dolphin returned all documents with a rating of 2
or higher.

Convert the numeric suffix of the rating term ("R2", "R10", ...) to
an integer value and use it for comparision.

BUG: 357960

Diff Detail

Repository
R293 Baloo
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.Nov 30 2018, 11:19 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptNov 30 2018, 11:19 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Nov 30 2018, 11:19 PM
bruns updated this revision to Diff 46593.Nov 30 2018, 11:39 PM

Use qlonglong for comparing numeric properties

ngraham accepted this revision.Dec 1 2018, 4:16 AM

LOL whoops! Nice catch. Works great.

This revision is now accepted and ready to land.Dec 1 2018, 4:16 AM
This revision was automatically updated to reflect the committed changes.