Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • P Plasma applet for NetworkManager
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PlasmaPlasma
  • Plasma applet for NetworkManager
  • Merge requests
  • !124

[handler] Replace QDBusPendingCallWatcher with coroutines

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Nicolas Fella requested to merge work/coros into master Jun 22, 2022
  • Overview 7
  • Commits 1
  • Pipelines 12
  • Changes 9

Manipulating connections is done using async DBus calls. Currenly we use QDBusPendingCallWatcher to get notified when those finish

All calls trigger the same slot, which them determines what happens based on untyped data that was passed along.

This makes the code quite hard to follow.

By using coroutines we can write the code in a manner that makes the calls appear as if they were sychronous. This allows to reduce some boilerplate and break up the giant slot and move the relevant code to where it logically belongs

That way the code becomes a lot more easy to follow.

This makes use of the QCoro library (https://github.com/danvratil/qcoro) to add coroutine support for QDBusPendingCallWatcher

Edited Jun 22, 2022 by Nicolas Fella
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/coros