D26740: Add KService::isSubseq as a public API for filtering queries.

2020-01-19 Thread Aleix Pol Gonzalez
apol added a comment. > I like isSubsequence(). But I also just realized, it's a bit odd to have this in KService. I think I should make it part of the KApplicationTrader namespace instead, since it's a utility method for querying. > This means merging with D25698

D26740: Add KService::isSubseq as a public API for filtering queries.

2020-01-19 Thread David Faure
dfaure abandoned this revision. dfaure added a comment. Merged into D25698 , so it can use the KApplicationTrader namespace. REPOSITORY R309 KService REVISION DETAIL https://phabricator.kde.org/D26740 To: dfaure, michaeleden, aacid, davidedmundson Cc:

D26740: Add KService::isSubseq as a public API for filtering queries.

2020-01-18 Thread David Faure
dfaure added a comment. isContained() sounds like QString::contains(). I like isSubsequence(). But I also just realized, it's a bit odd to have this in KService. I think I should make it part of the KApplicationTrader namespace instead, since it's a utility method for querying. This me

D26740: Add KService::isSubseq as a public API for filtering queries.

2020-01-17 Thread Aleix Pol Gonzalez
apol added a comment. Other than that, makes sense. INLINE COMMENTS > kservice.h:576 > + */ > +static bool isSubseq(const QString& pattern, const QString& text, > Qt::CaseSensitivity cs = Qt::CaseSensitive); > + Can we give it a better name? How about something like `isContained`? o

D26740: Add KService::isSubseq as a public API for filtering queries.

2020-01-17 Thread David Faure
dfaure updated this revision to Diff 73798. dfaure added a comment. Add default value, much like QString::compare() REPOSITORY R309 KService CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26740?vs=73797&id=73798 BRANCH subseq REVISION DETAIL https://phabricator.kde.org/D2674

D26740: Add KService::isSubseq as a public API for filtering queries.

2020-01-17 Thread David Faure
dfaure created this revision. dfaure added reviewers: michaeleden, aacid, davidedmundson. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. dfaure requested review of this revision. REVISION SUMMARY The plan is to use a filter function in KApplicationTrader,