Skip to content

Commit

Permalink
[libcommhistory] Adapt to changes in qtcontacts-sqlite-extensions. Co…
Browse files Browse the repository at this point in the history
…ntributes to JB#50658
  • Loading branch information
Chris Adams authored and Bea Lam committed Sep 15, 2020
1 parent 0f403af commit a1ba245
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/common.cpp
Expand Up @@ -274,7 +274,7 @@ QList<int> addTestContacts(const QList<QPair<QString, QPair<QString, QString> >

bool addTestContactAddress(int contactId, const QString &remoteUid, const QString &localUid)
{
QContact existing = manager()->contact(apiContactId(contactId));
QContact existing = manager()->contact(apiContactId(contactId, manager()->managerUri()));
if (internalContactId(existing.id()) != (unsigned)contactId) {
qWarning() << "Could not retrieve contact:" << contactId;
return false;
Expand Down Expand Up @@ -321,7 +321,7 @@ void modifyTestContact(int id, const QString &name, bool favorite)
{
qDebug() << Q_FUNC_INFO << id << name;

QContact contact = manager()->contact(apiContactId(id));
QContact contact = manager()->contact(apiContactId(id, manager()->managerUri()));
if (internalContactId(contact.id()) != (unsigned)id) {
qWarning() << "Could not retrieve contact:" << id;
return;
Expand Down Expand Up @@ -353,10 +353,10 @@ void modifyTestContact(int id, const QString &name, bool favorite)

void deleteTestContact(int id)
{
if (!manager()->removeContact(apiContactId(id))) {
if (!manager()->removeContact(apiContactId(id, manager()->managerUri()))) {
qWarning() << "error deleting contact:" << id;
}
addedContactIds.remove(apiContactId(id));
addedContactIds.remove(apiContactId(id, manager()->managerUri()));
}

void cleanUpTestContacts()
Expand Down

0 comments on commit a1ba245

Please sign in to comment.