Support the globbing filter also in project-search mode
Review Request #109300 - Created March 5, 2013 and submitted
This patch enables the "Filter" combo box also in Project-mode. Additionally the displayOptions button is checked also in "Open Files" mode, since the "Match case", "Regular expressions" and "Expand results" are also useful in this mode.
It is a good addition :) 1) I would however prefer that the project-files list would be filtered in startSearch() in stead of both SearchDiskFiles and search_open_files. 2) If I'm reading the patch correctly, the filters would not be matched the same way as in folder-mode as the file-list contains the full path and the filters in folder-mode match the file-name without the path. I would strip the path before filtering.
Review request changed
This second version of the patch adds a function QStringList filterFiles(const QStringList& files) to KatePluginSearchView, and then uses this filtered list in project-mode. The nice thing is that this now needs no modifications in the open-files and search-disk-files code.
Revision 2 (+55 -7)
Thanks that looks good :) One or two improvement can still be done if you want. 1) The folder mode filter also filters (sub)directories. In stead of exactMatch(onlyFileName), you could use indexIn(fileName, m_resultBaseDir.size()) 2) The excludes could also be added to filterFiles()