D25416: fix(search): Correctly parse filename and/or content search
Ismael Asensio
noreply at phabricator.kde.org
Tue Nov 19 21:16:22 GMT 2019
iasensio created this revision.
iasensio added reviewers: elvisangelaccio, bruns, Dolphin.
iasensio added a project: Dolphin.
Herald added a subscriber: kfm-devel.
iasensio requested review of this revision.
REVISION SUMMARY
Currently, the search url parsing does not detect if the search is based on Content or Filename, and it just keeps the last selection which can be inconsistent with the actual search.
This patch add such detection, and since an advanced user can combine filename and content search (using the keyword `filename:`), now the parsing detects both items and handles the four possible cases:
| Content | Filename | Search text | Search type |
| ------- | -------- | ------------------ | ----------- |
| T | T | abc filename:"xyz" | Content |
| T | F | abc | Content |
| F | T | xyz | Filename |
| F | F | | do not set |
|
Depends on: D25260 <https://phabricator.kde.org/D25260>
TEST PLAN
`bin/dolphinquerytest`: Added new test cases for searches with content text and/or filename
REPOSITORY
R318 Dolphin
BRANCH
filename_content
REVISION DETAIL
https://phabricator.kde.org/D25416
AFFECTED FILES
src/search/dolphinquery.cpp
src/search/dolphinquery.h
src/search/dolphinsearchbox.cpp
src/tests/dolphinquerytest.cpp
To: iasensio, elvisangelaccio, bruns, #dolphin
Cc: kfm-devel, pberestov, iasensio, fprice, MrPepe, fbampaloukas, alexde, Codezela, feverfew, meven, spoorun, navarromorales, firef, ngraham, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20191119/791aa2ce/attachment.htm>
More information about the kfm-devel
mailing list