#36 QDocumentSearch and mode Silent

closed-fixed
QCodeEdit (16)
5
2008-11-23
2008-11-17
No

Hi,

In DocumentSearch, in Silent mode, if i search word and call next, the cursor is never null :
- if word exist, the last occurence is always returned
- if word doesn't exist, a cursor on the last position is returned.

I think the next function must be returned false in this case or the cursor method will be return null at the last search (or both).

Thanks

Discussion

  • fullmetalcoder
    fullmetalcoder
    2008-11-20

    A method that was already valid to check whether the cursor pointed to a match was to check whether it had a selection ( QDocumentCursor::hasSelection() ).

    It is however correct that the behavior in Silent mode was not coherent (cursor should be nulled when reaching end of scope), which also prevented the search from starting back at the beginning (and that was a bug) so this has been corrected in SVN.

    Thanks for the report.

     
  • fullmetalcoder
    fullmetalcoder
    2008-11-20

    • assigned_to: nobody --> fullmetalcoder
    • status: open --> open-fixed
     
  • Thanks

     
    • status: open-fixed --> closed-fixed