<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Arial'; font-size:9pt; font-weight:400; font-style:normal;">> Another regression:<br>
><br>
> FilterLED is not working correctly in recursive album mode.<br>
> Lets say I have an album with 5 subalbums.<br>
> There are images with 5-star ratings in 4 of the 5 subalbums. When I set a<br>
> quickfilter for 5-stars and click on the parent album, the LED is red,<br>
> although filter results are shown.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Guess what, I can't reproduce.<br>
Trying to simplify the testcase:<br>
Album A (2)<br>
        - Album B (4)<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Album B contains two images with rating and two without. Album A contains two images without rating.<br>
Selecting Album B. Set rating filter -> two images left, LED green.<br>
Selecting Album A. -> Same images left, LED green.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>><br>
> ImageFilterModelFilterer::process() seems to be called in a random way<br>
> (have not quite figured out what is causing this). If I filter one single<br>
> album (no subalbums), process() is called twice, sometimes three times,<br>
> sometimes only once, although there should be just one package?<br>
> Or do I misunderstand this?<br>
><br>
> Well anyone process() runs, then hasOneMatch is set to true, then a second<br>
> process() call comes which sets hasOneMatch to false again (although we are<br>
> still filtering the same images / album).<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>hasOneMatch is only set to false if filter settings are changed, a refiltering is done, or the model is reset.<br>
ImageFilterModelFilterer::process() does not touch hasOneMatch if it is already true. It only cares for settings hasOneMatch to true at all, if it is still false.<br>
filterMatches is emitted only if the current filtering is completed, that is all packages sent out have been received again.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>><br>
> So there is either a race-condition or I don't understand how process() is<br>
> called :-)<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p></body></html>