diff --git a/tests/src/components/sip-addresses/SipAddressesModel.cpp b/tests/src/components/sip-addresses/SipAddressesModel.cpp index 4c434114c..ef95aa724 100644 --- a/tests/src/components/sip-addresses/SipAddressesModel.cpp +++ b/tests/src/components/sip-addresses/SipAddressesModel.cpp @@ -265,7 +265,7 @@ void SipAddressesModel::initSipAddresses () { // Get sip addresses from calls. QSet address_done; for (const auto &call_log : core->getCallLogs()) { - QString sip_address = ::Utils::linphoneStringToQString(call_log->getRemoteAddress()->asString()); + QString sip_address = ::Utils::linphoneStringToQString(call_log->getRemoteAddress()->asStringUriOnly()); if (address_done.contains(sip_address)) continue; // Already used. diff --git a/tests/ui/modules/Linphone/Contact/Contact.qml b/tests/ui/modules/Linphone/Contact/Contact.qml index 3fd4c9de7..6f8e89ace 100644 --- a/tests/ui/modules/Linphone/Contact/Contact.qml +++ b/tests/ui/modules/Linphone/Contact/Contact.qml @@ -18,19 +18,11 @@ Rectangle { property alias sipAddressColor: description.sipAddressColor property alias usernameColor: description.usernameColor - // Can be a SipAddress object of SipAddressesModel or just a string. - property var sipAddress - - property var _contact: Utils.isObject(sipAddress) - ? sipAddress.contact - : SipAddressesModel.mapSipAddressToContact(sipAddress) + property var entry + property var _contact: entry.contact // --------------------------------------------------------------------------- - function _getSipAddress () { - return item.sipAddress.sipAddress || item.sipAddress - } - color: 'transparent' // No color by default. height: ContactStyle.height @@ -49,7 +41,7 @@ Rectangle { Layout.preferredWidth: ContactStyle.contentHeight image: _contact && _contact.vcard.avatar presenceLevel: _contact ? _contact.presenceLevel : -1 - username: LinphoneUtils.getContactUsername(_contact || _getSipAddress()) + username: LinphoneUtils.getContactUsername(_contact || entry.sipAddress) } ContactDescription { @@ -57,7 +49,7 @@ Rectangle { Layout.fillHeight: true Layout.fillWidth: true - sipAddress: _getSipAddress() + sipAddress: entry.sipAddress username: avatar.username } diff --git a/tests/ui/modules/Linphone/SmartSearchBar.qml b/tests/ui/modules/Linphone/SmartSearchBar.qml index da68ec21c..5b2bbcecc 100644 --- a/tests/ui/modules/Linphone/SmartSearchBar.qml +++ b/tests/ui/modules/Linphone/SmartSearchBar.qml @@ -104,7 +104,7 @@ SearchBox { Contact { Layout.fillHeight: true Layout.fillWidth: true - sipAddress: $entry.sipAddress + entry: $entry } // --------------------------------------------------------------------- diff --git a/tests/ui/modules/Linphone/Timeline.qml b/tests/ui/modules/Linphone/Timeline.qml index cff7df61c..236e36c31 100644 --- a/tests/ui/modules/Linphone/Timeline.qml +++ b/tests/ui/modules/Linphone/Timeline.qml @@ -97,7 +97,7 @@ ColumnLayout { ? TimelineStyle.contact.backgroundColor.a : TimelineStyle.contact.backgroundColor.b ) - sipAddress: $timelineEntry + entry: $timelineEntry sipAddressColor: view.currentIndex === index ? TimelineStyle.contact.sipAddress.color.selected : TimelineStyle.contact.sipAddress.color.normal