Date: Sunday, September 30, 2018 @ 09:39:23 Author: svenstaro Revision: 388448
upgpkg: telegram-desktop 1.4.0-1 Modified: telegram-desktop/trunk/CMakeLists.inj telegram-desktop/trunk/PKGBUILD telegram-desktop/trunk/tdesktop.patch Deleted: telegram-desktop/trunk/401e1166f9de4c4a19aba79f9afcd611eaa6e30d.patch telegram-desktop/trunk/46946c73236285649950071632beb3f3e855b2ea.patch ------------------------------------------------+ 401e1166f9de4c4a19aba79f9afcd611eaa6e30d.patch | 27 - 46946c73236285649950071632beb3f3e855b2ea.patch | 27 - CMakeLists.inj | 2 PKGBUILD | 20 - tdesktop.patch | 410 ++++++++++++++++++++--- 5 files changed, 374 insertions(+), 112 deletions(-) Deleted: 401e1166f9de4c4a19aba79f9afcd611eaa6e30d.patch =================================================================== --- 401e1166f9de4c4a19aba79f9afcd611eaa6e30d.patch 2018-09-30 09:25:19 UTC (rev 388447) +++ 401e1166f9de4c4a19aba79f9afcd611eaa6e30d.patch 2018-09-30 09:39:23 UTC (rev 388448) @@ -1,27 +0,0 @@ -From 401e1166f9de4c4a19aba79f9afcd611eaa6e30d Mon Sep 17 00:00:00 2001 -From: Nicholas Guriev <guriev...@ya.ru> -Date: Fri, 31 Aug 2018 00:28:27 +0300 -Subject: [PATCH] Workaround internal compiler error in GCC - -Closes: #5111 ---- - Telegram/SourceFiles/apiwrap.cpp | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/Telegram/SourceFiles/apiwrap.cpp b/Telegram/SourceFiles/apiwrap.cpp -index 3301b6f04..c3e3c6f16 100644 ---- a/Telegram/SourceFiles/apiwrap.cpp -+++ b/Telegram/SourceFiles/apiwrap.cpp -@@ -2390,7 +2390,11 @@ void ApiWrap::requestFileReference( - - request(std::move(data)).done([=](const auto &result) { - const auto parsed = Data::GetFileReferences(result); -- for (const auto &[origin, reference] : parsed) { -+ for (const auto &p : parsed) { -+ // Unpack here the parsed pair by hand to workaround a GCC bug. -+ // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87122 -+ const auto &origin = p.first; -+ const auto &reference = p.second; - const auto documentId = base::get_if<DocumentFileLocationId>( - &origin); - if (documentId) { Deleted: 46946c73236285649950071632beb3f3e855b2ea.patch =================================================================== --- 46946c73236285649950071632beb3f3e855b2ea.patch 2018-09-30 09:25:19 UTC (rev 388447) +++ 46946c73236285649950071632beb3f3e855b2ea.patch 2018-09-30 09:39:23 UTC (rev 388448) @@ -1,27 +0,0 @@ -From 46946c73236285649950071632beb3f3e855b2ea Mon Sep 17 00:00:00 2001 -From: John Preston <johnprestonm...@gmail.com> -Date: Mon, 27 Aug 2018 14:34:18 +0300 -Subject: [PATCH] Use correct SHA1_ functions. - -Fixes #5103. ---- - Telegram/SourceFiles/base/openssl_help.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/Telegram/SourceFiles/base/openssl_help.h b/Telegram/SourceFiles/base/openssl_help.h -index 0ad4916be..9d776b3da 100644 ---- a/Telegram/SourceFiles/base/openssl_help.h -+++ b/Telegram/SourceFiles/base/openssl_help.h -@@ -388,9 +388,9 @@ template < - inline bytes::vector Sha1(Args &&...args) { - return details::Sha<kSha1Size>( - SHA_CTX(), -- SHA_Init, -- SHA_Update, -- SHA_Final, -+ SHA1_Init, -+ SHA1_Update, -+ SHA1_Final, - args...); - } - Modified: CMakeLists.inj =================================================================== --- CMakeLists.inj 2018-09-30 09:25:19 UTC (rev 388447) +++ CMakeLists.inj 2018-09-30 09:39:23 UTC (rev 388448) @@ -1,5 +1,5 @@ # ------------- debian/CMakeLists.inj begin ------------- -# The text will be putted into the appropriate CMakeLists by debian/rules script +# The text will be put into the appropriate CMakeLists by the PKGBUILD # Avoid rpath compiler parameter set_target_properties(Telegram PROPERTIES SKIP_BUILD_RPATH TRUE) Modified: PKGBUILD =================================================================== --- PKGBUILD 2018-09-30 09:25:19 UTC (rev 388447) +++ PKGBUILD 2018-09-30 09:39:23 UTC (rev 388448) @@ -5,7 +5,7 @@ # https://github.com/mymedia2/tdesktop pkgname=telegram-desktop -pkgver=1.3.14 +pkgver=1.4.0 pkgrel=1 pkgdesc='Official Telegram Desktop client' arch=('x86_64') @@ -18,15 +18,15 @@ "tdesktop::git+https://github.com/telegramdesktop/tdesktop.git#tag=v$pkgver" "libtgvoip::git+https://github.com/telegramdesktop/libtgvoip" "variant::git+https://github.com/mapbox/variant" + "Catch::git+https://github.com/philsquared/Catch" "GSL::git+https://github.com/Microsoft/GSL.git" - "Catch::git+https://github.com/philsquared/Catch" "crl::git+https://github.com/telegramdesktop/crl.git" + "xxHash::git+https://github.com/Cyan4973/xxHash.git" "tg.protocol" "CMakeLists.inj" "tdesktop.patch" "no-gtk2.patch" "libtgvoip.patch" - "401e1166f9de4c4a19aba79f9afcd611eaa6e30d.patch" ) sha512sums=('SKIP' 'SKIP' @@ -34,26 +34,26 @@ 'SKIP' 'SKIP' 'SKIP' + 'SKIP' 'b87414ceaae19185a8a5749cea1f6d9f3fc3c69b8dd729e3db8790cde00b987c3c827cd30baf0eac579d1884e34aa2f37bb90778c3c0bc9ca211d75a82891b9d' - '2647251940f0d3a2d41ca8a32a592f1ab1e23fe02d3b11d8dc3a54ef34df7c290c9cbf3df76b09970e1cba15c149bc38d49fc824a173d4b21c54edb3c5d5a3da' - '00b4307143cf599859d9b9b6d7ac4acbe8b407da55a1e3833921e113dc3aed8c61f2e5f2c1c37e81a261ba4b9e6f40d9bf5f8c90c20dcf0820cfb73852cb091d' + '0a2de8fc761e1222f622235c4023f5092179986750f3de53039eca9f4ea43a789f0cf408f2958d5e0dae70b85796d79de018901376344a22f2dcf915f06b6fb9' + 'cd4c6c931d55e5d414e46ea1d9dd4fbcba152d7ac57247162cf33cb74d69f48bed43d735eb6a188cb33eaab0232daea0ec4ae017e18bb05f5a1a1acc83446f91' '7a37e0ca582145a56a411585aec0bc94889dc18a80cc038d2efa237e19eebf8b67d56825e068be88f7566b08316ce068d7f20c25729caa33d0e9d6c370325025' - 'd60694dc701aa985b0e82a12c9732b945082470441c687b33167a94f94efcf253baf43bb7280ec160ba338485ee5c62de138e4804cae05f27cc5cf4298166d39' - 'cb5a414c58614f39dbd45d7260a06abe921165f8426f3e6327bc24e7e7ad291db484fee38975b11f8eff39c3e78d5312e6548b9110dd621f13013c6084be3c1e') + 'd60694dc701aa985b0e82a12c9732b945082470441c687b33167a94f94efcf253baf43bb7280ec160ba338485ee5c62de138e4804cae05f27cc5cf4298166d39') prepare() { cd "$srcdir/tdesktop" git submodule init + git config submodule.Telegram/ThirdParty/libtgvoip.url "$srcdir/libtgvoip" + git config submodule.Telegram/ThirdParty/variant.url "$srcdir/variant" git config submodule.Telegram/ThirdParty/GSL.url "$srcdir/GSL" - git config submodule.Telegram/ThirdParty/variant.url "$srcdir/variant" - git config submodule.Telegram/ThirdParty/libtgvoip.url "$srcdir/libtgvoip" git config submodule.Telegram/ThirdParty/Catch.url "$srcdir/Catch" git config submodule.Telegram/ThirdParty/crl.url "$srcdir/crl" + git config submodule.Telegram/ThirdParty/xxHash.url "$srcdir/xxHash" git submodule update patch -Np1 -i "$srcdir/tdesktop.patch" patch -Np1 -i "$srcdir/no-gtk2.patch" - patch -Np1 -i "$srcdir/401e1166f9de4c4a19aba79f9afcd611eaa6e30d.patch" cd "Telegram/ThirdParty/libtgvoip" patch -Np1 -i "$srcdir/libtgvoip.patch" Modified: tdesktop.patch =================================================================== --- tdesktop.patch 2018-09-30 09:25:19 UTC (rev 388447) +++ tdesktop.patch 2018-09-30 09:39:23 UTC (rev 388448) @@ -1,5 +1,5 @@ diff --git a/Telegram/Resources/qrc/telegram_linux.qrc b/Telegram/Resources/qrc/telegram_linux.qrc -index 0554fa17..3ea02740 100644 +index 0554fa179..3ea027406 100644 --- a/Telegram/Resources/qrc/telegram_linux.qrc +++ b/Telegram/Resources/qrc/telegram_linux.qrc @@ -1,5 +1,4 @@ @@ -8,11 +8,192 @@ - <file alias="etc/qt.conf">../etc/qt_linux.conf</file> </qresource> </RCC> +diff --git a/Telegram/SourceFiles/app.h b/Telegram/SourceFiles/app.h +index d9a5517bf..050af045e 100644 +--- a/Telegram/SourceFiles/app.h ++++ b/Telegram/SourceFiles/app.h +@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + */ + #pragma once + ++#include "base/assertion.h" + #include "data/data_types.h" + #include "data/data_peer.h" + +diff --git a/Telegram/SourceFiles/base/algorithm.h b/Telegram/SourceFiles/base/algorithm.h +index 0369859db..0d389d2fa 100644 +--- a/Telegram/SourceFiles/base/algorithm.h ++++ b/Telegram/SourceFiles/base/algorithm.h +@@ -7,6 +7,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + */ + #pragma once + ++#include <utility> ++#include <cstddef> ++#include <QLatin1String> ++ + namespace base { + + template <typename Type> +diff --git a/Telegram/SourceFiles/base/concurrent_timer.cpp b/Telegram/SourceFiles/base/concurrent_timer.cpp +index 4f9fb82f8..126dcc000 100644 +--- a/Telegram/SourceFiles/base/concurrent_timer.cpp ++++ b/Telegram/SourceFiles/base/concurrent_timer.cpp +@@ -9,6 +9,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + + #include <QtCore/QThread> + #include <QtCore/QCoreApplication> ++#include <QtCore/QMutex> ++#include <QtCore/QMutexLocker> + + using namespace base::details; + +diff --git a/Telegram/SourceFiles/base/concurrent_timer.h b/Telegram/SourceFiles/base/concurrent_timer.h +index b279b1d1e..dd8f560e7 100644 +--- a/Telegram/SourceFiles/base/concurrent_timer.h ++++ b/Telegram/SourceFiles/base/concurrent_timer.h +@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + #pragma once + + #include "base/binary_guard.h" ++#include "base/basic_types.h" + #include <crl/crl_time.h> + #include <crl/crl_object_on_queue.h> + #include <QtCore/QThread> +diff --git a/Telegram/SourceFiles/base/observer.cpp b/Telegram/SourceFiles/base/observer.cpp +index 1c1245071..1507633ac 100644 +--- a/Telegram/SourceFiles/base/observer.cpp ++++ b/Telegram/SourceFiles/base/observer.cpp +@@ -6,6 +6,7 @@ For license and copyright information please follow this link: + https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + */ + #include "base/observer.h" ++#include "base/ordered_set.h" + + namespace base { + namespace internal { +diff --git a/Telegram/SourceFiles/base/observer.h b/Telegram/SourceFiles/base/observer.h +index 75bc0e722..61a266263 100644 +--- a/Telegram/SourceFiles/base/observer.h ++++ b/Telegram/SourceFiles/base/observer.h +@@ -10,6 +10,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + #include <vector> + #include <deque> + #include <rpl/producer.h> ++#include "base/assertion.h" ++#include "base/algorithm.h" ++#include "base/basic_types.h" + #include "base/type_traits.h" + + namespace base { +diff --git a/Telegram/SourceFiles/base/openssl_help.h b/Telegram/SourceFiles/base/openssl_help.h +index 2af1ba65c..c917e9c08 100644 +--- a/Telegram/SourceFiles/base/openssl_help.h ++++ b/Telegram/SourceFiles/base/openssl_help.h +@@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + + #include "base/bytes.h" + #include "base/algorithm.h" ++#include "base/assertion.h" + #include "base/basic_types.h" + + extern "C" { +diff --git a/Telegram/SourceFiles/base/parse_helper.h b/Telegram/SourceFiles/base/parse_helper.h +index ce96690b0..e3751c737 100644 +--- a/Telegram/SourceFiles/base/parse_helper.h ++++ b/Telegram/SourceFiles/base/parse_helper.h +@@ -7,6 +7,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + */ + #pragma once + ++#include "base/assertion.h" ++#include <QByteArray> ++#include <QLatin1String> ++ + namespace base { + namespace parse { + +diff --git a/Telegram/SourceFiles/base/qthelp_url.cpp b/Telegram/SourceFiles/base/qthelp_url.cpp +index 0cdc486f8..20d64f6d6 100644 +--- a/Telegram/SourceFiles/base/qthelp_url.cpp ++++ b/Telegram/SourceFiles/base/qthelp_url.cpp +@@ -5,7 +5,11 @@ the official desktop application for the Telegram messaging service. + For license and copyright information please follow this link: + https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + */ ++#include "base/assertion.h" ++#include "base/algorithm.h" + #include "base/qthelp_url.h" ++#include <QString> ++#include <QLatin1String> + + namespace qthelp { + namespace { +diff --git a/Telegram/SourceFiles/base/qthelp_url.h b/Telegram/SourceFiles/base/qthelp_url.h +index c0e10bc6d..5efda73cc 100644 +--- a/Telegram/SourceFiles/base/qthelp_url.h ++++ b/Telegram/SourceFiles/base/qthelp_url.h +@@ -7,6 +7,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + */ + #pragma once + ++#include <QRegularExpression> ++#include <QString> ++#include <QMap> ++#include <QUrl> ++ + namespace qthelp { + + const QRegularExpression &RegExpDomain(); +diff --git a/Telegram/SourceFiles/base/runtime_composer.cpp b/Telegram/SourceFiles/base/runtime_composer.cpp +index eec3cdca3..67d3acd9f 100644 +--- a/Telegram/SourceFiles/base/runtime_composer.cpp ++++ b/Telegram/SourceFiles/base/runtime_composer.cpp +@@ -6,6 +6,10 @@ For license and copyright information please follow this link: + https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + */ + #include "base/runtime_composer.h" ++#include <map> ++#include <cstdint> ++#include <QMutex> ++#include <QMutexLocker> + + struct RuntimeComposerMetadatasMap { + std::map<uint64, std::unique_ptr<RuntimeComposerMetadata>> data; +diff --git a/Telegram/SourceFiles/base/runtime_composer.h b/Telegram/SourceFiles/base/runtime_composer.h +index 461f3888e..8e54f3ba5 100644 +--- a/Telegram/SourceFiles/base/runtime_composer.h ++++ b/Telegram/SourceFiles/base/runtime_composer.h +@@ -7,6 +7,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + */ + #pragma once + ++#include <cstddef> ++#include <QAtomicInt> ++#include "base/assertion.h" ++#include "base/algorithm.h" ++#include "base/basic_types.h" ++ + template <typename Base> + class RuntimeComposer; + +diff --git a/Telegram/SourceFiles/base/timer.cpp b/Telegram/SourceFiles/base/timer.cpp +index 32388c1e9..cf41307d9 100644 +--- a/Telegram/SourceFiles/base/timer.cpp ++++ b/Telegram/SourceFiles/base/timer.cpp +@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + */ + #include "base/timer.h" + ++#include <crl/crl_time.h> + #include <QtCore/QTimerEvent> + + namespace base { diff --git a/Telegram/SourceFiles/core/launcher.cpp b/Telegram/SourceFiles/core/launcher.cpp -index bf21d14d..6b63016e 100644 +index d4bdadc17..8a420c74b 100644 --- a/Telegram/SourceFiles/core/launcher.cpp +++ b/Telegram/SourceFiles/core/launcher.cpp -@@ -44,9 +44,10 @@ void Launcher::init() { +@@ -39,9 +39,10 @@ void Launcher::init() { QCoreApplication::setApplicationName(qsl("TelegramDesktop")); @@ -25,7 +206,7 @@ initHook(); } -@@ -64,6 +65,13 @@ int Launcher::exec() { +@@ -59,6 +60,13 @@ int Launcher::exec() { Logs::start(this); // must be started before Platform is started Platform::start(); // must be started before QApplication is created @@ -40,10 +221,10 @@ DEBUG_LOG(("Telegram finished, result: %1").arg(result)); diff --git a/Telegram/SourceFiles/platform/linux/linux_libs.h b/Telegram/SourceFiles/platform/linux/linux_libs.h -index e9e349be..d82963fa 100644 +index 6f93d69cd..df185d5a2 100644 --- a/Telegram/SourceFiles/platform/linux/linux_libs.h +++ b/Telegram/SourceFiles/platform/linux/linux_libs.h -@@ -30,7 +30,7 @@ extern "C" { +@@ -17,7 +17,7 @@ extern "C" { } // extern "C" #ifndef TDESKTOP_DISABLE_UNITY_INTEGRATION @@ -54,7 +235,7 @@ diff --git a/Telegram/SourceFiles/qt_functions.cpp b/Telegram/SourceFiles/qt_functions.cpp new file mode 100644 -index 00000000..4a722b8d +index 000000000..4a722b8d7 --- /dev/null +++ b/Telegram/SourceFiles/qt_functions.cpp @@ -0,0 +1,94 @@ @@ -153,10 +334,10 @@ + flags |= QTextItem::StrikeOut; +} diff --git a/Telegram/SourceFiles/qt_static_plugins.cpp b/Telegram/SourceFiles/qt_static_plugins.cpp -index b975c7a8..f2f876b3 100644 +index e29f348c8..122ff0f5d 100644 --- a/Telegram/SourceFiles/qt_static_plugins.cpp +++ b/Telegram/SourceFiles/qt_static_plugins.cpp -@@ -28,13 +28,4 @@ Q_IMPORT_PLUGIN(QWebpPlugin) +@@ -15,13 +15,4 @@ Q_IMPORT_PLUGIN(QWebpPlugin) Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin) Q_IMPORT_PLUGIN(QGenericEnginePlugin) #elif defined Q_OS_LINUX // Q_OS_WIN | Q_OS_MAC @@ -170,11 +351,144 @@ -Q_IMPORT_PLUGIN(QFcitxPlatformInputContextPlugin) -Q_IMPORT_PLUGIN(QHimePlatformInputContextPlugin) #endif // Q_OS_WIN | Q_OS_MAC | Q_OS_LINUX +diff --git a/Telegram/SourceFiles/storage/cache/storage_cache_cleaner.cpp b/Telegram/SourceFiles/storage/cache/storage_cache_cleaner.cpp +index 664ca5257..1158f2094 100644 +--- a/Telegram/SourceFiles/storage/cache/storage_cache_cleaner.cpp ++++ b/Telegram/SourceFiles/storage/cache/storage_cache_cleaner.cpp +@@ -7,9 +7,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + */ + #include "storage/cache/storage_cache_cleaner.h" + ++#include <range/v3/all.hpp> ++#include <base/basic_types.h> + #include <crl/crl.h> + #include <QtCore/QDir> + #include <QtCore/QFile> ++#include <QtCore/QString> + #include <unordered_map> + #include <set> + +diff --git a/Telegram/SourceFiles/storage/cache/storage_cache_cleaner.h b/Telegram/SourceFiles/storage/cache/storage_cache_cleaner.h +index 26f6f28b8..5f8cd762b 100644 +--- a/Telegram/SourceFiles/storage/cache/storage_cache_cleaner.h ++++ b/Telegram/SourceFiles/storage/cache/storage_cache_cleaner.h +@@ -8,7 +8,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + #pragma once + + #include "storage/cache/storage_cache_types.h" ++#include <crl/crl_object_on_queue.h> ++#include "base/assertion.h" + #include "base/binary_guard.h" ++#include "base/basic_types.h" ++#include <QString> + + namespace Storage { + namespace Cache { +diff --git a/Telegram/SourceFiles/storage/cache/storage_cache_database_object.cpp b/Telegram/SourceFiles/storage/cache/storage_cache_database_object.cpp +index 373c742b0..ec1207ad1 100644 +--- a/Telegram/SourceFiles/storage/cache/storage_cache_database_object.cpp ++++ b/Telegram/SourceFiles/storage/cache/storage_cache_database_object.cpp +@@ -14,11 +14,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + #include "storage/storage_encrypted_file.h" + #include "base/flat_map.h" + #include "base/algorithm.h" ++#include "base/openssl_help.h" + #include <crl/crl.h> + #include <xxhash.h> + #include <QtCore/QDir> + #include <unordered_map> + #include <set> ++#include <range/v3/all.hpp> + + namespace Storage { + namespace Cache { +diff --git a/Telegram/SourceFiles/storage/cache/storage_cache_types.cpp b/Telegram/SourceFiles/storage/cache/storage_cache_types.cpp +index 7bec686bd..adabbb6f0 100644 +--- a/Telegram/SourceFiles/storage/cache/storage_cache_types.cpp ++++ b/Telegram/SourceFiles/storage/cache/storage_cache_types.cpp +@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + #include "storage/cache/storage_cache_types.h" + + #include <QtCore/QDir> ++#include <range/v3/all.hpp> + + namespace Storage { + namespace Cache { +diff --git a/Telegram/SourceFiles/storage/storage_clear_legacy.cpp b/Telegram/SourceFiles/storage/storage_clear_legacy.cpp +index 993d79d63..d79f5e6af 100644 +--- a/Telegram/SourceFiles/storage/storage_clear_legacy.cpp ++++ b/Telegram/SourceFiles/storage/storage_clear_legacy.cpp +@@ -8,6 +8,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + #include "storage/storage_clear_legacy.h" + + #include <crl/crl_async.h> ++#include <QString> ++#include <QFile> + + namespace Storage { + namespace { +diff --git a/Telegram/SourceFiles/storage/storage_clear_legacy.h b/Telegram/SourceFiles/storage/storage_clear_legacy.h +index 09ee4f959..2ed3b9eb8 100644 +--- a/Telegram/SourceFiles/storage/storage_clear_legacy.h ++++ b/Telegram/SourceFiles/storage/storage_clear_legacy.h +@@ -7,6 +7,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + */ + #pragma once + ++#include <QString> ++#include <vector> ++#include "base/basic_types.h" ++#include "base/flat_set.h" ++ + namespace Storage { + + using CollectGoodFiles = Fn<void(FnMut<void(base::flat_set<QString>&&)>)>; +diff --git a/Telegram/SourceFiles/storage/storage_clear_legacy_posix.cpp b/Telegram/SourceFiles/storage/storage_clear_legacy_posix.cpp +index bb92db8f3..cdf2136e6 100644 +--- a/Telegram/SourceFiles/storage/storage_clear_legacy_posix.cpp ++++ b/Telegram/SourceFiles/storage/storage_clear_legacy_posix.cpp +@@ -10,6 +10,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + #include <sys/stat.h> + #include <dirent.h> + #include <unistd.h> ++#include <QString> ++#include <QByteArray> ++#include <QFile> + + namespace Storage { + namespace details { +diff --git a/Telegram/SourceFiles/storage/storage_encrypted_file.cpp b/Telegram/SourceFiles/storage/storage_encrypted_file.cpp +index c2c8d1339..8a39f8728 100644 +--- a/Telegram/SourceFiles/storage/storage_encrypted_file.cpp ++++ b/Telegram/SourceFiles/storage/storage_encrypted_file.cpp +@@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + */ + #include "storage/storage_encrypted_file.h" + ++#include <QFileInfo> ++#include <QDir> + #include "base/openssl_help.h" + + namespace Storage { +diff --git a/Telegram/SourceFiles/storage/storage_encryption.cpp b/Telegram/SourceFiles/storage/storage_encryption.cpp +index 61d0db392..1e8600d90 100644 +--- a/Telegram/SourceFiles/storage/storage_encryption.cpp ++++ b/Telegram/SourceFiles/storage/storage_encryption.cpp +@@ -9,6 +9,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + + #include "base/openssl_help.h" + ++#include <QDir> ++#include <QFileInfo> ++ + namespace Storage { + + CtrState::CtrState(bytes::const_span key, bytes::const_span iv) { diff --git a/Telegram/SourceFiles/ui/text/text.cpp b/Telegram/SourceFiles/ui/text/text.cpp -index 7d34a19b..a4b3d31a 100644 +index 944f58479..887c1982f 100644 --- a/Telegram/SourceFiles/ui/text/text.cpp +++ b/Telegram/SourceFiles/ui/text/text.cpp -@@ -1707,11 +1707,11 @@ private: +@@ -1750,11 +1750,11 @@ private: if (item == -1) return; @@ -190,10 +504,10 @@ auto blockIndex = _lineStartBlock; auto currentBlock = _t->_blocks[blockIndex].get(); diff --git a/Telegram/SourceFiles/ui/text/text_block.cpp b/Telegram/SourceFiles/ui/text/text_block.cpp -index a10b5393..4e1eb62d 100644 +index 2959cec77..04ad00645 100644 --- a/Telegram/SourceFiles/ui/text/text_block.cpp +++ b/Telegram/SourceFiles/ui/text/text_block.cpp -@@ -333,6 +333,9 @@ TextBlock::TextBlock(const style::font &font, const QString &str, QFixed minResi +@@ -332,6 +332,9 @@ TextBlock::TextBlock(const style::font &font, const QString &str, QFixed minResi QStackTextEngine engine(part, blockFont->f); BlockParser parser(&engine, this, minResizeWidth, _from, part); @@ -204,10 +518,10 @@ CrashReports::ClearAnnotationRef("CrashString"); } diff --git a/Telegram/SourceFiles/ui/twidget.cpp b/Telegram/SourceFiles/ui/twidget.cpp -index dacb848a..f64c9b66 100644 +index 71f318229..461f52278 100644 --- a/Telegram/SourceFiles/ui/twidget.cpp +++ b/Telegram/SourceFiles/ui/twidget.cpp -@@ -248,9 +248,9 @@ void sendSynteticMouseEvent(QWidget *widget, QEvent::Type type, Qt::MouseButton +@@ -233,9 +233,9 @@ void sendSynteticMouseEvent(QWidget *widget, QEvent::Type type, Qt::MouseButton , button , QGuiApplication::mouseButtons() | button , QGuiApplication::keyboardModifiers() @@ -220,10 +534,10 @@ ev.setTimestamp(getms()); QGuiApplication::sendEvent(windowHandle, &ev); diff --git a/Telegram/gyp/PrecompiledHeader.cmake b/Telegram/gyp/PrecompiledHeader.cmake -index 5d6830e9..c3f08d3f 100644 +index a0e1e0489..223113081 100644 --- a/Telegram/gyp/PrecompiledHeader.cmake +++ b/Telegram/gyp/PrecompiledHeader.cmake -@@ -112,7 +112,7 @@ function(add_precompiled_header _target _input) +@@ -114,7 +114,7 @@ function(add_precompiled_header _target _input) set(_compiler_FLAGS "@${_pch_c_flags_file}") add_custom_command( OUTPUT "${_output_c}" @@ -232,7 +546,7 @@ DEPENDS "${_pchfile}" "${_pch_c_flags_file}" IMPLICIT_DEPENDS C "${_pch_header}" COMMENT "Precompiling ${_name} for ${_target} (C)") -@@ -123,7 +123,7 @@ function(add_precompiled_header _target _input) +@@ -125,7 +125,7 @@ function(add_precompiled_header _target _input) set(_compiler_FLAGS "@${_pch_cpp_flags_file}") add_custom_command( OUTPUT "${_output_cxx}" @@ -240,12 +554,12 @@ + COMMAND "${CMAKE_CXX_COMPILER}" ${_compiler_FLAGS} "$(CXX_DEFINES)" "$(CXX_INCLUDES)" "$(CXX_FLAGS)" -x c++-header -o "${_output_cxx}" -c "${_pchfile}" DEPENDS "${_pchfile}" "${_pch_cpp_flags_file}" IMPLICIT_DEPENDS CXX "${_pch_header}" - COMMENT "Precompiling ${_name} for ${_target} (C++)") + COMMENT "Precompiling header ${_name} for ${_target} (C++)") diff --git a/Telegram/gyp/Telegram.gyp b/Telegram/gyp/Telegram.gyp -index 84a06153..fd7ca47f 100644 +index 1cab5ae29..465e8276a 100644 --- a/Telegram/gyp/Telegram.gyp +++ b/Telegram/gyp/Telegram.gyp -@@ -82,13 +82,11 @@ +@@ -75,7 +75,6 @@ 'codegen.gyp:codegen_numbers', 'codegen.gyp:codegen_style', 'tests/tests.gyp:tests', @@ -252,7 +566,8 @@ - 'utils.gyp:Updater', '../ThirdParty/libtgvoip/libtgvoip.gyp:libtgvoip', 'crl.gyp:crl', - 'lib_export.gyp:lib_export', + 'lib_base.gyp:lib_base', +@@ -84,7 +83,6 @@ ], 'defines': [ @@ -259,8 +574,8 @@ - 'AL_LIBTYPE_STATIC', 'AL_ALEXT_PROTOTYPES', 'TGVOIP_USE_CXX11_LIB', - '<!@(python -c "for s in \'<(build_defines)\'.split(\',\'): print(s)")', -@@ -97,15 +95,7 @@ + 'XXH_INLINE_ALL', +@@ -94,16 +92,8 @@ 'include_dirs': [ '<(src_loc)', '<(SHARED_INTERMEDIATE_DIR)', @@ -273,15 +588,16 @@ - '<(libs_loc)/range-v3/include', - '<(minizip_loc)', - '<(sp_media_key_tap_loc)', + '<(emoji_suggestions_loc)', + '/usr/include/minizip', - '<(emoji_suggestions_loc)', '<(submodules_loc)/GSL/include', '<(submodules_loc)/variant/include', + '<(submodules_loc)/crl/src', diff --git a/Telegram/gyp/qt.gypi b/Telegram/gyp/qt.gypi -index dea127a3..62c95e68 100644 +index 0b783ec21..3f917765a 100644 --- a/Telegram/gyp/qt.gypi +++ b/Telegram/gyp/qt.gypi -@@ -27,25 +27,21 @@ +@@ -14,25 +14,21 @@ [ 'build_macold', { 'qt_version%': '5.3.2', }, { @@ -309,7 +625,7 @@ }] ] }, -@@ -85,32 +81,13 @@ +@@ -72,32 +68,13 @@ ], }], [ 'build_linux', { @@ -345,7 +661,7 @@ ], }], ], -@@ -140,11 +117,6 @@ +@@ -127,11 +104,6 @@ # '<!@(python <(DEPTH)/list_sources.py [sources] <(qt_moc_list_sources_arg))' # where [sources] contains all your source files 'qt_moc_list_sources_arg': '--moc-prefix SHARED_INTERMEDIATE_DIR/<(_target_name)/moc/moc_', @@ -357,7 +673,7 @@ }, 'configurations': { -@@ -193,14 +165,14 @@ +@@ -180,14 +152,14 @@ }, 'include_dirs': [ @@ -380,7 +696,7 @@ ], 'library_dirs': [ '<(qt_loc)/lib', -@@ -225,17 +197,10 @@ +@@ -212,17 +184,10 @@ ], 'libraries': [ '<(PRODUCT_DIR)/obj.target/liblinux_glibc_wraps.a', @@ -399,7 +715,7 @@ '-lglib-2.0', '-lpthread', ], -@@ -243,7 +208,6 @@ +@@ -230,7 +195,6 @@ '<(qt_loc)/mkspecs/linux-g++', ], 'ldflags': [ @@ -408,10 +724,10 @@ '-rdynamic', ], diff --git a/Telegram/gyp/qt_moc.gypi b/Telegram/gyp/qt_moc.gypi -index fae668dc..99e184a3 100644 +index 464d3c818..f350da8f3 100644 --- a/Telegram/gyp/qt_moc.gypi +++ b/Telegram/gyp/qt_moc.gypi -@@ -25,7 +25,7 @@ +@@ -12,7 +12,7 @@ '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/moc/moc_<(RULE_INPUT_ROOT).cpp', ], 'action': [ @@ -421,10 +737,10 @@ # Silence "Note: No relevant classes found. No output generated." '--no-notes', diff --git a/Telegram/gyp/qt_rcc.gypi b/Telegram/gyp/qt_rcc.gypi -index eebc6967..19a346fe 100644 +index f5624a82b..1129a95c5 100644 --- a/Telegram/gyp/qt_rcc.gypi +++ b/Telegram/gyp/qt_rcc.gypi -@@ -28,7 +28,7 @@ +@@ -15,7 +15,7 @@ '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/qrc/qrc_<(RULE_INPUT_ROOT).cpp', ], 'action': [ @@ -434,10 +750,10 @@ '-no-compress', '<(RULE_INPUT_PATH)', diff --git a/Telegram/gyp/settings_linux.gypi b/Telegram/gyp/settings_linux.gypi -index b93bace4..0fcdfd56 100644 +index 17219fa2c..6853b5c3e 100644 --- a/Telegram/gyp/settings_linux.gypi +++ b/Telegram/gyp/settings_linux.gypi -@@ -24,7 +24,6 @@ +@@ -11,7 +11,6 @@ 'linux_common_flags': [ '-pipe', '-Wall', @@ -454,10 +770,10 @@ ], 'cflags_c': [ diff --git a/Telegram/gyp/telegram_linux.gypi b/Telegram/gyp/telegram_linux.gypi -index f6918c22..50f0d8c7 100644 +index 80259c687..b5e3c18a2 100644 --- a/Telegram/gyp/telegram_linux.gypi +++ b/Telegram/gyp/telegram_linux.gypi -@@ -33,10 +33,11 @@ +@@ -23,10 +23,11 @@ 'linux_path_va%': '/usr/local', 'linux_path_vdpau%': '/usr/local', 'linux_path_breakpad%': '/usr/local', @@ -470,7 +786,7 @@ '/usr/local/include', '<(linux_path_ffmpeg)/include', '<(linux_path_openal)/include', -@@ -45,6 +46,7 @@ +@@ -35,6 +36,7 @@ '<(linux_path_range)/include', ], 'library_dirs': [ @@ -478,7 +794,7 @@ '/usr/local/lib', '<(linux_path_ffmpeg)/lib', '<(linux_path_openal)/lib', -@@ -53,25 +55,16 @@ +@@ -43,25 +45,16 @@ '<(linux_path_breakpad)/lib', ], 'libraries': [ @@ -514,7 +830,7 @@ # '<!(pkg-config 2> /dev/null --libs <@(pkgconfig_libs))', ], 'cflags_cc': [ -@@ -118,10 +110,8 @@ +@@ -96,10 +89,8 @@ ], }], ['not_need_gtk!="True"', { 'cflags_cc': [ @@ -528,10 +844,10 @@ }] ], diff --git a/Telegram/gyp/telegram_sources.txt b/Telegram/gyp/telegram_sources.txt -index 5d2f627e..defd475d 100644 +index f02296c8a..46bd016dd 100644 --- a/Telegram/gyp/telegram_sources.txt +++ b/Telegram/gyp/telegram_sources.txt -@@ -713,14 +713,7 @@ +@@ -755,14 +755,7 @@ <(emoji_suggestions_loc)/emoji_suggestions.cpp <(emoji_suggestions_loc)/emoji_suggestions.h @@ -545,5 +861,5 @@ -<(minizip_loc)/unzip.h +<(src_loc)/qt_functions.cpp - platforms: mac - <(sp_media_key_tap_loc)/SPMediaKeyTap.m + platforms: win + <(res_loc)/winrc/Telegram.rc