Review Request: KListWidgetSearchLine: filter items that are inserted or changed

Frank Reininghaus frank78ac at googlemail.com
Mon Feb 21 19:09:17 GMT 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100709/
-----------------------------------------------------------

Review request for kdelibs and David Faure.


Summary
-------

Up to now, KlistWidgetSearchLine filters the list widget's items only when the text in the search line is changed (or updateSearch() is called directly). I propose to also update the search when items are added to the list widget or when an item's data are changed.

I've moved the actual filtering code from KListWidgetSearchLine::updateSearch(const QString &s) to a private method to avoid code duplication (basically, the same code is needed if items are added or changed).

This is needed fix bug 265709. Unit test included.

If this patch is accepted, I'll try to do something similar for KTreeWidgetSearchLine.


This addresses bug 265709.
    http://bugs.kde.org/show_bug.cgi?id=265709


Diffs
-----

  kdeui/itemviews/klistwidgetsearchline.h a78fb9b 
  kdeui/itemviews/klistwidgetsearchline.cpp 5b9b03d 
  kdeui/tests/CMakeLists.txt 71c2426 
  kdeui/tests/klistwidgetsearchlinetest.cpp PRE-CREATION 

Diff: http://git.reviewboard.kde.org/r/100709/diff


Testing
-------

The bug seems fixed, the new unit test passed. I haven't observed any regressions so far.


Thanks,

Frank

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20110221/92f7bffc/attachment.htm>


More information about the kde-core-devel mailing list