diff options
| author | Ismael Asensio <[email protected]> | 2019-11-13 22:16:35 +0100 |
|---|---|---|
| committer | Ismael Asensio <[email protected]> | 2019-11-13 22:21:07 +0100 |
| commit | 8d92c8be7f117dee18710ee1ba6b7cfa45d3f5f0 (patch) | |
| tree | 57488f5813f057727a5f64bdd473b72c8d5942a7 /src/search/dolphinsearchbox.h | |
| parent | 3984e607bb4437a38af16e007f1c23fbcff7dfb2 (diff) | |
refactor(search): De-couple baloo URL parsing logic from UI
Summary:
Extracts the logic that parses `baloosearch:` urls into a new model class. The parser logic itself is kept as is.
The search box UI is later updated using the model fields.
This refactor has been proposed by @bruns in the review of D24422, as it largely simplifies the unit tests and further expansion/improvements.
Test Plan:
No behavior changes.
Test case is added in the follow-up revision: D25258
Reviewers: #dolphin, elvisangelaccio, bruns
Reviewed By: #dolphin, elvisangelaccio, bruns
Subscribers: ngraham, bruns, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25257
Diffstat (limited to 'src/search/dolphinsearchbox.h')
| -rw-r--r-- | src/search/dolphinsearchbox.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/search/dolphinsearchbox.h b/src/search/dolphinsearchbox.h index 241dc40c1..5fef4ec5a 100644 --- a/src/search/dolphinsearchbox.h +++ b/src/search/dolphinsearchbox.h @@ -24,6 +24,7 @@ #include <QWidget> class DolphinFacetsWidget; +class DolphinQuery; class QLineEdit; class KSeparator; class QToolButton; @@ -152,10 +153,9 @@ private: QUrl balooUrlForSearching() const; /** - * Extracts information from the given Baloo search \a url to - * initialize the search box properly. + * Sets the searchbox UI with the parameters established by the \a query */ - void fromBalooSearchUrl(const QUrl& url); + void updateFromQuery(const DolphinQuery& query); void updateFacetsVisible(); |
