D24422: [dolphin] Improve parsing of Baloo query searchString

Ismael Asensio noreply at phabricator.kde.org
Tue Oct 22 21:24:54 BST 2019


iasensio added a comment.


  > Also, an automatic test case would be helpful, might be necessary to splict the function into a parsing function and integration into dolphin.
  
  I will look into adding a test case for this, but it may take me some time to know the test framework. For now I would try testing on `fromBalooSearchUrl()` and checking on the UI.
  
  Splitting the parsing from the integration might require a harder refactor since the search terms are hardcoded into `facetsWidget->isRatingTerm()`, and also an intermediate struct/object would have to be generated. While looking on that, I realized that a more complete and robust parsing (although also more complex) could use `Baloo::AdvancedQueryParser` directly, to fill in the `query.term()` instead of directly parsing the `searchString`. Then, we would loop on the `query.term().subTerms()` objects and set the UI accordingly.
  
  Anyway I think that would be a job for two different extra commits (test case and advanced parsing). Does this make sense?

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D24422

To: iasensio, #dolphin, elvisangelaccio, meven, bruns, ngraham
Cc: chehrlic, ngraham, bruns, kfm-devel, #baloo, iasensio, fprice, MrPepe, fbampaloukas, alexde, Codezela, feverfew, meven, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20191022/0e02a297/attachment.htm>


More information about the kfm-devel mailing list