From d36616853006c090e280ab92c75f8491afb57367 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Mon, 20 Feb 2017 12:02:42 +0100 Subject: [PATCH] feat(ui/views/App/Main/ContactEdit): use `Connections` component --- .../ui/views/App/Main/ContactEdit.qml | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/linphone-desktop/ui/views/App/Main/ContactEdit.qml b/linphone-desktop/ui/views/App/Main/ContactEdit.qml index b1f3a44c6..1d4080907 100644 --- a/linphone-desktop/ui/views/App/Main/ContactEdit.qml +++ b/linphone-desktop/ui/views/App/Main/ContactEdit.qml @@ -277,18 +277,24 @@ ColumnLayout { contentWidth: width - ScrollBar.vertical.width flickableDirection: Flickable.VerticalFlick - Rectangle { - anchors.fill: parent - color: ContactEditStyle.content.color - } + // ----------------------------------------------------------------------- - SmartConnect { - Component.onCompleted: this.connect(_vcard, 'onVcardUpdated', function () { + Connections { + target: _vcard + + onVcardUpdated: { addresses.setData(_vcard.sipAddresses) companies.setData(_vcard.companies) emails.setData(_vcard.emails) urls.setData(_vcard.urls) - }) + } + } + + // ----------------------------------------------------------------------- + + Rectangle { + anchors.fill: parent + color: ContactEditStyle.content.color } ColumnLayout {