refactor(search): De-couple baloo URL parsing logic from UI

Authored by iasensio on Nov 13 2019, 9:16 PM.

Description

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

Details