diff --git a/CHANGELOG.md b/CHANGELOG.md index 34a031c3b..dc2f96695 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Create thumbnails into memory instead of disk. - Display video thumbnails. - Crop thumbnail and pictures if distored. +- Update SDK to 5.2.72 ## 5.0.18 - 2023-06-16 diff --git a/linphone-app/src/components/core/CoreManager.cpp b/linphone-app/src/components/core/CoreManager.cpp index 01bfa2f6c..934d8434f 100644 --- a/linphone-app/src/components/core/CoreManager.cpp +++ b/linphone-app/src/components/core/CoreManager.cpp @@ -217,18 +217,16 @@ void CoreManager::cleanLogs () const { void CoreManager::setDatabasesPaths () { SET_DATABASE_PATH(Friends, Paths::getFriendsListFilePath()); - linphone_core_set_call_logs_database_path(mCore->cPtr(), Paths::getCallHistoryFilePath().c_str());// Setting the message database let SDK to migrate data if(QFile::exists(Utils::coreStringToAppString(Paths::getMessageHistoryFilePath()))){ linphone_core_set_chat_database_path(mCore->cPtr(), Paths::getMessageHistoryFilePath().c_str());// Setting the message database let SDK to migrate data QFile::remove(Utils::coreStringToAppString(Paths::getMessageHistoryFilePath())); } } -#undef SET_DATABASE_PATH - // ----------------------------------------------------------------------------- void CoreManager::setOtherPaths () { + SET_DATABASE_PATH(CallLogs, Paths::getCallHistoryFilePath());// Setting the call logs database let SDK to migrate data if (mCore->getZrtpSecretsFile().empty() || !Paths::filePathExists(mCore->getZrtpSecretsFile(), true)) mCore->setZrtpSecretsFile(Paths::getZrtpSecretsFilePath());// Use application path if Linphone default is not available qInfo() << "Using ZrtpSecrets path : " << QString::fromStdString(mCore->getZrtpSecretsFile()); @@ -253,6 +251,8 @@ void CoreManager::setResourcesPaths () { // ----------------------------------------------------------------------------- +#undef SET_DATABASE_PATH + void CoreManager::createLinphoneCore (const QString &configPath) { qInfo() << QStringLiteral("Launch async core creation."); diff --git a/linphone-app/src/components/sip-addresses/SipAddressesModel.cpp b/linphone-app/src/components/sip-addresses/SipAddressesModel.cpp index b4b17cc7e..033562309 100644 --- a/linphone-app/src/components/sip-addresses/SipAddressesModel.cpp +++ b/linphone-app/src/components/sip-addresses/SipAddressesModel.cpp @@ -590,10 +590,11 @@ void SipAddressesModel::initSipAddresses () { qInfo() << "Sip addresses model from Chats :" << stepsTimer.restart() << "ms."; initSipAddressesFromCalls(); qInfo() << "Sip addresses model from Calls :" << stepsTimer.restart() << "ms."; - initRefs(); - qInfo() << "Sip addresses model from Refs :" << stepsTimer.restart() << "ms."; initSipAddressesFromContacts(); qInfo() << "Sip addresses model from Contacts :" << stepsTimer.restart() << "ms."; + mRefs.clear(); + initRefs(); + qInfo() << "Sip addresses model init Refs :" << stepsTimer.restart() << "ms."; qInfo() << "Sip addresses model initialized in:" << timer.elapsed() << "ms."; } diff --git a/linphone-app/src/components/sip-addresses/SipAddressesModel.hpp b/linphone-app/src/components/sip-addresses/SipAddressesModel.hpp index b8150a9d5..2f7850427 100644 --- a/linphone-app/src/components/sip-addresses/SipAddressesModel.hpp +++ b/linphone-app/src/components/sip-addresses/SipAddressesModel.hpp @@ -152,12 +152,14 @@ private: // --------------------------------------------------------------------------- - SipAddressEntry *getSipAddressEntry (const QString &peerAddress) { - auto it = mPeerAddressToSipAddressEntry.find(peerAddress); - if (it == mPeerAddressToSipAddressEntry.end()) - it = mPeerAddressToSipAddressEntry.insert(peerAddress, { peerAddress, nullptr, Presence::Offline, {} }); - return &(*it); - } + SipAddressEntry *getSipAddressEntry (const QString &peerAddress) { + auto it = mPeerAddressToSipAddressEntry.find(peerAddress); + if (it == mPeerAddressToSipAddressEntry.end()){ + it = mPeerAddressToSipAddressEntry.insert(peerAddress, { peerAddress, nullptr, Presence::Offline, {} }); + mRefs << &(*it); + } + return &(*it); + } QHash mPeerAddressToSipAddressEntry; QList mRefs;