~aacid/unity8/sectionDelegateUpdates

Viewing all changes in revision 2040.

  • Committer: CI Train Bot
  • Author(s): Michael Terry
  • Date: 2015-11-12 20:39:05 UTC
  • mfrom: (2004.5.2 async)
  • Revision ID: ci-train-bot@canonical.com-20151112203905-tdbo0utd7jcrqw00
Make a few DBus calls asynchronous, for a smoother UX.

The calls I've changed here are neither hugely important nor frequent calls. But every little bit helps.

- Made a few sync calls async.

- Made a few sync calls more obviously sync. We had several instances of asyncCall()'s return value -- a QDBusPendingReply -- being assigned to a QDBusReply variable, which makes it wait for the call to finish. In cases where it didn't make sense to rewrite logic to be async, I've merely changed the method to be call() instead of asyncCall() for clarity.

- I removed the API in our AccountsService plugin for even making sync calls. This won't stop future developers from from writing sync code, but might give them pause.

- I removed some test mocks for our AccountsService plugin interface and changed those tests to use our actual AS plugin against a mock AS server. In truth, this change was because I had a devil of a time crafting a fake reply that included a custom complex type. But it's a good change anyway. Exercises more of our code in tests and reduces duplicated interfaces.
Approved by: Albert Astals Cid

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: