D8346: Remove blocking call in KStatusNotifierItem
Xuetian Weng
noreply at phabricator.kde.org
Tue Oct 17 17:58:50 UTC 2017
xuetianweng added inline comments.
INLINE COMMENTS
> kstatusnotifieritem.cpp:882
> +
> + QDBusPendingReply<QDBusVariant> pendingReply = statusNotifierWatcher->connection().call(call);
> + auto watcher = new QDBusPendingCallWatcher(pendingReply);
The template is not necessary here. Maybe auto or QDBusPendingCall ?
> kstatusnotifieritem.cpp:883
> + QDBusPendingReply<QDBusVariant> pendingReply = statusNotifierWatcher->connection().call(call);
> + auto watcher = new QDBusPendingCallWatcher(pendingReply);
> + QObject::connect(watcher, &QDBusPendingCallWatcher::finished, q, [this, watcher]() {
I prefer to assign a parent to the watcher. Maybe "q"?
> kstatusnotifieritem.cpp:884
> + auto watcher = new QDBusPendingCallWatcher(pendingReply);
> + QObject::connect(watcher, &QDBusPendingCallWatcher::finished, q, [this, watcher]() {
> + QDBusPendingReply<QDBusVariant> reply = *watcher;
watcher can be obtained via the argument of this signal, no need to capture it.
REPOSITORY
R289 KNotifications
REVISION DETAIL
https://phabricator.kde.org/D8346
To: davidedmundson
Cc: xuetianweng, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171017/03c5988a/attachment.html>
More information about the Kde-frameworks-devel
mailing list