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

Authored by dfaure on Jan 17 2020, 9:29 PM.

Details

Summary

The plan is to use a filter function in KApplicationTrader,
so the internal function behind the "subseq" operator needs to
be made public.

Test Plan

ctest

Diff Detail

Repository
R309 KService
Branch
subseq
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 21301
Build 21319: arc lint + arc unit
dfaure created this revision.Jan 17 2020, 9:29 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptJan 17 2020, 9:29 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
dfaure requested review of this revision.Jan 17 2020, 9:29 PM
dfaure updated this revision to Diff 73798.Jan 17 2020, 9:49 PM

Add default value, much like QString::compare()

apol added a subscriber: apol.Jan 17 2020, 11:41 PM

Other than that, makes sense.

src/services/kservice.h
576

Can we give it a better name? How about something like isContained? or at least isSubsequence.

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 means merging with D25698 then. What do you think?

dfaure abandoned this revision.Jan 19 2020, 9:25 AM

Merged into D25698, so it can use the KApplicationTrader namespace.

apol added a comment.Jan 19 2020, 11:31 PM

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 then. What do you think?

+1 makes sense to me