Please add a way to create a Manager instance with a custom QDBusConnection

Bug #1602153 reported by James Henstridge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
online-accounts-api (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

For my project's test suite, I use libqtdbustest to set up a private session bus in order to isolate them from my user session, and to isolate tests from each other. To work reliably, tests need to use the QDBusConnection provided by libqtdbustest rather than the shared connection returned by QDBusConnection:sessionBus().

At present there is no way to tell libOnlineAccountsQt to use an alternative connection, so it may end up trying to talk to a stale session bus that has been shut down.

Ideally, I'd like a second constructor to Manager that takes a connection. Something like:

    Manager(const QString& applicationId, const QDBusConnection& bus, QObject *parent=nullptr);

After quick look at the source code, this doesn't look like it'd be too difficult to add.

Related branches

Alberto Mardegan (mardy)
Changed in online-accounts-api (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package online-accounts-api - 0.1+16.10.20160722.4-0ubuntu1

---------------
online-accounts-api (0.1+16.10.20160722.4-0ubuntu1) yakkety; urgency=medium

  [ Alberto Mardegan ]
  * Tests: keep the service alive while running the test (LP: #1603706)
  * Enable coverage reporting for the OnlineAccountsDaemon library

  [ James Henstridge ]
  * Add a constructor for OnlineAccounts::Manager that takes a custom D-
    Bus connection. (LP: #1602153)
  * Expose all serviceIds for each account rather than ignoring all but
    the first. (LP: #1602159)

 -- Michi Henning <email address hidden> Fri, 22 Jul 2016 05:09:23 +0000

Changed in online-accounts-api (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.