fix(src/components/contact/ContactModel): map contact model to linphone friend when it is created from vcard

This commit is contained in:
Ronan Abhamon 2017-04-12 14:20:46 +02:00
parent 7afa395066
commit a067245eca

View file

@ -46,6 +46,8 @@ ContactModel::ContactModel (QObject *parent, VcardModel *vcard) : QObject(parent
throw invalid_argument("A contact is already linked to this vcard.");
m_linphone_friend = linphone::Friend::newFromVcard(vcard->m_vcard);
m_linphone_friend->setData("contact-model", *this);
m_vcard.reset(vcard);
engine->setObjectOwnership(vcard, QQmlEngine::CppOwnership);