fix(search): Correctly parse filename and/or content search

Authored by iasensio on Dec 21 2019, 6:14 PM.

Description

fix(search): Correctly parse filename and/or content search

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:

ContentFilenameSearch textSearch type
TTabc filename:"xyz"Content
TFabcContent
FTxyzFilename
FFdo not set

Depends on: D25260

Test Plan: bin/dolphinquerytest: Added new test cases for searches with content text and/or filename

Reviewers: elvisangelaccio, bruns, Dolphin

Reviewed By: elvisangelaccio, Dolphin

Subscribers: kfm-devel

Tags: Dolphin

Differential Revision: https://phabricator.kde.org/D25416

Details

Committed
iasensioDec 21 2019, 6:17 PM
Reviewer
Dolphin
Differential Revision
D25416: fix(search): Correctly parse filename and/or content search
Parents
R318:8c386bdb4733: GIT_SILENT made messages (after extraction)
Branches
Unknown
Tags
Unknown