<table><tr><td style="">kossebau added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D10078">View Revision</a></tr></table><br /><div><div><p>Good, seems we found agreed-on codebase :) Will brush over the API dox/code comments some more for a final thumb-up.</p>
<p>Though after yesterday's prototyping of further dbusrunner plugins there is another thing where I might want to suggest some API change to be more future-proof (for some possible org.kde.krunner2):</p>
<p>Currently the match requests have no support for being cancelled (not part of org.kde.krunner1 D-Bus API, and have not found something on the D-Bus layer how to signal the discarding the wait for a reply). The baloo dbusrunner simply only handles the latest request. which surely covers the typical use-case, still, it will continue to handle the latest request even if there is no longer interest in it. That approach might be an issue once there are more cpu-intensive dbusrunners, wasting resources (cpu/io) when not needed.</p>
<p>To prepare for that it might make sense to turn <tt style="background: #ebebeb; font-size: 13px;">MatchReply</tt> into a QObject, so it could get some signal <tt style="background: #ebebeb; font-size: 13px;">validChanged</tt> or similar added once the backend supports discarding. While there currently already is a method to query the valid state, this is more a small convenience method given that right now it is under full control of the plugin developer when a MatchReply will get invalid, it will only happen on actions done via the API. But once the valid state can change by remote activitiy, a signal might be nice to have.<br />
Using a QObject would also allow to switch from the fragile <tt style="background: #ebebeb; font-size: 13px;">QVector<MatchReplyPrivate*> mActiveMatchReplies</tt> to using a QPointer-based approach on the real MatchReply objects, which might be less fragile.</p>
<p>What do you think? Would give this a separate try tonight, to get some idea.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R308 KRunner</div></div></div><br /><div><strong>BRANCH</strong><div><div>kdbusrunnerlib2</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10078">https://phabricator.kde.org/D10078</a></div></div><br /><div><strong>To: </strong>kossebau, broulik, davidedmundson<br /><strong>Cc: </strong>bruns, michaelh, ngraham, Frameworks<br /></div>