D11513: DBus runner servicename wildcard support
Kai Uwe Broulik
noreply at phabricator.kde.org
Tue Mar 20 16:24:29 UTC 2018
broulik added a comment.
Cool!
INLINE COMMENTS
> dbusrunner.cpp:57
>
> - m_interface = new OrgKdeKrunner1Interface(serviceName, path, QDBusConnection::sessionBus(), this);
> + if (requestedServiceName.endsWith(QLatin1Char('*'))) {
> + requestedServiceName.chop(1);
Should we support asterisk at an arbitrary position? But that makes it a lot more complex and main usecase is finding all `org.foo.bar-somepid`
> dbusrunner.cpp:60
> + //find existing matching names
> + auto names = QDBusConnection::sessionBus().interface()->registeredServiceNames();
> + if (names.isValid()) {
Is this run on the runner thread otherwise this would block
> dbusrunner.cpp:69
> + //and watch for changes
> + connect(QDBusConnection::sessionBus().interface(), &QDBusConnectionInterface::serviceOwnerChanged,
> + this, [this, requestedServiceName](const QString &serviceName, const QString &oldOwner, const QString &newOwner) {
Isn't this signal deprecated?
> dbusrunner.cpp:175
> + const QString service = match.data().toString();
> + return m_actions[service];
> }
`m_actions.value(service)`
REPOSITORY
R308 KRunner
REVISION DETAIL
https://phabricator.kde.org/D11513
To: davidedmundson
Cc: broulik, #frameworks, michaelh, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180320/a19d8c9e/attachment.html>
More information about the Kde-frameworks-devel
mailing list