Skip to content

Commit

Permalink
[buteo-sync-plugins-social] Update KnownContacts plugin to work with …
Browse files Browse the repository at this point in the history
…latest QtPim. JB#50552

- Implement the TwoWayContactSyncAdaptor interface
- Instead of using sync targets, create per-account contact
collections
  • Loading branch information
Bea Lam committed Sep 25, 2020
1 parent 1ffb34d commit b2395eb
Show file tree
Hide file tree
Showing 4 changed files with 227 additions and 125 deletions.
9 changes: 5 additions & 4 deletions src/knowncontacts/knowncontactsplugin.cpp
Expand Up @@ -159,14 +159,15 @@ void KnownContactsPlugin::syncSucceeded()
emit success(getProfileName(), QStringLiteral("Success"));
}

void KnownContactsPlugin::syncFailed(int errorCode)
void KnownContactsPlugin::syncFailed()
{
FUNCTION_CALL_TRACE;

LOG_DEBUG("Sync failed: " << errorCode);
LOG_DEBUG("Sync failed");
m_results = Buteo::SyncResults(iProfile.lastSuccessfulSyncTime(),
Buteo::SyncResults::SYNC_RESULT_FAILED, errorCode);
emit error(getProfileName(), QStringLiteral("Failure"), errorCode);
Buteo::SyncResults::SYNC_RESULT_FAILED,
Buteo::SyncResults::INTERNAL_ERROR);
emit error(getProfileName(), QStringLiteral("Failure"), Buteo::SyncResults::INTERNAL_ERROR);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/knowncontacts/knowncontactsplugin.h
Expand Up @@ -77,7 +77,7 @@ public slots:
protected slots:
void syncSucceeded();

void syncFailed(int errorCode);
void syncFailed();

private:
Buteo::SyncResults m_results;
Expand Down

0 comments on commit b2395eb

Please sign in to comment.