From d976decb3feb123be4374f94ca6dcff09f442f5f Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 27 Aug 2025 15:00:34 +0200 Subject: [PATCH] Adapt to SDK 5.5. --- Linphone/core/address-books/ldap/LdapCore.cpp | 19 +++++++++++++++++-- .../model/address-books/ldap/LdapModel.cpp | 15 +++++++++++++++ Linphone/model/chat/ChatModel.cpp | 2 +- cmake/install/install.cmake | 2 +- external/linphone-sdk | 2 +- 5 files changed, 35 insertions(+), 5 deletions(-) diff --git a/Linphone/core/address-books/ldap/LdapCore.cpp b/Linphone/core/address-books/ldap/LdapCore.cpp index ad9840a38..a61d7be2a 100644 --- a/Linphone/core/address-books/ldap/LdapCore.cpp +++ b/Linphone/core/address-books/ldap/LdapCore.cpp @@ -21,6 +21,21 @@ #include "LdapCore.hpp" #include "core/App.hpp" +/* + * This files uses a few methods of linphone::LdapParams class that are marked as deprecated. + * They are replaced by equivalents in the linphone::RemoteContactDirectory class, that actually holds + * the linphone::LdapParams. + * TODO: do the migration to new methods. + * Meanwhile, make the deprecated warning not to be treated as an error. + */ +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4996) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic warning "-Wdeprecated-declarations" +#endif + DEFINE_ABSTRACT_OBJECT(LdapCore) QSharedPointer LdapCore::create(const std::shared_ptr &ldap) { @@ -95,10 +110,10 @@ void LdapCore::setSelf(QSharedPointer me) { DEFINE_CORE_GETSET_CONNECT(mLdapModelConnection, LdapCore, LdapModel, mLdapModel, bool, debug, Debug) mLdapModelConnection->makeConnectToModel(&LdapModel::saved, [this]() { - mLdapModelConnection->invokeToCore([this]() { emit App::getInstance()->getSettings()->ldapConfigChanged(); }); + mLdapModelConnection->invokeToCore([this]() { emit App::getInstance() -> getSettings()->ldapConfigChanged(); }); }); mLdapModelConnection->makeConnectToModel(&LdapModel::removed, [this]() { - mLdapModelConnection->invokeToCore([this]() { emit App::getInstance()->getSettings()->ldapConfigChanged(); }); + mLdapModelConnection->invokeToCore([this]() { emit App::getInstance() -> getSettings()->ldapConfigChanged(); }); }); } diff --git a/Linphone/model/address-books/ldap/LdapModel.cpp b/Linphone/model/address-books/ldap/LdapModel.cpp index 346d73623..b0318ad1e 100644 --- a/Linphone/model/address-books/ldap/LdapModel.cpp +++ b/Linphone/model/address-books/ldap/LdapModel.cpp @@ -22,6 +22,21 @@ #include "model/core/CoreModel.hpp" #include "tool/Utils.hpp" +/* + * This files uses a few methods of linphone::LdapParams class that are marked as deprecated. + * They are replaced by equivalents in the linphone::RemoteContactDirectory class, that actually holds + * the linphone::LdapParams. + * TODO: do the migration to new methods. + * Meanwhile, make the deprecated warning not to be treated as an error. + */ +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4996) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic warning "-Wdeprecated-declarations" +#endif + DEFINE_ABSTRACT_OBJECT(LdapModel) LdapModel::LdapModel(const std::shared_ptr &ldap, QObject *parent) { diff --git a/Linphone/model/chat/ChatModel.cpp b/Linphone/model/chat/ChatModel.cpp index 8187c8e00..827bf0455 100644 --- a/Linphone/model/chat/ChatModel.cpp +++ b/Linphone/model/chat/ChatModel.cpp @@ -182,7 +182,7 @@ ChatModel::searchMessageByText(QString text, std::shared_ptrcompose(); + mMonitor->composeTextMessage(); } linphone::ChatRoom::State ChatModel::getState() const { diff --git a/cmake/install/install.cmake b/cmake/install/install.cmake index 185595396..391c357b7 100644 --- a/cmake/install/install.cmake +++ b/cmake/install/install.cmake @@ -20,7 +20,7 @@ # ################################################################################ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) set(TARGET_NAME Linphone) diff --git a/external/linphone-sdk b/external/linphone-sdk index 6a0195583..a55ec9285 160000 --- a/external/linphone-sdk +++ b/external/linphone-sdk @@ -1 +1 @@ -Subproject commit 6a0195583bae2ca8e35972d9cceeb4688bfc31cf +Subproject commit a55ec92858c1aca1f9f86d41e7a867b944393388