Generate DBus interface
ClosedPublic

Authored by nicolasfella on May 4 2020, 4:50 PM.

Details

Summary

We already use a generated interface in kstatusnotifieritem, but not in notifybypopup.

Compile-time checks++
code--

Test Plan

Spawned, updated, closed notifications, triggered actions

Diff Detail

Repository
R289 KNotifications
Branch
geninterface
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 26534
Build 26552: arc lint + arc unit
nicolasfella created this revision.May 4 2020, 4:50 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMay 4 2020, 4:50 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
nicolasfella requested review of this revision.May 4 2020, 4:50 PM
broulik added inline comments.May 5 2020, 8:01 AM
src/notifybypopup.cpp
115

Previously it would accept the signal from any service which I find odd, though. Could you maybe check git logs to see if there was a reason for this?
It should survive restarts anyway and the service name is defined, so I really don't see why it used to be a blind connect.

364

You have watcher (which is parented to notification) and notification as contexts, but in the lambda you also access this. This looks dangerous. How about using this instead of notification as context object?

376

This is QDBusPendingReply<QStringList> (or just auto...)

385

Unrelated: I was wondering, do we actually monitor the notification service changing and make them dirty again?

388

range for?

nicolasfella added inline comments.May 5 2020, 10:25 PM
src/notifybypopup.cpp
115

git history until the frameworks split isn't really telling, I didn't bother looking further back

  • Use q as parent
  • Change reply type
  • Use ranged-for
nicolasfella marked 3 inline comments as done.May 7 2020, 10:27 PM
broulik accepted this revision.May 20 2020, 1:28 PM
broulik added inline comments.
src/notifybypopup.cpp
363

I think we should do an error check and whether we got the correct argument count back but we previously also didn't do it, so probably fine

This revision is now accepted and ready to land.May 20 2020, 1:28 PM
nicolasfella closed this revision.May 20 2020, 1:29 PM