Move URL parsing methods from kioslave to query object
AcceptedPublic

Authored by iasensio on Oct 5 2019, 11:26 PM.

Details

Reviewers
meven
ngraham
astippich
Group Reviewers
Baloo
Summary

This allows for query objects generated from Baloo::Query::fromSearchUrl to use the same URLs parsing as those using the kioslave.
Previously, only query urls with json format were available, while the kioslave could also parse the query keyword and simple type urls.
This was preventing the file type to be updated for places panels' default search urls (e.g. baloosearch://videos)

Test Plan
  • Open dolphin searchbar and activate "More Options"
  • Type baloosearch://images
  • The type 'Images' gets selected

Diff Detail

Repository
R293 Baloo
Branch
extend_query_url
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 18845
Build 18863: arc lint + arc unit
iasensio created this revision.Oct 5 2019, 11:26 PM
Restricted Application added projects: Frameworks, Baloo. Β· View Herald TranscriptOct 5 2019, 11:26 PM
Restricted Application added a subscriber: kde-frameworks-devel. Β· View Herald Transcript
iasensio requested review of this revision.Oct 5 2019, 11:26 PM
iasensio edited the summary of this revision. (Show Details)Oct 6 2019, 8:41 AM

Friday ping πŸ˜ƒ

meven added a reviewer: astippich.
meven accepted this revision.Mon, Nov 11, 11:20 AM

Seems good to me.
Tested and works

This revision is now accepted and ready to land.Mon, Nov 11, 11:20 AM
bruns added a subscriber: bruns.Mon, Nov 11, 3:05 PM
bruns added inline comments.
src/lib/query.cpp
317

dayFilter/monthFilter/yearFilter are pointless, as they just default, but have to be parsed in fromJSON.

329

can be replaced by QStringLiteral("{\"type\":[\"Document\"]}"), dito below.

iasensio updated this revision to Diff 69613.Mon, Nov 11, 9:57 PM
iasensio marked 2 inline comments as done.

Simplify helper function

bruns added a subscriber: broulik.Mon, Nov 11, 11:30 PM
bruns added inline comments.
src/kioslaves/search/kio_search.cpp
88

@broulik - why endsWith()?

iasensio updated this revision to Diff 69836.Sat, Nov 16, 12:24 PM

Remove extra spaces

iasensio added inline comments.Sat, Nov 16, 12:26 PM
src/kioslaves/search/kio_search.cpp
88

should I just change the comparisons to path == ..., just like the /documents one?

@bruns, is this good to go now?