[Digikam-devel] Re: Weird image rating returned by IO slave?
Marcel Wiesweg
marcel.wiesweg at gmx.de
Thu Jan 27 15:59:03 GMT 2011
> ...from the data it was given. I've checked the database, and there are no
> ratings greater than 5, and the imageId associated with that rating is
> bogus too.
Did you double check there's not an ioslave from 1.x in use?
To debug this, look at libs/database/imagelister.cpp.
listFaces(), calling listFromIdList(). This happens on the ioslave side, which
means you need to "make install", ensure all old slaves are dead (happens
after a few secs), run digikam and look for debug output in your ~/.xsession-
errors file.
As you see, it's a binary protocol, which has very few safety nets, but we
never had problems. For faces, an extra field is transmitted, (see
record.binaryFormat) which may be part of the problem here.
>
> As a temporary work-around, I patched my copy of setRating to set the label
> to ' e r r o r ' if the rating was greater than 5. I haven't seen this on
> screen once yet, though if I put a breakpoint at this line it's definitely
> being used. Does a similar patch need committing to the SVN? (maybe not
> setting a label at all if it's junk?)
If there is any need for something like qBound(RatingMin, rating, RatingMax),
then at the very source of the problem,
QDataStream& operator>>(QDataStream& ds, ImageListerRecord& record)
Still this is curing a single symptom, I would prefer to analyze and prevent
the whole problem.
Marcel
More information about the Digikam-devel
mailing list