D25698: New query mechanism for applications: KApplicationTrader

2020-02-04 Thread David Faure
dfaure closed this revision. REPOSITORY R309 KService REVISION DETAIL https://phabricator.kde.org/D25698 To: dfaure, broulik, mart, vkrause, nicolasfella, aacid, davidedmundson, apol Cc: apol, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D25698: New query mechanism for applications: KApplicationTrader

2020-02-04 Thread Aleix Pol Gonzalez
apol accepted this revision. apol added a comment. This revision is now accepted and ready to land. +1 Makes sense. REPOSITORY R309 KService BRANCH kapplicationtrader REVISION DETAIL https://phabricator.kde.org/D25698 To: dfaure, broulik, mart, vkrause, nicolasfella, aacid, davidedmun

D25698: New query mechanism for applications: KApplicationTrader

2020-02-04 Thread Albert Astals Cid
aacid added a comment. For me it can go in, but i'm not really really netiher a Frameworks developer nor potentially a user of this class, so i'd feel more confortable if someone else also +1'ed On the other hand you're the mega-manintainer of everything, so i guess it can go in :) REP

D25698: New query mechanism for applications: KApplicationTrader

2020-02-01 Thread David Faure
dfaure added a comment. ping? REPOSITORY R309 KService REVISION DETAIL https://phabricator.kde.org/D25698 To: dfaure, broulik, mart, vkrause, nicolasfella, aacid, davidedmundson Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D25698: New query mechanism for applications: KApplicationTrader

2020-01-24 Thread David Faure
dfaure updated this revision to Diff 74335. dfaure added a comment. improve unittest, let the name match more queries REPOSITORY R309 KService CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25698?vs=74334&id=74335 BRANCH kapplicationtrader REVISION DETAIL https://phabricator

D25698: New query mechanism for applications: KApplicationTrader

2020-01-24 Thread David Faure
dfaure updated this revision to Diff 74334. dfaure added a comment. Port to erase(remove_if), add unittest for OnlyShowIn, which showed inconsistencies => now removed from results of both methods. REPOSITORY R309 KService CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25698?vs=74

D25698: New query mechanism for applications: KApplicationTrader

2020-01-22 Thread Kai Uwe Broulik
broulik added inline comments. INLINE COMMENTS > dfaure wrote in kapplicationtrader.cpp:87 > Order is very important here, it's the order of preference. > > But doesn't erase(remove_if()) preserve order? I thought it did. cppreference says it does: > Relative order of the elements that remain

D25698: New query mechanism for applications: KApplicationTrader

2020-01-22 Thread David Faure
dfaure updated this revision to Diff 74073. dfaure added a comment. Improve docu REPOSITORY R309 KService CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25698?vs=73890&id=74073 BRANCH kapplicationtrader REVISION DETAIL https://phabricator.kde.org/D25698 AFFECTED FILES aut

D25698: New query mechanism for applications: KApplicationTrader

2020-01-22 Thread David Faure
dfaure marked 2 inline comments as done. dfaure added inline comments. INLINE COMMENTS > dhaumann wrote in kapplicationtrader.cpp:87 > I would prefer the std::erase(std::remove_if(...), ...end()); idiom here. > > Assuming the list is a vector this will be much faster, or do you have to > preser

D25698: New query mechanism for applications: KApplicationTrader

2020-01-20 Thread Dominik Haumann
dhaumann added inline comments. INLINE COMMENTS > kapplicationtrader.cpp:87 > +KService::List::iterator it = lst.begin(); > +while (it != lst.end()) { > +KService::Ptr serv = *it; I would prefer the std::erase(std::remove_if(...), ...end()); idiom here. Assuming the list is a ve

D25698: New query mechanism for applications: KApplicationTrader

2020-01-19 Thread David Faure
dfaure updated this revision to Diff 73890. dfaure marked an inline comment as done. dfaure added a comment. Simplify docu for query() REPOSITORY R309 KService CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25698?vs=73858&id=73890 BRANCH kapplicationtrader REVISION DETAIL ht

D25698: New query mechanism for applications: KApplicationTrader

2020-01-19 Thread David Faure
dfaure marked 3 inline comments as done. dfaure added inline comments. INLINE COMMENTS > aacid wrote in kapplicationtrader.h:56 > why is it slow? Looking at the code we have to go trhough all apps anyway > since what we do is erase if returning false, so wouldn't returning true > actually be fa

D25698: New query mechanism for applications: KApplicationTrader

2020-01-19 Thread Albert Astals Cid
aacid added inline comments. INLINE COMMENTS > kapplicationtrader.h:56 > + * true for all services, this would return the complete list of all > + * installed applications (slow). > + * why is it slow? Looking at the code we have to go trhough all apps anyway since what we do is era

D25698: New query mechanism for applications: KApplicationTrader

2020-01-19 Thread David Faure
dfaure updated this revision to Diff 73858. dfaure retitled this revision from "New class KApplicationTrader, to replace KMimeTypeTrader and KServiceTypeTrader" to "New query mechanism for applications: KApplicationTrader". dfaure edited the summary of this revision. dfaure edited the test plan f