Commit 23f0c854 authored by Ronan's avatar Ronan
Browse files

fix(src/components/contact/ContactModel): chain `vcardUpdated` signal to `contactUpdated`

parent e61c6cd8
......@@ -11,11 +11,12 @@ using namespace std;
const char *ContactModel::NAME = "contact-model";
ContactModel::ContactModel (shared_ptr<linphone::Friend> linphone_friend) {
linphone_friend->setData(NAME, *this);
m_linphone_friend = linphone_friend;
m_linphone_friend->setData(NAME, *this);
m_vcard = make_shared<VcardModel>(linphone_friend->getVcard());
App::getInstance()->getEngine()->setObjectOwnership(m_vcard.get(), QQmlEngine::CppOwnership);
QObject::connect(m_vcard.get(), &VcardModel::vcardUpdated, this, &ContactModel::contactUpdated);
}
ContactModel::ContactModel (VcardModel *vcard) {
......@@ -28,6 +29,7 @@ ContactModel::ContactModel (VcardModel *vcard) {
m_vcard.reset(vcard);
engine->setObjectOwnership(vcard, QQmlEngine::CppOwnership);
QObject::connect(vcard, &VcardModel::vcardUpdated, this, &ContactModel::contactUpdated);
}
Presence::PresenceStatus ContactModel::getPresenceStatus () const {
......
......@@ -23,6 +23,7 @@ class ContactModel : public QObject {
public:
ContactModel (std::shared_ptr<linphone::Friend> linphone_friend);
ContactModel (VcardModel *vcard);
~ContactModel () = default;
static const char *NAME;
......
......@@ -323,6 +323,10 @@ ColumnLayout {
color: ContactEditStyle.values.separator.color
}
// -----------------------------------------------------------------------
// Edition buttons.
// -----------------------------------------------------------------------
Row {
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: ContactEditStyle.buttons.topMargin
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment