diff --git a/Linphone/core/account/AccountCore.cpp b/Linphone/core/account/AccountCore.cpp index 6f65e81ea..a44402002 100644 --- a/Linphone/core/account/AccountCore.cpp +++ b/Linphone/core/account/AccountCore.cpp @@ -52,7 +52,7 @@ AccountCore::AccountCore(const std::shared_ptr &account) : QO mUnreadNotifications = account->getMissedCallsCount(); mDisplayName = Utils::coreStringToAppString(identityAddress->getDisplayName()); if (mDisplayName.isEmpty()) { - mDisplayName = ToolModel::getDisplayName(mIdentityAddress); + mDisplayName = ToolModel::getDisplayName(identityAddress); identityAddress->setDisplayName(Utils::appStringToCoreString(mDisplayName)); params->setIdentityAddress(identityAddress); account->setParams(params); diff --git a/Linphone/core/call-history/CallHistoryCore.cpp b/Linphone/core/call-history/CallHistoryCore.cpp index 1fa440ca5..df5307d6c 100644 --- a/Linphone/core/call-history/CallHistoryCore.cpp +++ b/Linphone/core/call-history/CallHistoryCore.cpp @@ -48,7 +48,6 @@ CallHistoryCore::CallHistoryCore(const std::shared_ptr &callL auto addr = callLog->getRemoteAddress()->clone(); addr->clean(); - // mRemoteAddress->clean(); mStatus = LinphoneEnums::fromLinphone(callLog->getStatus()); mDate = QDateTime::fromMSecsSinceEpoch(callLog->getStartDate() * 1000); mIsOutgoing = callLog->getDir() == linphone::Call::Dir::Outgoing; @@ -66,7 +65,9 @@ CallHistoryCore::CallHistoryCore(const std::shared_ptr &callL if (linphoneFriend) { mFriendModel = Utils::makeQObject_ptr(linphoneFriend); mDisplayName = mFriendModel->getFullName(); - } else mDisplayName = ToolModel::getDisplayName(Utils::coreStringToAppString(addr->asStringUriOnly())); + } else { + mDisplayName = ToolModel::getDisplayName(addr); + } } } @@ -165,7 +166,7 @@ void CallHistoryCore::onRemoved(const std::shared_ptr &updated if (isThisFriend) { mFriendModel = nullptr; mFriendModelConnection = nullptr; - mDisplayName = ToolModel::getDisplayName(mRemoteAddress); + mDisplayName = ToolModel::getDisplayName(fAddress); emit displayNameChanged(); emit friendUpdated(); } diff --git a/Linphone/core/call/CallCore.cpp b/Linphone/core/call/CallCore.cpp index 81fd6df4b..8042dc560 100644 --- a/Linphone/core/call/CallCore.cpp +++ b/Linphone/core/call/CallCore.cpp @@ -125,7 +125,7 @@ CallCore::CallCore(const std::shared_ptr &call) : QObject(nullpt if (linphoneFriend) mRemoteName = Utils::coreStringToAppString( linphoneFriend->getVcard() ? linphoneFriend->getVcard()->getFullName() : linphoneFriend->getName()); - if (mRemoteName.isEmpty()) mRemoteName = ToolModel::getDisplayName(mRemoteAddress); + if (mRemoteName.isEmpty()) mRemoteName = ToolModel::getDisplayName(remoteAddress); mShouldFindRemoteFriend = !linphoneFriend; if (mShouldFindRemoteFriend) { mShouldFindRemoteFriend = CoreModel::getInstance()->getCore()->getRemoteContactDirectories().size() > 0; diff --git a/Linphone/core/participant/ParticipantDeviceCore.cpp b/Linphone/core/participant/ParticipantDeviceCore.cpp index 11f4dd655..433a92313 100644 --- a/Linphone/core/participant/ParticipantDeviceCore.cpp +++ b/Linphone/core/participant/ParticipantDeviceCore.cpp @@ -51,7 +51,7 @@ ParticipantDeviceCore::ParticipantDeviceCore(const std::shared_ptrgetParticipant()->getAddress()->getDisplayName()); if (mDisplayName.isEmpty()) { - mDisplayName = ToolModel::getDisplayName(mAddress); + mDisplayName = ToolModel::getDisplayName(deviceAddress); } mIsMuted = device->getIsMuted(); mIsSpeaking = device->getIsSpeaking(); diff --git a/Linphone/model/conference/ConferenceInfoModel.cpp b/Linphone/model/conference/ConferenceInfoModel.cpp index 711fc07b6..9d9e60e80 100644 --- a/Linphone/model/conference/ConferenceInfoModel.cpp +++ b/Linphone/model/conference/ConferenceInfoModel.cpp @@ -106,7 +106,7 @@ QString ConferenceInfoModel::getOrganizerName() const { mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); auto organizer = mConferenceInfo->getOrganizer(); auto name = Utils::coreStringToAppString(organizer->getDisplayName()); - if (name.isEmpty()) name = ToolModel::getDisplayName(Utils::coreStringToAppString(organizer->asStringUriOnly())); + if (name.isEmpty()) name = ToolModel::getDisplayName(organizer); return name; } diff --git a/Linphone/view/Control/Container/Call/CallHistoryLayout.qml b/Linphone/view/Control/Container/Call/CallHistoryLayout.qml index 9ae9b4291..4db78a73f 100644 --- a/Linphone/view/Control/Container/Call/CallHistoryLayout.qml +++ b/Linphone/view/Control/Container/Call/CallHistoryLayout.qml @@ -11,16 +11,18 @@ ColumnLayout { id: mainItem spacing: 30 * DefaultStyle.dp + property var callHistoryGui + property FriendGui contact - property ConferenceInfoGui conferenceInfo + property var conferenceInfo: callHistoryGui?.core.conferenceInfo property bool isConference: conferenceInfo != undefined && conferenceInfo != null property string contactAddress: specificAddress != "" ? specificAddress : contact && contact.core.defaultAddress || "" property var computedContactNameObj: UtilsCpp.getDisplayName(contactAddress) property string computedContactName: computedContactNameObj ? computedContactNameObj.value: "" property string contactName: contact ? contact.core.fullName - : conferenceInfo - ? conferenceInfo.core.subject + : callHistoryGui + ? callHistoryGui.core.displayName : computedContactName // Set this property to get the security informations @@ -72,9 +74,7 @@ ColumnLayout { height: 100 * DefaultStyle.dp contact: mainItem.contact || null isConference: !!mainItem.conferenceInfo - _address: mainItem.conferenceInfo - ? mainItem.conferenceInfo.core.subject - : mainItem.contactAddress || mainItem.contactName + displayNameVal: mainItem.contactName secured: securityLevel === LinphoneEnums.SecurityLevel.EndToEndEncryptedAndVerified } Item { diff --git a/Linphone/view/Control/Display/Call/CallHistoryListView.qml b/Linphone/view/Control/Display/Call/CallHistoryListView.qml index 52925951a..132dc7221 100644 --- a/Linphone/view/Control/Display/Call/CallHistoryListView.qml +++ b/Linphone/view/Control/Display/Call/CallHistoryListView.qml @@ -115,9 +115,7 @@ ListView { id: historyAvatar property var contactObj: UtilsCpp.findFriendByAddress(modelData.core.remoteAddress) contact: contactObj?.value || null - _address: modelData.core.conferenceInfo - ? modelData.core.conferenceInfo.core.subject - : modelData.core.remoteAddress + displayNameVal: modelData.core.displayName secured: securityLevel === LinphoneEnums.SecurityLevel.EndToEndEncryptedAndVerified width: 45 * DefaultStyle.dp height: 45 * DefaultStyle.dp diff --git a/Linphone/view/Page/Main/Call/CallPage.qml b/Linphone/view/Page/Main/Call/CallPage.qml index 7f638d974..ceec8757d 100644 --- a/Linphone/view/Page/Main/Call/CallPage.qml +++ b/Linphone/view/Page/Main/Call/CallPage.qml @@ -444,7 +444,6 @@ AbstractMainPage { Component { id: contactDetailComp FocusScope{ - objectName: "contactDetailComp" width: parent?.width height: parent?.height CallHistoryLayout { @@ -453,12 +452,12 @@ AbstractMainPage { anchors.topMargin: 45 * DefaultStyle.dp anchors.bottomMargin: 45 * DefaultStyle.dp visible: mainItem.selectedRowHistoryGui != undefined + callHistoryGui: selectedRowHistoryGui property var contactObj: UtilsCpp.findFriendByAddress(specificAddress) contact: contactObj && contactObj.value || null - conferenceInfo: mainItem.selectedRowHistoryGui && mainItem.selectedRowHistoryGui.core.conferenceInfo || null - specificAddress: mainItem.selectedRowHistoryGui && mainItem.selectedRowHistoryGui.core.remoteAddress || "" + specificAddress: callHistoryGui && callHistoryGui.core.remoteAddress || "" buttonContent: PopupButton { id: detailOptions