mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 03:18:07 +00:00
- 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.
This commit is contained in:
parent
08f2292881
commit
11487b3aeb
19 changed files with 88 additions and 85 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
.factorize_ubuntu2204: &docker_image_platform_and_runner_tag
|
.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
|
image: gitlab.linphone.org:4567/bc/public/linphone-desktop/bc-dev-ubuntu-22-04-lts:$UBUNTU_2204_IMAGE_VERSION
|
||||||
|
|
||||||
ubuntu2204-ninja-gcc:
|
ubuntu2204-ninja-gcc:
|
||||||
|
|
@ -71,7 +71,7 @@ ubuntu2204-makefile-gcc-signed:
|
||||||
#################################################
|
#################################################
|
||||||
|
|
||||||
ubuntu2204-makefile-gcc-package:
|
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
|
image: gitlab.linphone.org:4567/bc/public/linphone-desktop/bc-dev-ubuntu-22-04-lts:$UBUNTU_2204_IMAGE_VERSION
|
||||||
needs: []
|
needs: []
|
||||||
rules:
|
rules:
|
||||||
|
|
@ -100,7 +100,7 @@ ubuntu2204-makefile-gcc-deploy:
|
||||||
|
|
||||||
ubuntu2204-makefile-gcc-plugins-deploy:
|
ubuntu2204-makefile-gcc-plugins-deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
tags: [ "deploy" ]
|
tags: [ "deploy-flat" ]
|
||||||
needs:
|
needs:
|
||||||
- ubuntu2204-makefile-gcc
|
- ubuntu2204-makefile-gcc
|
||||||
only:
|
only:
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,6 @@
|
||||||
|
|
||||||
.linux-deploy:
|
.linux-deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
tags: [ "deploy" ]
|
tags: [ "deploy-flat" ]
|
||||||
script:
|
script:
|
||||||
- *deploy_linux
|
- *deploy_linux
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
.macosx-desktop:
|
.macosx-desktop:
|
||||||
stage: build
|
stage: build
|
||||||
tags: [ "macos-min-xcode12.2" ]
|
tags: [ "macos-min-xcode12.2-flat" ]
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $DOCKER_UPDATE == null && $SKIP_MACOSX == null
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $DOCKER_UPDATE == null && $SKIP_MACOSX == null
|
||||||
- if: $CI_PIPELINE_SOURCE == "schedule" && $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
|
# WAIT for QT6 for arm64
|
||||||
macosx-ninja-package:
|
macosx-ninja-package:
|
||||||
stage: package
|
stage: package
|
||||||
tags: [ "macos-min-xcode12.2" ]
|
tags: [ "macos-min-xcode12.2-flat" ]
|
||||||
needs: []
|
needs: []
|
||||||
rules:
|
rules:
|
||||||
- !reference [.rules-merge-request-manual, rules]
|
- !reference [.rules-merge-request-manual, rules]
|
||||||
|
|
@ -117,7 +117,7 @@ macosx-ninja-package:
|
||||||
|
|
||||||
macosx-codesigning:
|
macosx-codesigning:
|
||||||
stage: signing
|
stage: signing
|
||||||
tags: [ "macos-min-xcode12.2" ]
|
tags: [ "macos-min-xcode12.2-flat" ]
|
||||||
needs:
|
needs:
|
||||||
- macosx-ninja-package
|
- macosx-ninja-package
|
||||||
rules:
|
rules:
|
||||||
|
|
@ -142,7 +142,7 @@ macosx-codesigning:
|
||||||
|
|
||||||
macosx-deploy:
|
macosx-deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
tags: [ "macos-min-xcode12.2" ]
|
tags: [ "macos-min-xcode12.2-flat" ]
|
||||||
needs:
|
needs:
|
||||||
- macosx-codesigning
|
- macosx-codesigning
|
||||||
only:
|
only:
|
||||||
|
|
@ -160,7 +160,7 @@ macosx-deploy:
|
||||||
|
|
||||||
macosx-makefile-plugins-deploy:
|
macosx-makefile-plugins-deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
tags: [ "macos-min-xcode12.2" ]
|
tags: [ "macos-min-xcode12.2-flat" ]
|
||||||
needs:
|
needs:
|
||||||
- macosx-makefile
|
- macosx-makefile
|
||||||
only:
|
only:
|
||||||
|
|
|
||||||
|
|
@ -92,11 +92,11 @@
|
||||||
|
|
||||||
.windows-vs2022:
|
.windows-vs2022:
|
||||||
extends: .windows-vs
|
extends: .windows-vs
|
||||||
tags: [ "windows-powershell-vs-17-2022" ]
|
tags: [ "windows-powershell-vs-17-2022-flat" ]
|
||||||
|
|
||||||
.windows-codesigning:
|
.windows-codesigning:
|
||||||
extends: .prepare
|
extends: .prepare
|
||||||
tags: [ "windows-powershell-vs-17-2022-apps" ]
|
tags: [ "windows-powershell-vs-17-2022-apps-flat" ]
|
||||||
|
|
||||||
.windows-msbuild-variables:
|
.windows-msbuild-variables:
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -232,7 +232,7 @@ win64-codesigning:
|
||||||
|
|
||||||
.win64-upload:
|
.win64-upload:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
tags: [ "windows-powershell" ]
|
tags: [ "windows-powershell-flat" ]
|
||||||
rules:
|
rules:
|
||||||
- if: $NIGHTLY_MASTER
|
- if: $NIGHTLY_MASTER
|
||||||
- if: $DEPLOY_WINDOWS
|
- if: $DEPLOY_WINDOWS
|
||||||
|
|
@ -250,7 +250,7 @@ win64-ninja-vs2022-upload:
|
||||||
|
|
||||||
.win64-plugins-upload:
|
.win64-plugins-upload:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
tags: [ "windows" ]
|
tags: [ "windows-flat" ]
|
||||||
rules:
|
rules:
|
||||||
- if: $DEPLOY_PLUGINS
|
- if: $DEPLOY_PLUGINS
|
||||||
script:
|
script:
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ variables:
|
||||||
#CMAKE_OPTIONS: -DENABLE_LIME_X3DH=YES
|
#CMAKE_OPTIONS: -DENABLE_LIME_X3DH=YES
|
||||||
|
|
||||||
# Docker image version
|
# 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:
|
workflow:
|
||||||
|
|
|
||||||
|
|
@ -287,6 +287,7 @@ App::App(int &argc, char *argv[])
|
||||||
: SingleApplication(argc, argv, true, Mode::User | Mode::ExcludeAppPath | Mode::ExcludeAppVersion) {
|
: SingleApplication(argc, argv, true, Mode::User | Mode::ExcludeAppPath | Mode::ExcludeAppVersion) {
|
||||||
// Do not use APPLICATION_NAME here.
|
// Do not use APPLICATION_NAME here.
|
||||||
// The EXECUTABLE_NAME will be used in qt standard paths. It's our goal.
|
// 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);
|
QThread::currentThread()->setPriority(QThread::HighPriority);
|
||||||
qDebug() << "app thread is" << QThread::currentThread();
|
qDebug() << "app thread is" << QThread::currentThread();
|
||||||
QCoreApplication::setApplicationName(EXECUTABLE_NAME);
|
QCoreApplication::setApplicationName(EXECUTABLE_NAME);
|
||||||
|
|
@ -305,7 +306,7 @@ App::App(int &argc, char *argv[])
|
||||||
.arg(applicationVersion())
|
.arg(applicationVersion())
|
||||||
.arg(Utils::getOsProduct())
|
.arg(Utils::getOsProduct())
|
||||||
.arg(qVersion());
|
.arg(qVersion());
|
||||||
|
lInfo() << "at " << QDir().absolutePath();
|
||||||
mCurrentDate = QDate::currentDate();
|
mCurrentDate = QDate::currentDate();
|
||||||
mAutoStart = autoStartEnabled();
|
mAutoStart = autoStartEnabled();
|
||||||
mDateUpdateTimer.setInterval(60000);
|
mDateUpdateTimer.setInterval(60000);
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,7 @@ static inline QDir getAppPackageDir() {
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline QString getAppPackageDataDirPath() {
|
static inline QString getAppPackageDataDirPath() {
|
||||||
|
QDir executableDir(QCoreApplication::applicationDirPath());
|
||||||
QDir dir = getAppPackageDir();
|
QDir dir = getAppPackageDir();
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
if (!dir.cd("Resources")) {
|
if (!dir.cd("Resources")) {
|
||||||
|
|
@ -126,17 +127,21 @@ static inline QString getAppPackageDataDirPath() {
|
||||||
dir.mkdir("share");
|
dir.mkdir("share");
|
||||||
dir.cd("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() {
|
static inline QString getAppPackageMsPluginsDirPath() {
|
||||||
|
QDir executableDir(QCoreApplication::applicationDirPath());
|
||||||
QDir dir = getAppPackageDir();
|
QDir dir = getAppPackageDir();
|
||||||
dir.cd(MSPLUGINS_DIR);
|
dir.cd(MSPLUGINS_DIR);
|
||||||
return dir.absolutePath();
|
return executableDir.relativeFilePath(dir.absolutePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline QString getAppPackagePluginsDirPath() {
|
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() {
|
static inline QString getAppAssistantConfigDirPath() {
|
||||||
|
|
@ -159,29 +164,6 @@ static inline QString getAppFriendsFilePath() {
|
||||||
return QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + Constants::PathFriendsList;
|
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() {
|
static inline QString getAppMessageHistoryFilePath() {
|
||||||
return QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + Constants::PathMessageHistoryList;
|
return QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + Constants::PathMessageHistoryList;
|
||||||
}
|
}
|
||||||
|
|
@ -198,7 +180,9 @@ bool Paths::filePathExists(const QString &path, const bool isWritable) {
|
||||||
QFile file(path);
|
QFile file(path);
|
||||||
return file.exists();
|
return file.exists();
|
||||||
}
|
}
|
||||||
|
bool Paths::isSameRelativeFile(const QString &filePath, const QString &relativeFilePath) {
|
||||||
|
return filePath != relativeFilePath && QFileInfo(relativeFilePath) == QFileInfo(filePath);
|
||||||
|
}
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
QString Paths::getAppLocalDirPath() {
|
QString Paths::getAppLocalDirPath() {
|
||||||
|
|
@ -283,15 +267,16 @@ QString Paths::getLogsDirPath() {
|
||||||
Constants::PathLogs);
|
Constants::PathLogs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString Paths::getAppRootCaFilePath() {
|
||||||
|
// Hardcoded because it comes from linphone and is not customizable.
|
||||||
|
return getReadableFilePath(getAppPackageDataDirPath() + "/linphone/rootca.pem");
|
||||||
|
}
|
||||||
|
|
||||||
QString Paths::getMessageHistoryFilePath() {
|
QString Paths::getMessageHistoryFilePath() {
|
||||||
return getReadableFilePath(
|
return getReadableFilePath(
|
||||||
getAppMessageHistoryFilePath()); // No need to ensure that the file exists as this DB is deprecated
|
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() {
|
QString Paths::getPackageMsPluginsDirPath() {
|
||||||
return getReadableDirPath(getAppPackageMsPluginsDirPath());
|
return getReadableDirPath(getAppPackageMsPluginsDirPath());
|
||||||
}
|
}
|
||||||
|
|
@ -300,10 +285,6 @@ QString Paths::getPackagePluginsAppDirPath() {
|
||||||
return getReadableDirPath(getAppPackagePluginsDirPath() + Constants::PathPluginsApp);
|
return getReadableDirPath(getAppPackagePluginsDirPath() + Constants::PathPluginsApp);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Paths::getPackageSoundsResourcesDirPath() {
|
|
||||||
return getReadableDirPath(getAppPackageDataDirPath() + Constants::PathSounds);
|
|
||||||
}
|
|
||||||
|
|
||||||
QString Paths::getPackageTopDirPath() {
|
QString Paths::getPackageTopDirPath() {
|
||||||
return getReadableDirPath(getAppPackageDataDirPath());
|
return getReadableDirPath(getAppPackageDataDirPath());
|
||||||
}
|
}
|
||||||
|
|
@ -319,10 +300,6 @@ QStringList Paths::getPluginsAppFolders() {
|
||||||
return pluginPaths;
|
return pluginPaths;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Paths::getRootCaFilePath() {
|
|
||||||
return getReadableFilePath(getAppRootCaFilePath());
|
|
||||||
}
|
|
||||||
|
|
||||||
QString Paths::getToolsDirPath() {
|
QString Paths::getToolsDirPath() {
|
||||||
return getWritableDirPath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) +
|
return getWritableDirPath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) +
|
||||||
Constants::PathTools);
|
Constants::PathTools);
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,13 @@
|
||||||
|
|
||||||
namespace Paths {
|
namespace Paths {
|
||||||
bool filePathExists(const QString &path, const bool isWritable = false);
|
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 getAppLocalDirPath();
|
||||||
|
QString getAppRootCaFilePath();
|
||||||
QString getAssistantConfigDirPath();
|
QString getAssistantConfigDirPath();
|
||||||
QString getAvatarsDirPath();
|
QString getAvatarsDirPath();
|
||||||
QString getVCardsPath();
|
QString getVCardsPath();
|
||||||
|
|
@ -44,14 +49,11 @@ QString getFriendsListFilePath();
|
||||||
QString getLimeDatabasePath();
|
QString getLimeDatabasePath();
|
||||||
QString getLogsDirPath();
|
QString getLogsDirPath();
|
||||||
QString getMessageHistoryFilePath();
|
QString getMessageHistoryFilePath();
|
||||||
QString getPackageDataDirPath();
|
|
||||||
QString getPackageMsPluginsDirPath();
|
QString getPackageMsPluginsDirPath();
|
||||||
QString getPackagePluginsAppDirPath();
|
QString getPackagePluginsAppDirPath();
|
||||||
QString getPackageSoundsResourcesDirPath();
|
|
||||||
QString getPackageTopDirPath();
|
QString getPackageTopDirPath();
|
||||||
QString getPluginsAppDirPath();
|
QString getPluginsAppDirPath();
|
||||||
QStringList getPluginsAppFolders();
|
QStringList getPluginsAppFolders();
|
||||||
QString getRootCaFilePath();
|
|
||||||
QString getToolsDirPath();
|
QString getToolsDirPath();
|
||||||
QString getUserCertificatesDirPath();
|
QString getUserCertificatesDirPath();
|
||||||
QString getZrtpDataFilePath();
|
QString getZrtpDataFilePath();
|
||||||
|
|
|
||||||
|
|
@ -37,13 +37,21 @@ LimitProxy::~LimitProxy() {
|
||||||
bool LimitProxy::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const {
|
bool LimitProxy::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const {
|
||||||
return mMaxDisplayItems == -1 || sourceRow < mMaxDisplayItems;
|
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) {
|
void LimitProxy::setSourceModels(SortFilterProxy *firstList) {
|
||||||
auto secondList = firstList->sourceModel();
|
auto secondList = firstList->sourceModel();
|
||||||
if (secondList) {
|
if (secondList) {
|
||||||
connect(secondList, &QAbstractItemModel::rowsInserted, this, &LimitProxy::onAdded);
|
connect(secondList, &QAbstractItemModel::rowsInserted, this, &LimitProxy::onAdded);
|
||||||
connect(secondList, &QAbstractItemModel::rowsRemoved, this, &LimitProxy::onRemoved);
|
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::filterTextChanged, this, &LimitProxy::filterTextChanged);
|
||||||
connect(firstList, &SortFilterProxy::filterTypeChanged, this, &LimitProxy::filterTypeChanged);
|
connect(firstList, &SortFilterProxy::filterTypeChanged, this, &LimitProxy::filterTypeChanged);
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ public:
|
||||||
LimitProxy(QObject *parent = nullptr);
|
LimitProxy(QObject *parent = nullptr);
|
||||||
virtual ~LimitProxy();
|
virtual ~LimitProxy();
|
||||||
virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
|
virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
|
||||||
|
virtual void invalidateFilter();
|
||||||
// Helper for setting the limit with sorted/filtered list
|
// Helper for setting the limit with sorted/filtered list
|
||||||
void setSourceModels(SortFilterProxy *firstList);
|
void setSourceModels(SortFilterProxy *firstList);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,8 +75,14 @@ QString SortFilterProxy::getFilterText() const {
|
||||||
|
|
||||||
void SortFilterProxy::setFilterText(const QString &filter) {
|
void SortFilterProxy::setFilterText(const QString &filter) {
|
||||||
if (mFilterText != filter) {
|
if (mFilterText != filter) {
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 10, 0)
|
||||||
mFilterText = filter;
|
mFilterText = filter;
|
||||||
invalidateFilter();
|
QSortFilterProxyModel::invalidateFilter();
|
||||||
|
#else
|
||||||
|
QSortFilterProxyModel::beginFilterChange();
|
||||||
|
mFilterText = filter;
|
||||||
|
QSortFilterProxyModel::endFilterChange();
|
||||||
|
#endif
|
||||||
emit filterTextChanged();
|
emit filterTextChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -90,5 +96,11 @@ void SortFilterProxy::remove(int index, int count) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SortFilterProxy::invalidateFilter() {
|
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();
|
QSortFilterProxyModel::invalidateFilter();
|
||||||
|
#else
|
||||||
|
QSortFilterProxyModel::beginFilterChange();
|
||||||
|
QSortFilterProxyModel::endFilterChange();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,17 +28,16 @@ LdapModel::LdapModel(const std::shared_ptr<linphone::RemoteContactDirectory> &ld
|
||||||
mustBeInLinphoneThread(getClassName());
|
mustBeInLinphoneThread(getClassName());
|
||||||
if (ldap) {
|
if (ldap) {
|
||||||
mLdap = ldap;
|
mLdap = ldap;
|
||||||
mLdapParamsClone = mLdap->getLdapParams();
|
mLdapParamsClone = mLdap->getLdapRemoteContactDirectory();
|
||||||
} else {
|
} else {
|
||||||
mLdapParamsClone = CoreModel::getInstance()->getCore()->createLdapParams();
|
mLdapParamsClone = CoreModel::getInstance()->getCore()->createLdapParams();
|
||||||
mLdapParamsClone->setDelay(2000);
|
|
||||||
mLdapParamsClone->enableTls(true);
|
mLdapParamsClone->enableTls(true);
|
||||||
mLdapParamsClone->setEnabled(true);
|
|
||||||
|
|
||||||
mLdap = CoreModel::getInstance()->getCore()->createLdapRemoteContactDirectory(mLdapParamsClone);
|
mLdap = CoreModel::getInstance()->getCore()->createLdapRemoteContactDirectory(mLdapParamsClone);
|
||||||
|
mLdap->setDelay(2000);
|
||||||
mLdap->setTimeout(5);
|
mLdap->setTimeout(5);
|
||||||
mLdap->setLimit(50);
|
mLdap->setLimit(50);
|
||||||
mLdap->setMinCharacters(0); // Needs to be 0 if Contacts list should be synchronized with LDAP AB
|
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);
|
mLdap->setMinCharacters(oldMinChars);
|
||||||
core->addRemoteContactDirectory(mLdap);
|
core->addRemoteContactDirectory(mLdap);
|
||||||
lDebug() << log().arg("LDAP Server saved");
|
lDebug() << log().arg("LDAP Server saved");
|
||||||
mLdapParamsClone = mLdap->getLdapParams();
|
mLdapParamsClone = mLdap->getLdapRemoteContactDirectory();
|
||||||
// Clean cache to take account new searches
|
// Clean cache to take account new searches
|
||||||
auto ldapFriendList = core->getFriendListByName("ldap_friends");
|
auto ldapFriendList = core->getFriendListByName("ldap_friends");
|
||||||
if (ldapFriendList) core->removeFriendList(ldapFriendList);
|
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, serverUrl, ServerUrl, mLdap)
|
||||||
DEFINE_GETSET_MODEL_STRING(LdapModel, bindDn, BindDn, mLdapParamsClone)
|
DEFINE_GETSET_MODEL_STRING(LdapModel, bindDn, BindDn, mLdapParamsClone)
|
||||||
DEFINE_GETSET_MODEL_STRING(LdapModel, password, Password, 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_MODEL_STRING(LdapModel, filter, Filter, mLdapParamsClone)
|
||||||
DEFINE_GETSET(LdapModel, int, limit, Limit, mLdap)
|
DEFINE_GETSET(LdapModel, int, limit, Limit, mLdap)
|
||||||
DEFINE_GETSET(LdapModel, int, timeout, Timeout, 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(LdapModel, int, minCharacters, MinCharacters, mLdap)
|
||||||
DEFINE_GETSET_MODEL_STRING(LdapModel, nameAttribute, NameAttribute, mLdapParamsClone)
|
DEFINE_GETSET_MODEL_STRING(LdapModel, nameAttribute, NameAttribute, mLdapParamsClone)
|
||||||
DEFINE_GETSET_MODEL_STRING(LdapModel, sipAttribute, SipAttribute, mLdapParamsClone)
|
DEFINE_GETSET_MODEL_STRING(LdapModel, sipAttribute, SipAttribute, mLdapParamsClone)
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ ChatModel::searchMessageByText(QString text, std::shared_ptr<const linphone::Eve
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatModel::compose() {
|
void ChatModel::compose() {
|
||||||
mMonitor->compose();
|
mMonitor->composeTextMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
linphone::ChatRoom::State ChatModel::getState() const {
|
linphone::ChatRoom::State ChatModel::getState() const {
|
||||||
|
|
|
||||||
|
|
@ -171,8 +171,6 @@ void CoreModel::setPathBeforeCreation() {
|
||||||
std::shared_ptr<linphone::Factory> factory = linphone::Factory::get();
|
std::shared_ptr<linphone::Factory> factory = linphone::Factory::get();
|
||||||
SET_FACTORY_PATH(Msplugins, Paths::getPackageMsPluginsDirPath());
|
SET_FACTORY_PATH(Msplugins, Paths::getPackageMsPluginsDirPath());
|
||||||
SET_FACTORY_PATH(TopResources, Paths::getPackageTopDirPath());
|
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(Data, Paths::getAppLocalDirPath());
|
||||||
SET_FACTORY_PATH(Download, Paths::getDownloadDirPath());
|
SET_FACTORY_PATH(Download, Paths::getDownloadDirPath());
|
||||||
SET_FACTORY_PATH(Config, Paths::getConfigDirPath(true));
|
SET_FACTORY_PATH(Config, Paths::getConfigDirPath(true));
|
||||||
|
|
@ -199,8 +197,13 @@ void CoreModel::setPathAfterStart() {
|
||||||
mCore->setUserCertificatesPath(Utils::appStringToCoreString(Paths::getUserCertificatesDirPath()));
|
mCore->setUserCertificatesPath(Utils::appStringToCoreString(Paths::getUserCertificatesDirPath()));
|
||||||
lInfo() << "[CoreModel] Using UserCertificate path : " << QString::fromStdString(mCore->getUserCertificatesPath());
|
lInfo() << "[CoreModel] Using UserCertificate path : " << QString::fromStdString(mCore->getUserCertificatesPath());
|
||||||
// Use application path if Linphone default is not available
|
// Use application path if Linphone default is not available
|
||||||
if (mCore->getRootCa().empty() || !Paths::filePathExists(Utils::coreStringToAppString(mCore->getRootCa())))
|
QString rootCaPath = Utils::coreStringToAppString(mCore->getRootCa());
|
||||||
mCore->setRootCa(Utils::appStringToCoreString(Paths::getRootCaFilePath()));
|
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());
|
lInfo() << "[CoreModel] Using RootCa path : " << QString::fromStdString(mCore->getRootCa());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -395,14 +395,22 @@ void SettingsModel::setPlaybackDevice(const QVariantMap &device) {
|
||||||
|
|
||||||
QVariantMap SettingsModel::getRingerDevice() const {
|
QVariantMap SettingsModel::getRingerDevice() const {
|
||||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||||
auto id = Utils::coreStringToAppString(CoreModel::getInstance()->getCore()->getRingerDevice());
|
for (const auto &device : CoreModel::getInstance()->getCore()->getExtendedAudioDevices()) {
|
||||||
auto audioDevice = ToolModel::findAudioDevice(id, linphone::AudioDevice::Capabilities::CapabilityPlay);
|
if (device->getUseForRinging())
|
||||||
return ToolModel::createVariant(audioDevice);
|
return ToolModel::createVariant(device);
|
||||||
|
}
|
||||||
|
return ToolModel::createVariant(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsModel::setRingerDevice(QVariantMap device) {
|
void SettingsModel::setRingerDevice(QVariantMap device) {
|
||||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
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);
|
emit ringerDeviceChanged(device);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,6 @@ constexpr char Constants::PathAssistantConfig[];
|
||||||
constexpr char Constants::PathAvatars[];
|
constexpr char Constants::PathAvatars[];
|
||||||
constexpr char Constants::PathCaptures[];
|
constexpr char Constants::PathCaptures[];
|
||||||
constexpr char Constants::PathCodecs[];
|
constexpr char Constants::PathCodecs[];
|
||||||
constexpr char Constants::PathData[];
|
|
||||||
constexpr char Constants::PathTools[];
|
constexpr char Constants::PathTools[];
|
||||||
constexpr char Constants::PathLogs[];
|
constexpr char Constants::PathLogs[];
|
||||||
#ifdef APPLE
|
#ifdef APPLE
|
||||||
|
|
@ -66,7 +65,6 @@ constexpr char Constants::PathPlugins[];
|
||||||
constexpr char Constants::PathPlugins[];
|
constexpr char Constants::PathPlugins[];
|
||||||
#endif
|
#endif
|
||||||
constexpr char Constants::PathPluginsApp[];
|
constexpr char Constants::PathPluginsApp[];
|
||||||
constexpr char Constants::PathSounds[];
|
|
||||||
constexpr char Constants::PathUserCertificates[];
|
constexpr char Constants::PathUserCertificates[];
|
||||||
|
|
||||||
constexpr char Constants::PathCallHistoryList[];
|
constexpr char Constants::PathCallHistoryList[];
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,6 @@ public:
|
||||||
static constexpr char PathFiles[] = "/files/";
|
static constexpr char PathFiles[] = "/files/";
|
||||||
static constexpr char PathCaptures[] = "/" EXECUTABLE_NAME "/captures/";
|
static constexpr char PathCaptures[] = "/" EXECUTABLE_NAME "/captures/";
|
||||||
static constexpr char PathCodecs[] = "/codecs/";
|
static constexpr char PathCodecs[] = "/codecs/";
|
||||||
static constexpr char PathData[] = "/" EXECUTABLE_NAME;
|
|
||||||
static constexpr char PathTools[] = "/tools/";
|
static constexpr char PathTools[] = "/tools/";
|
||||||
static constexpr char PathLogs[] = "/logs/";
|
static constexpr char PathLogs[] = "/logs/";
|
||||||
static constexpr char PathVCards[] = "/vcards/";
|
static constexpr char PathVCards[] = "/vcards/";
|
||||||
|
|
@ -152,7 +151,6 @@ public:
|
||||||
static constexpr char PathPlugins[] = "/plugins/";
|
static constexpr char PathPlugins[] = "/plugins/";
|
||||||
#endif
|
#endif
|
||||||
static constexpr char PathPluginsApp[] = "app/";
|
static constexpr char PathPluginsApp[] = "app/";
|
||||||
static constexpr char PathSounds[] = "/sounds/linphone";
|
|
||||||
static constexpr char PathUserCertificates[] = "/usr-crt/";
|
static constexpr char PathUserCertificates[] = "/usr-crt/";
|
||||||
|
|
||||||
static constexpr char PathCallHistoryList[] = "/call-history.db";
|
static constexpr char PathCallHistoryList[] = "/call-history.db";
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,6 @@ install(TARGETS ${TARGET_NAME}
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
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}")
|
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")
|
set(LINPHONE_QML_DIR "${CMAKE_SOURCE_DIR}/Linphone/view")
|
||||||
|
|
|
||||||
2
external/linphone-sdk
vendored
2
external/linphone-sdk
vendored
|
|
@ -1 +1 @@
|
||||||
Subproject commit bb1a74f94099053363c05d6a1543648f83dd0d9e
|
Subproject commit 7fd44ea3c8923de57801cd0e6bb0068a0d0439bf
|
||||||
Loading…
Add table
Reference in a new issue