From 11487b3aeb3623ee69d463eafa528664d165e312 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Thu, 6 Nov 2025 10:38:38 +0100 Subject: [PATCH] - Use of SDK master to prepare for 6.2 (SDK 5.5): - Remove deprecations (Qt, LDAP, AudioDevice, Compose) - Fix absolute paths that can be wrong with temporary binaries images like Appimage. This way rootca will target the packaged one. - Remove some packaged path as they are already set by SDK (from a fix on its side). - Remove duplicated rootca packaging. --- .../linux-desktop-ubuntu-2204.yml | 6 +- .gitlab-ci-files/linux-desktop.yml | 2 +- .gitlab-ci-files/macosx-desktop.yml | 10 ++-- .gitlab-ci-files/windows-desktop.yml | 8 +-- .gitlab-ci.yml | 2 +- Linphone/core/App.cpp | 3 +- Linphone/core/path/Paths.cpp | 55 ++++++------------- Linphone/core/path/Paths.hpp | 8 ++- Linphone/core/proxy/LimitProxy.cpp | 12 +++- Linphone/core/proxy/LimitProxy.hpp | 2 +- Linphone/core/proxy/SortFilterProxy.cpp | 14 ++++- .../model/address-books/ldap/LdapModel.cpp | 13 ++--- Linphone/model/chat/ChatModel.cpp | 2 +- Linphone/model/core/CoreModel.cpp | 11 ++-- Linphone/model/setting/SettingsModel.cpp | 16 ++++-- Linphone/tool/Constants.cpp | 2 - Linphone/tool/Constants.hpp | 2 - cmake/install/install.cmake | 3 - external/linphone-sdk | 2 +- 19 files changed, 88 insertions(+), 85 deletions(-) diff --git a/.gitlab-ci-files/linux-desktop-ubuntu-2204.yml b/.gitlab-ci-files/linux-desktop-ubuntu-2204.yml index b37bfe0fd..ffddd1136 100644 --- a/.gitlab-ci-files/linux-desktop-ubuntu-2204.yml +++ b/.gitlab-ci-files/linux-desktop-ubuntu-2204.yml @@ -1,5 +1,5 @@ .factorize_ubuntu2204: &docker_image_platform_and_runner_tag - tags: [ "docker" ] + tags: [ "docker-flat" ] image: gitlab.linphone.org:4567/bc/public/linphone-desktop/bc-dev-ubuntu-22-04-lts:$UBUNTU_2204_IMAGE_VERSION ubuntu2204-ninja-gcc: @@ -71,7 +71,7 @@ ubuntu2204-makefile-gcc-signed: ################################################# ubuntu2204-makefile-gcc-package: - tags: [ "docker" ] + tags: [ "docker-flat" ] image: gitlab.linphone.org:4567/bc/public/linphone-desktop/bc-dev-ubuntu-22-04-lts:$UBUNTU_2204_IMAGE_VERSION needs: [] rules: @@ -100,7 +100,7 @@ ubuntu2204-makefile-gcc-deploy: ubuntu2204-makefile-gcc-plugins-deploy: stage: deploy - tags: [ "deploy" ] + tags: [ "deploy-flat" ] needs: - ubuntu2204-makefile-gcc only: diff --git a/.gitlab-ci-files/linux-desktop.yml b/.gitlab-ci-files/linux-desktop.yml index f2a0a203c..d9734bbe5 100644 --- a/.gitlab-ci-files/linux-desktop.yml +++ b/.gitlab-ci-files/linux-desktop.yml @@ -74,6 +74,6 @@ .linux-deploy: stage: deploy - tags: [ "deploy" ] + tags: [ "deploy-flat" ] script: - *deploy_linux \ No newline at end of file diff --git a/.gitlab-ci-files/macosx-desktop.yml b/.gitlab-ci-files/macosx-desktop.yml index f6bb3ed68..1104b84c6 100644 --- a/.gitlab-ci-files/macosx-desktop.yml +++ b/.gitlab-ci-files/macosx-desktop.yml @@ -26,7 +26,7 @@ .macosx-desktop: stage: build - tags: [ "macos-min-xcode12.2" ] + tags: [ "macos-min-xcode12.2-flat" ] rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" && $DOCKER_UPDATE == null && $SKIP_MACOSX == null - if: $CI_PIPELINE_SOURCE == "schedule" && $DOCKER_UPDATE == null && $SKIP_MACOSX == null @@ -93,7 +93,7 @@ macosx-ninja-novideo: # WAIT for QT6 for arm64 macosx-ninja-package: stage: package - tags: [ "macos-min-xcode12.2" ] + tags: [ "macos-min-xcode12.2-flat" ] needs: [] rules: - !reference [.rules-merge-request-manual, rules] @@ -117,7 +117,7 @@ macosx-ninja-package: macosx-codesigning: stage: signing - tags: [ "macos-min-xcode12.2" ] + tags: [ "macos-min-xcode12.2-flat" ] needs: - macosx-ninja-package rules: @@ -142,7 +142,7 @@ macosx-codesigning: macosx-deploy: stage: deploy - tags: [ "macos-min-xcode12.2" ] + tags: [ "macos-min-xcode12.2-flat" ] needs: - macosx-codesigning only: @@ -160,7 +160,7 @@ macosx-deploy: macosx-makefile-plugins-deploy: stage: deploy - tags: [ "macos-min-xcode12.2" ] + tags: [ "macos-min-xcode12.2-flat" ] needs: - macosx-makefile only: diff --git a/.gitlab-ci-files/windows-desktop.yml b/.gitlab-ci-files/windows-desktop.yml index 81c30400e..2821032eb 100644 --- a/.gitlab-ci-files/windows-desktop.yml +++ b/.gitlab-ci-files/windows-desktop.yml @@ -92,11 +92,11 @@ .windows-vs2022: extends: .windows-vs - tags: [ "windows-powershell-vs-17-2022" ] + tags: [ "windows-powershell-vs-17-2022-flat" ] .windows-codesigning: extends: .prepare - tags: [ "windows-powershell-vs-17-2022-apps" ] + tags: [ "windows-powershell-vs-17-2022-apps-flat" ] .windows-msbuild-variables: variables: @@ -232,7 +232,7 @@ win64-codesigning: .win64-upload: stage: deploy - tags: [ "windows-powershell" ] + tags: [ "windows-powershell-flat" ] rules: - if: $NIGHTLY_MASTER - if: $DEPLOY_WINDOWS @@ -250,7 +250,7 @@ win64-ninja-vs2022-upload: .win64-plugins-upload: stage: deploy - tags: [ "windows" ] + tags: [ "windows-flat" ] rules: - if: $DEPLOY_PLUGINS script: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e30b907d6..d44110a68 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,7 +21,7 @@ variables: #CMAKE_OPTIONS: -DENABLE_LIME_X3DH=YES # Docker image version - UBUNTU_2204_IMAGE_VERSION: 20250930_add_commercial_qt_versions_5.15.14_5.15.19_6.8.1_6.8.3_6.9.1 + UBUNTU_2204_IMAGE_VERSION: 20251106_add_commercial_qt_version_5.15.14_5.15.19_6.8.1_6.8.3_6.9.1_6.10.0 workflow: diff --git a/Linphone/core/App.cpp b/Linphone/core/App.cpp index dbd5fa741..e60730613 100644 --- a/Linphone/core/App.cpp +++ b/Linphone/core/App.cpp @@ -287,6 +287,7 @@ App::App(int &argc, char *argv[]) : SingleApplication(argc, argv, true, Mode::User | Mode::ExcludeAppPath | Mode::ExcludeAppVersion) { // Do not use APPLICATION_NAME here. // The EXECUTABLE_NAME will be used in qt standard paths. It's our goal. + QDir::setCurrent(QCoreApplication::applicationDirPath());// Set working directory as the executable to allow relative paths. QThread::currentThread()->setPriority(QThread::HighPriority); qDebug() << "app thread is" << QThread::currentThread(); QCoreApplication::setApplicationName(EXECUTABLE_NAME); @@ -305,7 +306,7 @@ App::App(int &argc, char *argv[]) .arg(applicationVersion()) .arg(Utils::getOsProduct()) .arg(qVersion()); - + lInfo() << "at " << QDir().absolutePath(); mCurrentDate = QDate::currentDate(); mAutoStart = autoStartEnabled(); mDateUpdateTimer.setInterval(60000); diff --git a/Linphone/core/path/Paths.cpp b/Linphone/core/path/Paths.cpp index 94a0ea260..5dac393e5 100644 --- a/Linphone/core/path/Paths.cpp +++ b/Linphone/core/path/Paths.cpp @@ -115,6 +115,7 @@ static inline QDir getAppPackageDir() { } static inline QString getAppPackageDataDirPath() { + QDir executableDir(QCoreApplication::applicationDirPath()); QDir dir = getAppPackageDir(); #ifdef __APPLE__ if (!dir.cd("Resources")) { @@ -126,17 +127,21 @@ static inline QString getAppPackageDataDirPath() { dir.mkdir("share"); dir.cd("share"); } - return dir.absolutePath(); + lInfo() << executableDir.absolutePath() << " VS " << dir.absolutePath() << " == " << executableDir.relativeFilePath(dir.absolutePath()); + return executableDir.relativeFilePath(dir.absolutePath()); } static inline QString getAppPackageMsPluginsDirPath() { + QDir executableDir(QCoreApplication::applicationDirPath()); QDir dir = getAppPackageDir(); dir.cd(MSPLUGINS_DIR); - return dir.absolutePath(); + return executableDir.relativeFilePath(dir.absolutePath()); } static inline QString getAppPackagePluginsDirPath() { - return getAppPackageDir().absolutePath() + Constants::PathPlugins; + QDir executableDir(QCoreApplication::applicationDirPath()); + QDir packageDir = getAppPackageDir(); + return executableDir.relativeFilePath( packageDir.absolutePath() + Constants::PathPlugins); } static inline QString getAppAssistantConfigDirPath() { @@ -159,29 +164,6 @@ static inline QString getAppFriendsFilePath() { return QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + Constants::PathFriendsList; } -static inline QString getAppRootCaFilePath() { - QString rootca = getAppPackageDataDirPath() + Constants::PathRootCa; - if (Paths::filePathExists(rootca)) { // Packaged - return rootca; - } else { - lInfo() << "Root ca path does not exist. Create it"; - QFileInfo rootcaInfo(rootca); - if (!rootcaInfo.absoluteDir().exists()) { - QDir dataDir(getAppPackageDataDirPath()); - if (!dataDir.mkpath(Constants::PathRootCa)) { - lCritical() << "ERROR : COULD NOT CREATE DIRECTORY WITH PATH" << Constants::PathRootCa; - return ""; - } - } - QFile rootCaFile(rootca); - if (rootCaFile.open(QIODevice::ReadWrite)) return rootca; - else { - lCritical() << "ERROR : COULD NOT CREATE ROOTCA WITH PATH" << rootca; - } - } - return ""; -} - static inline QString getAppMessageHistoryFilePath() { return QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + Constants::PathMessageHistoryList; } @@ -198,7 +180,9 @@ bool Paths::filePathExists(const QString &path, const bool isWritable) { QFile file(path); return file.exists(); } - +bool Paths::isSameRelativeFile(const QString &filePath, const QString &relativeFilePath) { + return filePath != relativeFilePath && QFileInfo(relativeFilePath) == QFileInfo(filePath); +} // ----------------------------------------------------------------------------- QString Paths::getAppLocalDirPath() { @@ -283,15 +267,16 @@ QString Paths::getLogsDirPath() { Constants::PathLogs); } +QString Paths::getAppRootCaFilePath() { + // Hardcoded because it comes from linphone and is not customizable. + return getReadableFilePath(getAppPackageDataDirPath() + "/linphone/rootca.pem"); +} + QString Paths::getMessageHistoryFilePath() { return getReadableFilePath( getAppMessageHistoryFilePath()); // No need to ensure that the file exists as this DB is deprecated } -QString Paths::getPackageDataDirPath() { - return getReadableDirPath(getAppPackageDataDirPath() + Constants::PathData); -} - QString Paths::getPackageMsPluginsDirPath() { return getReadableDirPath(getAppPackageMsPluginsDirPath()); } @@ -300,10 +285,6 @@ QString Paths::getPackagePluginsAppDirPath() { return getReadableDirPath(getAppPackagePluginsDirPath() + Constants::PathPluginsApp); } -QString Paths::getPackageSoundsResourcesDirPath() { - return getReadableDirPath(getAppPackageDataDirPath() + Constants::PathSounds); -} - QString Paths::getPackageTopDirPath() { return getReadableDirPath(getAppPackageDataDirPath()); } @@ -319,10 +300,6 @@ QStringList Paths::getPluginsAppFolders() { return pluginPaths; } -QString Paths::getRootCaFilePath() { - return getReadableFilePath(getAppRootCaFilePath()); -} - QString Paths::getToolsDirPath() { return getWritableDirPath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + Constants::PathTools); diff --git a/Linphone/core/path/Paths.hpp b/Linphone/core/path/Paths.hpp index 753fcc3eb..0c4d8b95c 100644 --- a/Linphone/core/path/Paths.hpp +++ b/Linphone/core/path/Paths.hpp @@ -27,8 +27,13 @@ namespace Paths { bool filePathExists(const QString &path, const bool isWritable = false); +//bool convertToRelativePath(const QString &path, QString *relativePath); + +// Return true if paths are different and point to the same file +bool isSameRelativeFile(const QString &filePath, const QString &relativeFilePath); QString getAppLocalDirPath(); +QString getAppRootCaFilePath(); QString getAssistantConfigDirPath(); QString getAvatarsDirPath(); QString getVCardsPath(); @@ -44,14 +49,11 @@ QString getFriendsListFilePath(); QString getLimeDatabasePath(); QString getLogsDirPath(); QString getMessageHistoryFilePath(); -QString getPackageDataDirPath(); QString getPackageMsPluginsDirPath(); QString getPackagePluginsAppDirPath(); -QString getPackageSoundsResourcesDirPath(); QString getPackageTopDirPath(); QString getPluginsAppDirPath(); QStringList getPluginsAppFolders(); -QString getRootCaFilePath(); QString getToolsDirPath(); QString getUserCertificatesDirPath(); QString getZrtpDataFilePath(); diff --git a/Linphone/core/proxy/LimitProxy.cpp b/Linphone/core/proxy/LimitProxy.cpp index 9ec8f0b2a..c43742c46 100644 --- a/Linphone/core/proxy/LimitProxy.cpp +++ b/Linphone/core/proxy/LimitProxy.cpp @@ -37,13 +37,21 @@ LimitProxy::~LimitProxy() { bool LimitProxy::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const { return mMaxDisplayItems == -1 || sourceRow < mMaxDisplayItems; } - +void LimitProxy::invalidateFilter() { +// TODO for a better filter management by encapsulating filter change between begin/end +#if QT_VERSION < QT_VERSION_CHECK(6, 10, 0) + QSortFilterProxyModel::invalidateFilter(); +#else + QSortFilterProxyModel::beginFilterChange(); + QSortFilterProxyModel::endFilterChange(); +#endif +} void LimitProxy::setSourceModels(SortFilterProxy *firstList) { auto secondList = firstList->sourceModel(); if (secondList) { connect(secondList, &QAbstractItemModel::rowsInserted, this, &LimitProxy::onAdded); connect(secondList, &QAbstractItemModel::rowsRemoved, this, &LimitProxy::onRemoved); - connect(secondList, &QAbstractItemModel::modelReset, this, &LimitProxy::invalidateRowsFilter); + connect(secondList, &QAbstractItemModel::modelReset, this, &LimitProxy::invalidate); } connect(firstList, &SortFilterProxy::filterTextChanged, this, &LimitProxy::filterTextChanged); connect(firstList, &SortFilterProxy::filterTypeChanged, this, &LimitProxy::filterTypeChanged); diff --git a/Linphone/core/proxy/LimitProxy.hpp b/Linphone/core/proxy/LimitProxy.hpp index 3f38b819c..fc74be2bb 100644 --- a/Linphone/core/proxy/LimitProxy.hpp +++ b/Linphone/core/proxy/LimitProxy.hpp @@ -41,7 +41,7 @@ public: LimitProxy(QObject *parent = nullptr); virtual ~LimitProxy(); virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; - + virtual void invalidateFilter(); // Helper for setting the limit with sorted/filtered list void setSourceModels(SortFilterProxy *firstList); diff --git a/Linphone/core/proxy/SortFilterProxy.cpp b/Linphone/core/proxy/SortFilterProxy.cpp index cfeff8291..a3ff345a0 100644 --- a/Linphone/core/proxy/SortFilterProxy.cpp +++ b/Linphone/core/proxy/SortFilterProxy.cpp @@ -75,8 +75,14 @@ QString SortFilterProxy::getFilterText() const { void SortFilterProxy::setFilterText(const QString &filter) { if (mFilterText != filter) { +#if QT_VERSION < QT_VERSION_CHECK(6, 10, 0) mFilterText = filter; - invalidateFilter(); + QSortFilterProxyModel::invalidateFilter(); +#else + QSortFilterProxyModel::beginFilterChange(); + mFilterText = filter; + QSortFilterProxyModel::endFilterChange(); +#endif emit filterTextChanged(); } } @@ -90,5 +96,11 @@ void SortFilterProxy::remove(int index, int count) { } void SortFilterProxy::invalidateFilter() { +// TODO for a better filter management by encapsulating filter change between begin/end +#if QT_VERSION < QT_VERSION_CHECK(6, 10, 0) QSortFilterProxyModel::invalidateFilter(); +#else + QSortFilterProxyModel::beginFilterChange(); + QSortFilterProxyModel::endFilterChange(); +#endif } diff --git a/Linphone/model/address-books/ldap/LdapModel.cpp b/Linphone/model/address-books/ldap/LdapModel.cpp index fb283634f..598b80e82 100644 --- a/Linphone/model/address-books/ldap/LdapModel.cpp +++ b/Linphone/model/address-books/ldap/LdapModel.cpp @@ -28,17 +28,16 @@ LdapModel::LdapModel(const std::shared_ptr &ld mustBeInLinphoneThread(getClassName()); if (ldap) { mLdap = ldap; - mLdapParamsClone = mLdap->getLdapParams(); + mLdapParamsClone = mLdap->getLdapRemoteContactDirectory(); } else { mLdapParamsClone = CoreModel::getInstance()->getCore()->createLdapParams(); - mLdapParamsClone->setDelay(2000); mLdapParamsClone->enableTls(true); - mLdapParamsClone->setEnabled(true); - mLdap = CoreModel::getInstance()->getCore()->createLdapRemoteContactDirectory(mLdapParamsClone); + mLdap->setDelay(2000); mLdap->setTimeout(5); mLdap->setLimit(50); mLdap->setMinCharacters(0); // Needs to be 0 if Contacts list should be synchronized with LDAP AB + mLdap->enable(true); } } @@ -65,7 +64,7 @@ void LdapModel::save() { mLdap->setMinCharacters(oldMinChars); core->addRemoteContactDirectory(mLdap); lDebug() << log().arg("LDAP Server saved"); - mLdapParamsClone = mLdap->getLdapParams(); + mLdapParamsClone = mLdap->getLdapRemoteContactDirectory(); // Clean cache to take account new searches auto ldapFriendList = core->getFriendListByName("ldap_friends"); if (ldapFriendList) core->removeFriendList(ldapFriendList); @@ -92,7 +91,7 @@ void LdapModel::setDebug(const bool &data) { } } -DEFINE_GETSET(LdapModel, bool, enabled, Enabled, mLdapParamsClone) +DEFINE_GETSET_ENABLE(LdapModel, enabled, Enabled, mLdap) DEFINE_GETSET_MODEL_STRING(LdapModel, serverUrl, ServerUrl, mLdap) DEFINE_GETSET_MODEL_STRING(LdapModel, bindDn, BindDn, mLdapParamsClone) DEFINE_GETSET_MODEL_STRING(LdapModel, password, Password, mLdapParamsClone) @@ -107,7 +106,7 @@ DEFINE_GETSET_MODEL_STRING(LdapModel, baseObject, BaseObject, mLdapParamsClone) DEFINE_GETSET_MODEL_STRING(LdapModel, filter, Filter, mLdapParamsClone) DEFINE_GETSET(LdapModel, int, limit, Limit, mLdap) DEFINE_GETSET(LdapModel, int, timeout, Timeout, mLdap) -DEFINE_GETSET(LdapModel, int, delay, Delay, mLdapParamsClone) +DEFINE_GETSET(LdapModel, int, delay, Delay, mLdap) DEFINE_GETSET(LdapModel, int, minCharacters, MinCharacters, mLdap) DEFINE_GETSET_MODEL_STRING(LdapModel, nameAttribute, NameAttribute, mLdapParamsClone) DEFINE_GETSET_MODEL_STRING(LdapModel, sipAttribute, SipAttribute, mLdapParamsClone) diff --git a/Linphone/model/chat/ChatModel.cpp b/Linphone/model/chat/ChatModel.cpp index a8d9a52fb..e6a65ac02 100644 --- a/Linphone/model/chat/ChatModel.cpp +++ b/Linphone/model/chat/ChatModel.cpp @@ -212,7 +212,7 @@ ChatModel::searchMessageByText(QString text, std::shared_ptrcompose(); + mMonitor->composeTextMessage(); } linphone::ChatRoom::State ChatModel::getState() const { diff --git a/Linphone/model/core/CoreModel.cpp b/Linphone/model/core/CoreModel.cpp index cd8096a20..9f05fbb39 100644 --- a/Linphone/model/core/CoreModel.cpp +++ b/Linphone/model/core/CoreModel.cpp @@ -171,8 +171,6 @@ void CoreModel::setPathBeforeCreation() { std::shared_ptr factory = linphone::Factory::get(); SET_FACTORY_PATH(Msplugins, Paths::getPackageMsPluginsDirPath()); SET_FACTORY_PATH(TopResources, Paths::getPackageTopDirPath()); - SET_FACTORY_PATH(SoundResources, Paths::getPackageSoundsResourcesDirPath()); - SET_FACTORY_PATH(DataResources, Paths::getPackageDataDirPath()); SET_FACTORY_PATH(Data, Paths::getAppLocalDirPath()); SET_FACTORY_PATH(Download, Paths::getDownloadDirPath()); SET_FACTORY_PATH(Config, Paths::getConfigDirPath(true)); @@ -199,8 +197,13 @@ void CoreModel::setPathAfterStart() { mCore->setUserCertificatesPath(Utils::appStringToCoreString(Paths::getUserCertificatesDirPath())); lInfo() << "[CoreModel] Using UserCertificate path : " << QString::fromStdString(mCore->getUserCertificatesPath()); // Use application path if Linphone default is not available - if (mCore->getRootCa().empty() || !Paths::filePathExists(Utils::coreStringToAppString(mCore->getRootCa()))) - mCore->setRootCa(Utils::appStringToCoreString(Paths::getRootCaFilePath())); + QString rootCaPath = Utils::coreStringToAppString(mCore->getRootCa()); + QString relativeRootCa = Paths::getAppRootCaFilePath(); + lDebug() << "[CoreModel] Getting rootCa paths: " << rootCaPath << " VS " << relativeRootCa; + if (!Paths::filePathExists(rootCaPath) || Paths::isSameRelativeFile(rootCaPath, relativeRootCa) ) { + lInfo() << "[CoreModel] Reset rootCa path to: " << relativeRootCa; + mCore->setRootCa(Utils::appStringToCoreString(relativeRootCa)); + } lInfo() << "[CoreModel] Using RootCa path : " << QString::fromStdString(mCore->getRootCa()); } diff --git a/Linphone/model/setting/SettingsModel.cpp b/Linphone/model/setting/SettingsModel.cpp index 125cbc6cc..a2de2a0d2 100644 --- a/Linphone/model/setting/SettingsModel.cpp +++ b/Linphone/model/setting/SettingsModel.cpp @@ -395,14 +395,22 @@ void SettingsModel::setPlaybackDevice(const QVariantMap &device) { QVariantMap SettingsModel::getRingerDevice() const { mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); - auto id = Utils::coreStringToAppString(CoreModel::getInstance()->getCore()->getRingerDevice()); - auto audioDevice = ToolModel::findAudioDevice(id, linphone::AudioDevice::Capabilities::CapabilityPlay); - return ToolModel::createVariant(audioDevice); + for (const auto &device : CoreModel::getInstance()->getCore()->getExtendedAudioDevices()) { + if (device->getUseForRinging()) + return ToolModel::createVariant(device); + } + return ToolModel::createVariant(nullptr); } void SettingsModel::setRingerDevice(QVariantMap device) { mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); - CoreModel::getInstance()->getCore()->setRingerDevice(Utils::appStringToCoreString(device["id"].toString())); + for (const auto &ldevice : CoreModel::getInstance()->getCore()->getExtendedAudioDevices()) { + auto id = Utils::appStringToCoreString(device["id"].toString()); + if (ldevice->getId() == id) { + ldevice->setUseForRinging(true); + }else + ldevice->setUseForRinging(false); + } emit ringerDeviceChanged(device); } diff --git a/Linphone/tool/Constants.cpp b/Linphone/tool/Constants.cpp index fbcb0e95c..e8b4431f2 100644 --- a/Linphone/tool/Constants.cpp +++ b/Linphone/tool/Constants.cpp @@ -57,7 +57,6 @@ constexpr char Constants::PathAssistantConfig[]; constexpr char Constants::PathAvatars[]; constexpr char Constants::PathCaptures[]; constexpr char Constants::PathCodecs[]; -constexpr char Constants::PathData[]; constexpr char Constants::PathTools[]; constexpr char Constants::PathLogs[]; #ifdef APPLE @@ -66,7 +65,6 @@ constexpr char Constants::PathPlugins[]; constexpr char Constants::PathPlugins[]; #endif constexpr char Constants::PathPluginsApp[]; -constexpr char Constants::PathSounds[]; constexpr char Constants::PathUserCertificates[]; constexpr char Constants::PathCallHistoryList[]; diff --git a/Linphone/tool/Constants.hpp b/Linphone/tool/Constants.hpp index 527f6b45d..fa805cb9c 100644 --- a/Linphone/tool/Constants.hpp +++ b/Linphone/tool/Constants.hpp @@ -142,7 +142,6 @@ public: static constexpr char PathFiles[] = "/files/"; static constexpr char PathCaptures[] = "/" EXECUTABLE_NAME "/captures/"; static constexpr char PathCodecs[] = "/codecs/"; - static constexpr char PathData[] = "/" EXECUTABLE_NAME; static constexpr char PathTools[] = "/tools/"; static constexpr char PathLogs[] = "/logs/"; static constexpr char PathVCards[] = "/vcards/"; @@ -152,7 +151,6 @@ public: static constexpr char PathPlugins[] = "/plugins/"; #endif static constexpr char PathPluginsApp[] = "app/"; - static constexpr char PathSounds[] = "/sounds/linphone"; static constexpr char PathUserCertificates[] = "/usr-crt/"; static constexpr char PathCallHistoryList[] = "/call-history.db"; diff --git a/cmake/install/install.cmake b/cmake/install/install.cmake index 391c357b7..7c4a6416c 100644 --- a/cmake/install/install.cmake +++ b/cmake/install/install.cmake @@ -53,9 +53,6 @@ install(TARGETS ${TARGET_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) -if(ENABLE_APP_PACKAGE_ROOTCA) - install(FILES "${LINPHONE_OUTPUT_DIR}/share/linphone/rootca.pem" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${EXECUTABLE_NAME}") -endif() install(FILES "${CMAKE_SOURCE_DIR}/Linphone/data/config/linphonerc-factory" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${EXECUTABLE_NAME}") set(LINPHONE_QML_DIR "${CMAKE_SOURCE_DIR}/Linphone/view") diff --git a/external/linphone-sdk b/external/linphone-sdk index bb1a74f94..7fd44ea3c 160000 --- a/external/linphone-sdk +++ b/external/linphone-sdk @@ -1 +1 @@ -Subproject commit bb1a74f94099053363c05d6a1543648f83dd0d9e +Subproject commit 7fd44ea3c8923de57801cd0e6bb0068a0d0439bf