Here is the relevant code: QList<storage::internal::AccountDetails> accounts; for (auto const& acct : manager_.availableAccounts()) { auto const it = BUS_NAMES.find(acct->serviceId()); if (it == BUS_NAMES.end()) { continue; }
qDebug() << "using" << acct->serviceId(); auto service = acct->service(); qDebug() << "valid:" << service.isValid(); qDebug() << "id:" << service.id(); qDebug() << "icon:" << service.iconSource(); qDebug() << "displayName:" << service.displayName(); storage::internal::AccountDetails ad; ad.busName = it->second.bus_name; ad.objectPath = QDBusObjectPath(QStringLiteral("/provider/%1").arg(acct->id())); ad.id = acct->id(); ad.serviceId = acct->serviceId(); ad.providerName = it->second.provider_name; ad.iconName = ""; accounts.append(ad); } When I run this, it prints: storage-framework-registry: [16:58:50.030] using "google-drive-scope" storage-framework-registry: [16:58:50.031] valid: false storage-framework-registry: [16:58:50.031] id: "" storage-framework-registry: [16:58:50.031] icon: QUrl("") storage-framework-registry: [16:58:50.032] displayName: "" -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1643732 Title: service() method returns invalid service instance To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/online-accounts-api/+bug/1643732/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs