From 73014a33fef61ee57cea67be37b8a60c6f3d82f1 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Wed, 8 Oct 2025 03:16:12 +0000 Subject: [PATCH] Fix build with Qt 6.10 --- Telegram/SourceFiles/data/data_document.cpp | 7 ++++--- Telegram/build/prepare/prepare.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/data/data_document.cpp b/Telegram/SourceFiles/data/data_document.cpp index 937ebd892f..5584fd66d7 100644 --- a/Telegram/SourceFiles/data/data_document.cpp +++ b/Telegram/SourceFiles/data/data_document.cpp @@ -1117,9 +1117,10 @@ void DocumentData::save( if (!toFile.isEmpty()) { if (!media->bytes().isEmpty()) { QFile f(toFile); - f.open(QIODevice::WriteOnly); - f.write(media->bytes()); - f.close(); + if (f.open(QIODevice::WriteOnly)) { + f.write(media->bytes()); + f.close(); + } setLocation(Core::FileLocation(toFile)); session().local().writeFileLocation( diff --git a/Telegram/build/prepare/prepare.py b/Telegram/build/prepare/prepare.py index a2edd0c128..4ac043dbdc 100644 --- a/Telegram/build/prepare/prepare.py +++ b/Telegram/build/prepare/prepare.py @@ -1654,7 +1654,7 @@ mac: make install """) else: # qt > '6' - branch = 'v$QT' + ('-lts-lgpl' if qt < '6.3' else '') + branch = 'v$QT' + ('-lts-lgpl' if qt.startswith('6.2.') else '') stage('qt_' + qt, """ git clone -b """ + branch + """ https://github.com/qt/qt5.git qt_$QT cd qt_$QT