From d0cf951fe45bb0c527078dbeb4e1ced5f2482dd8 Mon Sep 17 00:00:00 2001 From: gaelle Date: Wed, 19 Nov 2025 14:35:00 +0100 Subject: [PATCH] fix thumbnail download paths leading to wrong thumbnail path and thumbnail not displayed in message when multiple files sent remove qt5compat dependency README --- Linphone/core/setting/SettingsCore.cpp | 3 ++- .../model/chat/message/content/ChatMessageContentModel.cpp | 4 ++-- Linphone/view/Control/Display/Chat/FileView.qml | 2 +- README.md | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Linphone/core/setting/SettingsCore.cpp b/Linphone/core/setting/SettingsCore.cpp index 8a489118a..1044387d2 100644 --- a/Linphone/core/setting/SettingsCore.cpp +++ b/Linphone/core/setting/SettingsCore.cpp @@ -1038,7 +1038,8 @@ QString SettingsCore::getConfigLocale() const { QString SettingsCore::getDownloadFolder() const { auto path = mDownloadFolder; if (mDownloadFolder.isEmpty()) path = Paths::getDownloadDirPath(); - return QDir::cleanPath(path) + QDir::separator(); + QString cleanPath = QDir::cleanPath(path); + return cleanPath; } void SettingsCore::writeIntoModel(std::shared_ptr model) const { diff --git a/Linphone/model/chat/message/content/ChatMessageContentModel.cpp b/Linphone/model/chat/message/content/ChatMessageContentModel.cpp index 181049d04..2345c56fd 100644 --- a/Linphone/model/chat/message/content/ChatMessageContentModel.cpp +++ b/Linphone/model/chat/message/content/ChatMessageContentModel.cpp @@ -121,10 +121,10 @@ bool ChatMessageContentModel::downloadFile(const QString &name, QString *error) } else { lDebug() << log().arg("download file : %1").arg(name); auto downloaded = mChatMessageModel->getMonitor()->downloadContent(mContent); - if (!downloaded && error) { + if (!downloaded) { lWarning() << QStringLiteral("Unable to download file of entry %1.").arg(name); //: Unable to download file of entry %1 - *error = tr("download_file_error_unable_to_download").arg(name); + if (error) *error = tr("download_file_error_unable_to_download").arg(name); } return downloaded; } diff --git a/Linphone/view/Control/Display/Chat/FileView.qml b/Linphone/view/Control/Display/Chat/FileView.qml index fa9b7f399..9cd3e7860 100644 --- a/Linphone/view/Control/Display/Chat/FileView.qml +++ b/Linphone/view/Control/Display/Chat/FileView.qml @@ -14,7 +14,7 @@ import 'qrc:/qt/qml/Linphone/view/Control/Tool/Helper/utils.js' as Utils Item { id: mainItem property ChatMessageContentGui contentGui - property string thumbnail: contentGui && contentGui.core.thumbnail + property string thumbnail: contentGui && contentGui.core.thumbnail || "" property string name: contentGui && contentGui.core.name property string filePath: contentGui && contentGui.core.filePath property bool wasDownloaded: contentGui && contentGui.core.wasDownloaded diff --git a/README.md b/README.md index f722b117a..9e6de4739 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ For Desktop : you will need QT6 (_6.10.0 or newer_). `C++17` support is required - Using the [official QT installer](https://www.qt.io/download-thank-you) - Using an alternative installer like [aqtinstall](https://github.com/miurahr/aqtinstall) -The following QT optional modules are required: qt5compat, qtmultimedia qtnetworkauth qtshadertools . +The following QT optional modules are required: qtmultimedia qtnetworkauth qtshadertools . ### Set your environment