temp work around - restore use of vcard FullName (use by sdk to store ldap results)

This commit is contained in:
Christophe Deschamps 2024-11-15 23:23:27 +01:00
parent 9fc3caa63c
commit 97c2c1e214
2 changed files with 5 additions and 1 deletions

View file

@ -66,6 +66,7 @@ FriendCore::FriendCore(const std::shared_ptr<linphone::Friend> &contact) : QObje
mJob = Utils::coreStringToAppString(vcard->getJobTitle()); mJob = Utils::coreStringToAppString(vcard->getJobTitle());
mGivenName = Utils::coreStringToAppString(vcard->getGivenName()); mGivenName = Utils::coreStringToAppString(vcard->getGivenName());
mFamilyName = Utils::coreStringToAppString(vcard->getFamilyName()); mFamilyName = Utils::coreStringToAppString(vcard->getFamilyName());
mFullName = Utils::coreStringToAppString(vcard->getFullName());
mVCardString = Utils::coreStringToAppString(vcard->asVcard4String()); mVCardString = Utils::coreStringToAppString(vcard->asVcard4String());
} }
auto addresses = contact->getAddresses(); auto addresses = contact->getAddresses();
@ -112,6 +113,7 @@ FriendCore::FriendCore(const FriendCore &friendCore) {
mDefaultAddress = friendCore.mDefaultAddress; mDefaultAddress = friendCore.mDefaultAddress;
mGivenName = friendCore.mGivenName; mGivenName = friendCore.mGivenName;
mFamilyName = friendCore.mFamilyName; mFamilyName = friendCore.mFamilyName;
mFullName = friendCore.mFullName;
mOrganization = friendCore.mOrganization; mOrganization = friendCore.mOrganization;
mJob = friendCore.mJob; mJob = friendCore.mJob;
mPictureUri = friendCore.mPictureUri; mPictureUri = friendCore.mPictureUri;
@ -241,7 +243,8 @@ void FriendCore::reset(const FriendCore &contact) {
} }
QString FriendCore::getDisplayName() const { QString FriendCore::getDisplayName() const {
return mGivenName + " " + mFamilyName; if (mFullName.isEmpty()) return mGivenName + " " + mFamilyName;
else return mFullName;
} }
QString FriendCore::getGivenName() const { QString FriendCore::getGivenName() const {

View file

@ -178,6 +178,7 @@ protected:
QDateTime mPresenceTimestamp; QDateTime mPresenceTimestamp;
QString mGivenName; QString mGivenName;
QString mFamilyName; QString mFamilyName;
QString mFullName;
QString mOrganization; QString mOrganization;
QString mJob; QString mJob;
bool mStarred; bool mStarred;