D10078: Add separate lib KF5::DBusRunner
David Edmundson
noreply at phabricator.kde.org
Wed Jan 24 16:51:50 UTC 2018
davidedmundson added a comment.
> For the future perhaps there could be a XDG D-Bus interface for such quicksearch plugins, so a separate krunner-independent library would make sense for that as well.
Gnome does have an equivalent: org.gnome.Shell.SearchProvider2
It's similar to how I would have done it if I wasn't trying to fit into the existing krunner achitecture.
But it's not feasible do retrofit into here.
Making a client API speak both... /might/ be feasible.
-------------
I want to us to make sure this is still usable without a library dependency, but I think having this makes sense for the KDE apps. Definitely +1 to the idea.
I like how you've made it so you can reply in a sync or async way without making the sync version too complex.
I have a proposal that re-arranges a little bit to take it just a bit further.
void match( QSharedPointer<MatchContext> context)
that context object stores the m_mLastMatchDBusMessage and has the addMatches methods and it calls finish in its destructor
If a user wants to reply normally, they just do context.setMatches() in this method, with nothing else.
The baloo/p-b-i code can cache the latest MatchContext as a member variable exactly like they currently cache the lastMessage, and everything else gets automatically taken care of.
(with this API it looks quite easy to send the wrong data as a reply if a user doesn't handle the cancel signal correctly)
If a user wants to reply to all messages, they can too.
INLINE COMMENTS
> abstractrunner.h:161
> + void matchingCancelled();
> +
> +private:
please add a virtual hook for future expansion
> dbusadaptor_p.h:31
> + */
> +class DBusRunnerAdaptor: public QDBusAbstractAdaptor
> +{
Can you put a 1 in the class name for future proofing.
REPOSITORY
R308 KRunner
REVISION DETAIL
https://phabricator.kde.org/D10078
To: kossebau, davidedmundson, broulik
Cc: ngraham, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180124/ee756f77/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list