diff --git a/src/seasideperson.cpp b/src/seasideperson.cpp index af03cf8..24a20ae 100644 --- a/src/seasideperson.cpp +++ b/src/seasideperson.cpp @@ -1955,6 +1955,18 @@ void SeasidePerson::resetContactData() } } +void SeasidePerson::unresolve(const QVariant &data) +{ + QVariant previousData(contactData()); + + setContactData(data); + mContact->setId(QContactId()); + mComplete = true; + + updateContactDetails(previousData.value()); + emit contactChanged(); +} + QString SeasidePerson::vCard() const { QVersitContactExporter exporter; diff --git a/src/seasideperson.h b/src/seasideperson.h index 8ef8678..3e70fa5 100644 --- a/src/seasideperson.h +++ b/src/seasideperson.h @@ -317,6 +317,8 @@ class SeasidePerson Q_INVOKABLE void resolveEmailAddress(const QString &address, bool requireComplete = true); Q_INVOKABLE void resolveOnlineAccount(const QString &localUid, const QString &remoteUid, bool requireComplete = true); + Q_INVOKABLE void unresolve(const QVariant &data); + Q_INVOKABLE static QVariantList removeDuplicatePhoneNumbers(const QVariantList &phoneNumbers); Q_INVOKABLE static QVariantList removeDuplicateOnlineAccounts(const QVariantList &onlineAccounts); Q_INVOKABLE static QVariantList removeDuplicateEmailAddresses(const QVariantList &emailAddresses);