Please add a way to create a Manager instance with a custom QDBusConnection
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
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 (community): Approve
-
Diff: 145 lines (+31/-7)6 files modifieddebian/libonline-accounts-qt1.symbols (+2/-0)
src/lib/OnlineAccounts/manager.cpp (+10/-3)
src/lib/OnlineAccounts/manager.h (+4/-0)
src/lib/OnlineAccounts/manager_p.h (+2/-1)
tests/daemon/functional_tests/functional_tests.cpp (+3/-3)
tests/lib/OnlineAccounts/functional_tests/functional_tests.cpp (+10/-0)
Changed in online-accounts-api (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
This bug was fixed in the package online-accounts-api - 0.1+16. 10.20160722. 4-0ubuntu1
--------------- 10.20160722. 4-0ubuntu1) yakkety; urgency=medium
online-accounts-api (0.1+16.
[ Alberto Mardegan ] aemon library
* Tests: keep the service alive while running the test (LP: #1603706)
* Enable coverage reporting for the OnlineAccountsD
[ James Henstridge ] :Manager that takes a custom D-
* Add a constructor for OnlineAccounts:
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