View | Details | Raw Unified | Return to bug 240401 | Differences between
and this patch

Collapse All | Expand All

(-)./Makefile (-4 / +4 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	telegram-desktop
3
PORTNAME=	telegram-desktop
4
DISTVERSIONPREFIX=	v
4
DISTVERSIONPREFIX=	v
5
DISTVERSION=	1.7.14
5
DISTVERSION=	1.8.4
6
CATEGORIES=	net-im
6
CATEGORIES=	net-im
7
7
8
MAINTAINER=	henry.hu.sh@gmail.com
8
MAINTAINER=	henry.hu.sh@gmail.com
Lines 33-42 Link Here
33
GH_TUPLE=	catchorg:Catch2:5ca44b68:catch/Telegram/ThirdParty/Catch \
33
GH_TUPLE=	catchorg:Catch2:5ca44b68:catch/Telegram/ThirdParty/Catch \
34
		mapbox:variant:550ac2f:variant/Telegram/ThirdParty/variant \
34
		mapbox:variant:550ac2f:variant/Telegram/ThirdParty/variant \
35
		Microsoft:GSL:d846fe5:gsl/Telegram/ThirdParty/GSL \
35
		Microsoft:GSL:d846fe5:gsl/Telegram/ThirdParty/GSL \
36
		telegramdesktop:libtgvoip:0e92a22:libtgvoip/Telegram/ThirdParty/libtgvoip \
36
		telegramdesktop:libtgvoip:d4a0f71:libtgvoip/Telegram/ThirdParty/libtgvoip \
37
		telegramdesktop:crl:9ea8700:crl/Telegram/ThirdParty/crl \
37
		telegramdesktop:crl:52baf11:crl/Telegram/ThirdParty/crl \
38
		Cyan4973:xxHash:7cc9639:xxhash/Telegram/ThirdParty/xxHash \
38
		Cyan4973:xxHash:7cc9639:xxhash/Telegram/ThirdParty/xxHash \
39
		john-preston:rlottie:302b7f9:rlottie/Telegram/ThirdParty/rlottie \
39
		john-preston:rlottie:589db02:rlottie/Telegram/ThirdParty/rlottie \
40
		lz4:lz4:9a2a9f2:lz4/Telegram/ThirdParty/lz4
40
		lz4:lz4:9a2a9f2:lz4/Telegram/ThirdParty/lz4
41
USE_GNOME=	glib20
41
USE_GNOME=	glib20
42
USE_QT=		core gui imageformats network widgets buildtools_build qmake_build dbus
42
USE_QT=		core gui imageformats network widgets buildtools_build qmake_build dbus
(-)./distinfo (-9 / +9 lines)
Lines 1-19 Link Here
1
TIMESTAMP = 1564285102
1
TIMESTAMP = 1567889674
2
SHA256 (telegramdesktop-tdesktop-v1.7.14_GH0.tar.gz) = a52ab6efb4dc7579f05543df3fc3814baa09c0644e00ca30e37a9c6f99a5d164
2
SHA256 (telegramdesktop-tdesktop-v1.8.4_GH0.tar.gz) = 97f034d78447c99002b8742c75a3a436e709cdf2f5dff79f7ca04a8c76298627
3
SIZE (telegramdesktop-tdesktop-v1.7.14_GH0.tar.gz) = 14296012
3
SIZE (telegramdesktop-tdesktop-v1.8.4_GH0.tar.gz) = 14367314
4
SHA256 (catchorg-Catch2-5ca44b68_GH0.tar.gz) = 8cdf2a345897bda1aaabffd4496dffe263768cef3e4254e74ae63545c8e12cc2
4
SHA256 (catchorg-Catch2-5ca44b68_GH0.tar.gz) = 8cdf2a345897bda1aaabffd4496dffe263768cef3e4254e74ae63545c8e12cc2
5
SIZE (catchorg-Catch2-5ca44b68_GH0.tar.gz) = 375264
5
SIZE (catchorg-Catch2-5ca44b68_GH0.tar.gz) = 375264
6
SHA256 (mapbox-variant-550ac2f_GH0.tar.gz) = 7ab3aa7c9fa672027f13721584df5f7ec09c0ecca499d374c6ac76e147ef7354
6
SHA256 (mapbox-variant-550ac2f_GH0.tar.gz) = 7ab3aa7c9fa672027f13721584df5f7ec09c0ecca499d374c6ac76e147ef7354
7
SIZE (mapbox-variant-550ac2f_GH0.tar.gz) = 108686
7
SIZE (mapbox-variant-550ac2f_GH0.tar.gz) = 108686
8
SHA256 (Microsoft-GSL-d846fe5_GH0.tar.gz) = 4c463f93ca3b1dcb0b8d73b54309c1d31145761c457f1a6fd53554a6d469b468
8
SHA256 (Microsoft-GSL-d846fe5_GH0.tar.gz) = 4c463f93ca3b1dcb0b8d73b54309c1d31145761c457f1a6fd53554a6d469b468
9
SIZE (Microsoft-GSL-d846fe5_GH0.tar.gz) = 58930
9
SIZE (Microsoft-GSL-d846fe5_GH0.tar.gz) = 58930
10
SHA256 (telegramdesktop-libtgvoip-0e92a22_GH0.tar.gz) = 179c780bf199ff41984756d1b0b96287edf0fa1490f76a31eb9cbdc572ecce6f
10
SHA256 (telegramdesktop-libtgvoip-d4a0f71_GH0.tar.gz) = bff049b414bdaafe488f3d46d894e910c06ff5233bf33001d59fe50b7de3702a
11
SIZE (telegramdesktop-libtgvoip-0e92a22_GH0.tar.gz) = 1484785
11
SIZE (telegramdesktop-libtgvoip-d4a0f71_GH0.tar.gz) = 1484804
12
SHA256 (telegramdesktop-crl-9ea8700_GH0.tar.gz) = 68011a83a139d68bed4fd13b946c1aea6f7bea8bffc702a4795f2c0e23f9efd4
12
SHA256 (telegramdesktop-crl-52baf11_GH0.tar.gz) = 04effcfcbcd1486619d93dba0a30ca16579bca5cc37273ed1908dd8b375e3e3b
13
SIZE (telegramdesktop-crl-9ea8700_GH0.tar.gz) = 21873
13
SIZE (telegramdesktop-crl-52baf11_GH0.tar.gz) = 21842
14
SHA256 (Cyan4973-xxHash-7cc9639_GH0.tar.gz) = f40801820e885f92bbe3d2434efeb39aa18eeaf878341982e8525b538468e3ed
14
SHA256 (Cyan4973-xxHash-7cc9639_GH0.tar.gz) = f40801820e885f92bbe3d2434efeb39aa18eeaf878341982e8525b538468e3ed
15
SIZE (Cyan4973-xxHash-7cc9639_GH0.tar.gz) = 37534
15
SIZE (Cyan4973-xxHash-7cc9639_GH0.tar.gz) = 37534
16
SHA256 (john-preston-rlottie-302b7f9_GH0.tar.gz) = ade35b77c10c2a733ecccbca261222c36755bbd0f0d03f2e2772bd7cc0ad3d2b
16
SHA256 (john-preston-rlottie-589db02_GH0.tar.gz) = 415a78d04836f5bf4e535b034a7d5cf540d55cce98b9be869c3178e1c251f361
17
SIZE (john-preston-rlottie-302b7f9_GH0.tar.gz) = 7896441
17
SIZE (john-preston-rlottie-589db02_GH0.tar.gz) = 7887733
18
SHA256 (lz4-lz4-9a2a9f2_GH0.tar.gz) = 437827e1a1a0eec752777d29ef7ac78b195c805438448fe08154d9b5b181b8ea
18
SHA256 (lz4-lz4-9a2a9f2_GH0.tar.gz) = 437827e1a1a0eec752777d29ef7ac78b195c805438448fe08154d9b5b181b8ea
19
SIZE (lz4-lz4-9a2a9f2_GH0.tar.gz) = 293999
19
SIZE (lz4-lz4-9a2a9f2_GH0.tar.gz) = 293999
(-)./files/CMakeLists.inj (+1 lines)
Lines 12-17 Link Here
12
add_precompiled_header(lib_base ../../Telegram/SourceFiles/base/base_pch.h)
12
add_precompiled_header(lib_base ../../Telegram/SourceFiles/base/base_pch.h)
13
add_precompiled_header(lib_export ../../Telegram/SourceFiles/export/export_pch.h)
13
add_precompiled_header(lib_export ../../Telegram/SourceFiles/export/export_pch.h)
14
add_precompiled_header(lib_storage ../../Telegram/SourceFiles/storage/storage_pch.h)
14
add_precompiled_header(lib_storage ../../Telegram/SourceFiles/storage/storage_pch.h)
15
add_precompiled_header(lib_mtproto ../../Telegram/SourceFiles/mtproto/mtp_pch.h)
15
16
16
# vim: ft=cmake
17
# vim: ft=cmake
17
# -------------- debian/CMakeLists.inj end --------------
18
# -------------- debian/CMakeLists.inj end --------------
(-)./files/gyp-patches (-16 / +16 lines)
Lines 1-4 Link Here
1
--- Telegram/gyp/codegen_rules.gypi.orig	2019-07-07 13:34:35 UTC
1
--- Telegram/gyp/codegen_rules.gypi.orig	2019-09-06 13:41:43 UTC
2
+++ Telegram/gyp/codegen_rules.gypi
2
+++ Telegram/gyp/codegen_rules.gypi
3
@@ -15,7 +15,7 @@
3
@@ -15,7 +15,7 @@
4
       '<(SHARED_INTERMEDIATE_DIR)/update_dependent_styles.timestamp',
4
       '<(SHARED_INTERMEDIATE_DIR)/update_dependent_styles.timestamp',
Lines 25-31 Link Here
25
       '-o', '<(SHARED_INTERMEDIATE_DIR)/update_dependent_qrc.timestamp',
25
       '-o', '<(SHARED_INTERMEDIATE_DIR)/update_dependent_qrc.timestamp',
26
       '<@(qrc_files)',
26
       '<@(qrc_files)',
27
     ],
27
     ],
28
--- Telegram/gyp/lib_export.gyp.orig	2019-07-07 13:34:35 UTC
28
--- Telegram/gyp/lib_export.gyp.orig	2019-09-06 13:41:43 UTC
29
+++ Telegram/gyp/lib_export.gyp
29
+++ Telegram/gyp/lib_export.gyp
30
@@ -46,7 +46,7 @@
30
@@ -46,7 +46,7 @@
31
     'include_dirs': [
31
     'include_dirs': [
Lines 36-53 Link Here
36
       '<(submodules_loc)/GSL/include',
36
       '<(submodules_loc)/GSL/include',
37
       '<(submodules_loc)/variant/include',
37
       '<(submodules_loc)/variant/include',
38
       '<(submodules_loc)/crl/src',
38
       '<(submodules_loc)/crl/src',
39
--- Telegram/gyp/lib_scheme.gyp.orig	2019-07-07 13:34:35 UTC
39
--- Telegram/gyp/lib_scheme.gyp.orig	2019-09-06 13:41:43 UTC
40
+++ Telegram/gyp/lib_scheme.gyp
40
+++ Telegram/gyp/lib_scheme.gyp
41
@@ -48,7 +48,7 @@
41
@@ -49,7 +49,7 @@
42
         '<(SHARED_INTERMEDIATE_DIR)/scheme.h',
42
         '<(SHARED_INTERMEDIATE_DIR)/scheme.h',
43
       ],
43
       ],
44
       'action': [
44
       'action': [
45
-        'python', '<(src_loc)/codegen/scheme/codegen_scheme.py',
45
-        'python', '<(src_loc)/codegen/scheme/codegen_scheme.py',
46
+        '%%PYTHON_CMD%%', '<(src_loc)/codegen/scheme/codegen_scheme.py',
46
+        '%%PYTHON_CMD%%', '<(src_loc)/codegen/scheme/codegen_scheme.py',
47
         '-o', '<(SHARED_INTERMEDIATE_DIR)', '<(res_loc)/scheme.tl',
47
         '-o', '<(SHARED_INTERMEDIATE_DIR)',
48
       ],
48
 		'<(res_loc)/tl/mtproto.tl',
49
       'message': 'codegen_scheme-ing scheme.tl..',
49
 		'<(res_loc)/tl/api.tl',
50
--- Telegram/gyp/qt_moc.gypi.orig	2019-07-07 13:34:35 UTC
50
--- Telegram/gyp/qt_moc.gypi.orig	2019-09-06 13:41:43 UTC
51
+++ Telegram/gyp/qt_moc.gypi
51
+++ Telegram/gyp/qt_moc.gypi
52
@@ -15,12 +15,12 @@
52
@@ -15,12 +15,12 @@
53
       '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/moc/moc_<(RULE_INPUT_ROOT).cpp',
53
       '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/moc/moc_<(RULE_INPUT_ROOT).cpp',
Lines 64-70 Link Here
64
       # '<!@(python -c "for s in \'<@(_include_dirs)\'.split(\' \'): print(\'-I\' + s)")',
64
       # '<!@(python -c "for s in \'<@(_include_dirs)\'.split(\' \'): print(\'-I\' + s)")',
65
       '<(RULE_INPUT_PATH)',
65
       '<(RULE_INPUT_PATH)',
66
       '-o', '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/moc/moc_<(RULE_INPUT_ROOT).cpp',
66
       '-o', '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/moc/moc_<(RULE_INPUT_ROOT).cpp',
67
--- Telegram/gyp/qt_rcc.gypi.orig	2019-07-07 13:34:35 UTC
67
--- Telegram/gyp/qt_rcc.gypi.orig	2019-09-06 13:41:43 UTC
68
+++ Telegram/gyp/qt_rcc.gypi
68
+++ Telegram/gyp/qt_rcc.gypi
69
@@ -15,7 +15,7 @@
69
@@ -15,7 +15,7 @@
70
       '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/qrc/qrc_<(RULE_INPUT_ROOT).cpp',
70
       '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/qrc/qrc_<(RULE_INPUT_ROOT).cpp',
Lines 75-81 Link Here
75
       '-name', '<(RULE_INPUT_ROOT)',
75
       '-name', '<(RULE_INPUT_ROOT)',
76
       '-no-compress',
76
       '-no-compress',
77
       '<(RULE_INPUT_PATH)',
77
       '<(RULE_INPUT_PATH)',
78
--- Telegram/gyp/qt.gypi.orig	2019-07-07 13:34:35 UTC
78
--- Telegram/gyp/qt.gypi.orig	2019-09-06 13:41:43 UTC
79
+++ Telegram/gyp/qt.gypi
79
+++ Telegram/gyp/qt.gypi
80
@@ -14,25 +14,21 @@
80
@@ -14,25 +14,21 @@
81
               [ 'build_macold', {
81
               [ 'build_macold', {
Lines 233-239 Link Here
233
         '-pthread',
233
         '-pthread',
234
         '-rdynamic',
234
         '-rdynamic',
235
       ],
235
       ],
236
--- Telegram/gyp/telegram_linux.gypi.orig	2019-07-07 13:34:35 UTC
236
--- Telegram/gyp/telegram_linux.gypi.orig	2019-09-06 13:41:43 UTC
237
+++ Telegram/gyp/telegram_linux.gypi
237
+++ Telegram/gyp/telegram_linux.gypi
238
@@ -10,7 +10,7 @@
238
@@ -10,7 +10,7 @@
239
       'variables': {
239
       'variables': {
Lines 339-345 Link Here
339
         ],
339
         ],
340
       }], ['<!(pkg-config ayatana-appindicator3-0.1; echo $?) == 0', {
340
       }], ['<!(pkg-config ayatana-appindicator3-0.1; echo $?) == 0', {
341
         'cflags_cc': [ '<!(pkg-config --cflags ayatana-appindicator3-0.1)' ],
341
         'cflags_cc': [ '<!(pkg-config --cflags ayatana-appindicator3-0.1)' ],
342
--- Telegram/gyp/Telegram.gyp.orig	2019-07-07 13:34:35 UTC
342
--- Telegram/gyp/Telegram.gyp.orig	2019-09-06 13:41:43 UTC
343
+++ Telegram/gyp/Telegram.gyp
343
+++ Telegram/gyp/Telegram.gyp
344
@@ -51,7 +51,7 @@
344
@@ -51,7 +51,7 @@
345
         'pt-BR',
345
         'pt-BR',
Lines 358-364 Link Here
358
       '../ThirdParty/libtgvoip/libtgvoip.gyp:libtgvoip',
358
       '../ThirdParty/libtgvoip/libtgvoip.gyp:libtgvoip',
359
       'crl.gyp:crl',
359
       'crl.gyp:crl',
360
       'lib_base.gyp:lib_base',
360
       'lib_base.gyp:lib_base',
361
@@ -86,27 +85,18 @@
361
@@ -87,27 +86,18 @@
362
     ],
362
     ],
363
 
363
 
364
     'defines': [
364
     'defines': [
Lines 388-394 Link Here
388
       '<(emoji_suggestions_loc)',
388
       '<(emoji_suggestions_loc)',
389
       '<(submodules_loc)/GSL/include',
389
       '<(submodules_loc)/GSL/include',
390
       '<(submodules_loc)/variant/include',
390
       '<(submodules_loc)/variant/include',
391
@@ -125,7 +115,7 @@
391
@@ -126,7 +116,7 @@
392
       '<(res_loc)/export_html/images/back@2x.png',
392
       '<(res_loc)/export_html/images/back@2x.png',
393
     ],
393
     ],
394
     'sources!': [
394
     'sources!': [
Lines 397-403 Link Here
397
     ],
397
     ],
398
     'conditions': [
398
     'conditions': [
399
       [ '"<(official_build_target)" != ""', {
399
       [ '"<(official_build_target)" != ""', {
400
--- Telegram/gyp/tests/tests.gyp.orig	2019-07-07 13:34:35 UTC
400
--- Telegram/gyp/tests/tests.gyp.orig	2019-09-06 13:41:43 UTC
401
+++ Telegram/gyp/tests/tests.gyp
401
+++ Telegram/gyp/tests/tests.gyp
402
@@ -13,7 +13,7 @@
402
@@ -13,7 +13,7 @@
403
     'src_loc': '../../SourceFiles',
403
     'src_loc': '../../SourceFiles',
Lines 408-414 Link Here
408
   },
408
   },
409
   'targets': [{
409
   'targets': [{
410
     'target_name': 'tests',
410
     'target_name': 'tests',
411
--- Telegram/ThirdParty/libtgvoip/libtgvoip.gyp.orig	2019-06-24 11:42:33 UTC
411
--- Telegram/ThirdParty/libtgvoip/libtgvoip.gyp.orig	2019-07-15 12:59:17 UTC
412
+++ Telegram/ThirdParty/libtgvoip/libtgvoip.gyp
412
+++ Telegram/ThirdParty/libtgvoip/libtgvoip.gyp
413
@@ -14,11 +14,12 @@
413
@@ -14,11 +14,12 @@
414
         'variables': {
414
         'variables': {
(-)./files/patch-Telegram_SourceFiles_core_launcher.cpp (-3 / +3 lines)
Lines 1-4 Link Here
1
--- Telegram/SourceFiles/core/launcher.cpp.orig	2019-07-07 13:34:35 UTC
1
--- Telegram/SourceFiles/core/launcher.cpp.orig	2019-09-06 13:41:43 UTC
2
+++ Telegram/SourceFiles/core/launcher.cpp
2
+++ Telegram/SourceFiles/core/launcher.cpp
3
@@ -16,6 +16,8 @@ https://github.com/telegramdesktop/tdesktop/blob/maste
3
@@ -16,6 +16,8 @@ https://github.com/telegramdesktop/tdesktop/blob/maste
4
 #include "core/sandbox.h"
4
 #include "core/sandbox.h"
Lines 9-15 Link Here
9
 namespace Core {
9
 namespace Core {
10
 namespace {
10
 namespace {
11
 
11
 
12
@@ -246,12 +248,13 @@ void Launcher::init() {
12
@@ -248,12 +250,13 @@ void Launcher::init() {
13
 #define TDESKTOP_LAUNCHER_FILENAME_TO_STRING_HELPER(V) #V
13
 #define TDESKTOP_LAUNCHER_FILENAME_TO_STRING_HELPER(V) #V
14
 #define TDESKTOP_LAUNCHER_FILENAME_TO_STRING(V) TDESKTOP_LAUNCHER_FILENAME_TO_STRING_HELPER(V)
14
 #define TDESKTOP_LAUNCHER_FILENAME_TO_STRING(V) TDESKTOP_LAUNCHER_FILENAME_TO_STRING_HELPER(V)
15
 	QApplication::setDesktopFileName(qsl(TDESKTOP_LAUNCHER_FILENAME_TO_STRING(TDESKTOP_LAUNCHER_FILENAME)));
15
 	QApplication::setDesktopFileName(qsl(TDESKTOP_LAUNCHER_FILENAME_TO_STRING(TDESKTOP_LAUNCHER_FILENAME)));
Lines 26-32 Link Here
26
 
26
 
27
 	initHook();
27
 	initHook();
28
 }
28
 }
29
@@ -268,6 +271,11 @@ int Launcher::exec() {
29
@@ -270,6 +273,11 @@ int Launcher::exec() {
30
 	// both are finished in Sandbox::closeApplication
30
 	// both are finished in Sandbox::closeApplication
31
 	Logs::start(this); // must be started before Platform is started
31
 	Logs::start(this); // must be started before Platform is started
32
 	Platform::start(); // must be started before Sandbox is created
32
 	Platform::start(); // must be started before Sandbox is created
(-)./files/patch-Telegram_SourceFiles_core_update__checker.cpp (-3 / +3 lines)
Lines 1-6 Link Here
1
--- Telegram/SourceFiles/core/update_checker.cpp.orig	2019-07-07 13:34:35 UTC
1
--- Telegram/SourceFiles/core/update_checker.cpp.orig	2019-09-06 13:41:43 UTC
2
+++ Telegram/SourceFiles/core/update_checker.cpp
2
+++ Telegram/SourceFiles/core/update_checker.cpp
3
@@ -1461,6 +1461,9 @@ int UpdateChecker::size() const {
3
@@ -1463,6 +1463,9 @@ int UpdateChecker::size() const {
4
 //}
4
 //}
5
 
5
 
6
 bool checkReadyUpdate() {
6
 bool checkReadyUpdate() {
Lines 10-16 Link Here
10
 	QString readyFilePath = cWorkingDir() + qsl("tupdates/temp/ready"), readyPath = cWorkingDir() + qsl("tupdates/temp");
10
 	QString readyFilePath = cWorkingDir() + qsl("tupdates/temp/ready"), readyPath = cWorkingDir() + qsl("tupdates/temp");
11
 	if (!QFile(readyFilePath).exists() || cExeName().isEmpty()) {
11
 	if (!QFile(readyFilePath).exists() || cExeName().isEmpty()) {
12
 		if (QDir(cWorkingDir() + qsl("tupdates/ready")).exists() || QDir(cWorkingDir() + qsl("tupdates/temp")).exists()) {
12
 		if (QDir(cWorkingDir() + qsl("tupdates/ready")).exists() || QDir(cWorkingDir() + qsl("tupdates/temp")).exists()) {
13
@@ -1513,6 +1516,9 @@ bool checkReadyUpdate() {
13
@@ -1515,6 +1518,9 @@ bool checkReadyUpdate() {
14
 #elif defined Q_OS_LINUX // Q_OS_MAC
14
 #elif defined Q_OS_LINUX // Q_OS_MAC
15
 	QString curUpdater = (cExeDir() + qsl("Updater"));
15
 	QString curUpdater = (cExeDir() + qsl("Updater"));
16
 	QFileInfo updater(cWorkingDir() + qsl("tupdates/temp/Updater"));
16
 	QFileInfo updater(cWorkingDir() + qsl("tupdates/temp/Updater"));
(-)./files/patch-Telegram_SourceFiles_export_data_export__data__types.cpp (-2 / +2 lines)
Lines 1-6 Link Here
1
--- Telegram/SourceFiles/export/data/export_data_types.cpp.orig	2019-07-07 13:34:35 UTC
1
--- Telegram/SourceFiles/export/data/export_data_types.cpp.orig	2019-09-06 13:41:43 UTC
2
+++ Telegram/SourceFiles/export/data/export_data_types.cpp
2
+++ Telegram/SourceFiles/export/data/export_data_types.cpp
3
@@ -360,9 +360,9 @@ QString CleanDocumentName(QString name) {
3
@@ -362,9 +362,9 @@ QString CleanDocumentName(QString name) {
4
 		'|',
4
 		'|',
5
 #elif defined Q_OS_MAC // Q_OS_WIN
5
 #elif defined Q_OS_MAC // Q_OS_WIN
6
 		':',
6
 		':',
(-)./files/patch-Telegram_SourceFiles_history_admin__log_history__admin__log__inner.cpp (-2 / +2 lines)
Lines 1-6 Link Here
1
--- Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp.orig	2019-07-07 13:34:35 UTC
1
--- Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp.orig	2019-09-06 13:41:43 UTC
2
+++ Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp
2
+++ Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp
3
@@ -1411,13 +1411,13 @@ void InnerWidget::mouseActionFinish(const QPoint &scre
3
@@ -1425,13 +1425,13 @@ void InnerWidget::mouseActionFinish(const QPoint &scre
4
 	_mouseSelectType = TextSelectType::Letters;
4
 	_mouseSelectType = TextSelectType::Letters;
5
 	//_widget->noSelectingScroll(); // TODO
5
 	//_widget->noSelectingScroll(); // TODO
6
 
6
 
(-)./files/patch-Telegram_SourceFiles_history_history__inner__widget.cpp (-3 / +3 lines)
Lines 1-6 Link Here
1
--- Telegram/SourceFiles/history/history_inner_widget.cpp.orig	2019-07-07 13:34:35 UTC
1
--- Telegram/SourceFiles/history/history_inner_widget.cpp.orig	2019-09-06 13:41:43 UTC
2
+++ Telegram/SourceFiles/history/history_inner_widget.cpp
2
+++ Telegram/SourceFiles/history/history_inner_widget.cpp
3
@@ -1382,7 +1382,7 @@ void HistoryInner::mouseActionFinish(
3
@@ -1390,7 +1390,7 @@ void HistoryInner::mouseActionFinish(
4
 	_widget->noSelectingScroll();
4
 	_widget->noSelectingScroll();
5
 	_widget->updateTopBarSelection();
5
 	_widget->updateTopBarSelection();
6
 
6
 
Lines 9-15 Link Here
9
 	if (!_selected.empty() && _selected.cbegin()->second != FullSelection) {
9
 	if (!_selected.empty() && _selected.cbegin()->second != FullSelection) {
10
 		const auto [item, selection] = *_selected.cbegin();
10
 		const auto [item, selection] = *_selected.cbegin();
11
 		if (const auto view = item->mainView()) {
11
 		if (const auto view = item->mainView()) {
12
@@ -1391,7 +1391,7 @@ void HistoryInner::mouseActionFinish(
12
@@ -1399,7 +1399,7 @@ void HistoryInner::mouseActionFinish(
13
 				QClipboard::Selection);
13
 				QClipboard::Selection);
14
 		}
14
 		}
15
 	}
15
 	}
(-)./files/patch-Telegram_SourceFiles_history_view_history__view__list__widget.cpp (-3 / +3 lines)
Lines 1-6 Link Here
1
--- Telegram/SourceFiles/history/view/history_view_list_widget.cpp.orig	2019-07-07 13:34:35 UTC
1
--- Telegram/SourceFiles/history/view/history_view_list_widget.cpp.orig	2019-09-06 13:41:43 UTC
2
+++ Telegram/SourceFiles/history/view/history_view_list_widget.cpp
2
+++ Telegram/SourceFiles/history/view/history_view_list_widget.cpp
3
@@ -2042,7 +2042,7 @@ void ListWidget::mouseActionFinish(
3
@@ -2050,7 +2050,7 @@ void ListWidget::mouseActionFinish(
4
 	_mouseSelectType = TextSelectType::Letters;
4
 	_mouseSelectType = TextSelectType::Letters;
5
 	//_widget->noSelectingScroll(); // #TODO select scroll
5
 	//_widget->noSelectingScroll(); // #TODO select scroll
6
 
6
 
Lines 9-15 Link Here
9
 	if (_selectedTextItem
9
 	if (_selectedTextItem
10
 		&& _selectedTextRange.from != _selectedTextRange.to) {
10
 		&& _selectedTextRange.from != _selectedTextRange.to) {
11
 		if (const auto view = viewForItem(_selectedTextItem)) {
11
 		if (const auto view = viewForItem(_selectedTextItem)) {
12
@@ -2051,7 +2051,7 @@ void ListWidget::mouseActionFinish(
12
@@ -2059,7 +2059,7 @@ void ListWidget::mouseActionFinish(
13
 				QClipboard::Selection);
13
 				QClipboard::Selection);
14
 }
14
 }
15
 	}
15
 	}
(-)./files/patch-Telegram_SourceFiles_platform_linux_main__window__linux.cpp (-9 / +9 lines)
Lines 1-6 Link Here
1
--- Telegram/SourceFiles/platform/linux/main_window_linux.cpp.orig	2019-07-07 13:34:35 UTC
1
--- Telegram/SourceFiles/platform/linux/main_window_linux.cpp.orig	2019-09-06 13:41:43 UTC
2
+++ Telegram/SourceFiles/platform/linux/main_window_linux.cpp
2
+++ Telegram/SourceFiles/platform/linux/main_window_linux.cpp
3
@@ -25,7 +25,9 @@ bool noQtTrayIcon = false, tryAppIndicator = false;
3
@@ -26,7 +26,9 @@ bool noQtTrayIcon = false, tryAppIndicator = false;
4
 bool useGtkBase = false, useAppIndicator = false, useStatusIcon = false, trayIconChecked = false, useUnityCount = false;
4
 bool useGtkBase = false, useAppIndicator = false, useStatusIcon = false, trayIconChecked = false, useUnityCount = false;
5
 
5
 
6
 #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION
6
 #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION
Lines 10-16 Link Here
10
 GtkStatusIcon *_trayIcon = 0;
10
 GtkStatusIcon *_trayIcon = 0;
11
 GtkWidget *_trayMenu = 0;
11
 GtkWidget *_trayMenu = 0;
12
 GdkPixbuf *_trayPixbuf = 0;
12
 GdkPixbuf *_trayPixbuf = 0;
13
@@ -291,7 +293,9 @@ void MainWindow::workmodeUpdated(DBIWorkMode mode) {
13
@@ -292,7 +294,9 @@ void MainWindow::workmodeUpdated(DBIWorkMode mode) {
14
 		if (noQtTrayIcon) {
14
 		if (noQtTrayIcon) {
15
 #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION
15
 #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION
16
 			if (useAppIndicator) {
16
 			if (useAppIndicator) {
Lines 20-26 Link Here
20
 			} else if (useStatusIcon) {
20
 			} else if (useStatusIcon) {
21
 				Libs::gtk_status_icon_set_visible(_trayIcon, false);
21
 				Libs::gtk_status_icon_set_visible(_trayIcon, false);
22
 			}
22
 			}
23
@@ -307,7 +311,9 @@ void MainWindow::workmodeUpdated(DBIWorkMode mode) {
23
@@ -308,7 +312,9 @@ void MainWindow::workmodeUpdated(DBIWorkMode mode) {
24
 		if (noQtTrayIcon) {
24
 		if (noQtTrayIcon) {
25
 #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION
25
 #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION
26
 			if (useAppIndicator) {
26
 			if (useAppIndicator) {
Lines 30-36 Link Here
30
 			} else if (useStatusIcon) {
30
 			} else if (useStatusIcon) {
31
 				Libs::gtk_status_icon_set_visible(_trayIcon, true);
31
 				Libs::gtk_status_icon_set_visible(_trayIcon, true);
32
 			}
32
 			}
33
@@ -326,7 +332,9 @@ void MainWindow::psUpdateIndicator() {
33
@@ -327,7 +333,9 @@ void MainWindow::psUpdateIndicator() {
34
 	if (iconFile.exists()) {
34
 	if (iconFile.exists()) {
35
 		QByteArray path = QFile::encodeName(iconFile.absoluteFilePath()), name = QFile::encodeName(iconFile.fileName());
35
 		QByteArray path = QFile::encodeName(iconFile.absoluteFilePath()), name = QFile::encodeName(iconFile.fileName());
36
 		name = name.mid(0, name.size() - 4);
36
 		name = name.mid(0, name.size() - 4);
Lines 40-46 Link Here
40
 	} else {
40
 	} else {
41
 		useAppIndicator = false;
41
 		useAppIndicator = false;
42
 	}
42
 	}
43
@@ -423,11 +431,15 @@ void MainWindow::LibsLoaded() {
43
@@ -424,11 +432,15 @@ void MainWindow::LibsLoaded() {
44
 			&& (Libs::g_object_ref_sink != nullptr)
44
 			&& (Libs::g_object_ref_sink != nullptr)
45
 			&& (Libs::g_object_unref != nullptr);
45
 			&& (Libs::g_object_unref != nullptr);
46
 
46
 
Lines 56-62 Link Here
56
 
56
 
57
 	if (tryAppIndicator && useGtkBase && useAppIndicator) {
57
 	if (tryAppIndicator && useGtkBase && useAppIndicator) {
58
 		noQtTrayIcon = true;
58
 		noQtTrayIcon = true;
59
@@ -463,6 +475,7 @@ void MainWindow::psCreateTrayIcon() {
59
@@ -464,6 +476,7 @@ void MainWindow::psCreateTrayIcon() {
60
 	}
60
 	}
61
 
61
 
62
 #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION
62
 #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION
Lines 64-70 Link Here
64
 	if (useAppIndicator) {
64
 	if (useAppIndicator) {
65
 		DEBUG_LOG(("Trying to create AppIndicator"));
65
 		DEBUG_LOG(("Trying to create AppIndicator"));
66
 		_trayMenu = Libs::gtk_menu_new();
66
 		_trayMenu = Libs::gtk_menu_new();
67
@@ -493,6 +506,7 @@ void MainWindow::psCreateTrayIcon() {
67
@@ -494,6 +507,7 @@ void MainWindow::psCreateTrayIcon() {
68
 			useAppIndicator = false;
68
 			useAppIndicator = false;
69
 		}
69
 		}
70
 	}
70
 	}
Lines 72-78 Link Here
72
 	if (useStatusIcon) {
72
 	if (useStatusIcon) {
73
 		if (Libs::gdk_init_check(0, 0)) {
73
 		if (Libs::gdk_init_check(0, 0)) {
74
 			if (!_trayMenu) _trayMenu = Libs::gtk_menu_new();
74
 			if (!_trayMenu) _trayMenu = Libs::gtk_menu_new();
75
@@ -617,10 +631,12 @@ MainWindow::~MainWindow() {
75
@@ -628,10 +642,12 @@ MainWindow::~MainWindow() {
76
 		Libs::g_object_unref(_trayMenu);
76
 		Libs::g_object_unref(_trayMenu);
77
 		_trayMenu = nullptr;
77
 		_trayMenu = nullptr;
78
 	}
78
 	}
(-)./files/patch-Telegram_SourceFiles_qt__functions.cpp (-2 / +4 lines)
Lines 1-6 Link Here
1
--- Telegram/SourceFiles/qt_functions.cpp.orig	2018-08-05 22:39:05 UTC
1
--- Telegram/SourceFiles/qt_functions.cpp.orig	2019-09-07 21:39:10 UTC
2
+++ Telegram/SourceFiles/qt_functions.cpp
2
+++ Telegram/SourceFiles/qt_functions.cpp
3
@@ -0,0 +1,94 @@
3
@@ -0,0 +1,96 @@
4
+/****************************************************************************
4
+/****************************************************************************
5
+**
5
+**
6
+** Copyright (C) 2015 The Qt Company Ltd.
6
+** Copyright (C) 2015 The Qt Company Ltd.
Lines 33-38 Link Here
33
+** $QT_END_LICENSE$
33
+** $QT_END_LICENSE$
34
+**
34
+**
35
+****************************************************************************/
35
+****************************************************************************/
36
+
37
+#include <private/qtextengine_p.h>
36
+
38
+
37
+/* TODO: find a dynamic library with these symbols. */
39
+/* TODO: find a dynamic library with these symbols. */
38
+
40
+
(-)./files/patch-Telegram_SourceFiles_settings_settings__notifications.cpp (-3 / +3 lines)
Lines 1-6 Link Here
1
--- Telegram/SourceFiles/settings/settings_notifications.cpp.orig	2019-07-07 13:34:35 UTC
1
--- Telegram/SourceFiles/settings/settings_notifications.cpp.orig	2019-09-06 13:41:43 UTC
2
+++ Telegram/SourceFiles/settings/settings_notifications.cpp
2
+++ Telegram/SourceFiles/settings/settings_notifications.cpp
3
@@ -480,11 +480,11 @@ void NotificationsCount::SampleWidget::destroyDelayed(
3
@@ -494,11 +494,11 @@ void NotificationsCount::SampleWidget::destroyDelayed(
4
 	_deleted = true;
4
 	_deleted = true;
5
 
5
 
6
 	// Ubuntu has a lag if deleteLater() called immediately.
6
 	// Ubuntu has a lag if deleteLater() called immediately.
Lines 14-17 Link Here
14
+#endif // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD
14
+#endif // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD
15
 }
15
 }
16
 
16
 
17
 void SetupAdvancedNotifications(not_null<Ui::VerticalLayout*> container) {
17
 void SetupAdvancedNotifications(
(-)./files/patch-Telegram_SourceFiles_ui_text_text.cpp (-2 / +2 lines)
Lines 1-6 Link Here
1
--- Telegram/SourceFiles/ui/text/text.cpp.orig	2019-07-07 13:34:35 UTC
1
--- Telegram/SourceFiles/ui/text/text.cpp.orig	2019-09-06 13:41:43 UTC
2
+++ Telegram/SourceFiles/ui/text/text.cpp
2
+++ Telegram/SourceFiles/ui/text/text.cpp
3
@@ -2016,11 +2016,11 @@ class Renderer { (private)
3
@@ -2018,11 +2018,11 @@ class Renderer { (private)
4
 		if (item == -1)
4
 		if (item == -1)
5
 			return;
5
 			return;
6
 
6
 
(-)./files/patch-Telegram_SourceFiles_ui_text_text__block.cpp (-2 / +2 lines)
Lines 1-6 Link Here
1
--- Telegram/SourceFiles/ui/text/text_block.cpp.orig	2019-07-07 13:34:35 UTC
1
--- Telegram/SourceFiles/ui/text/text_block.cpp.orig	2019-09-06 13:41:43 UTC
2
+++ Telegram/SourceFiles/ui/text/text_block.cpp
2
+++ Telegram/SourceFiles/ui/text/text_block.cpp
3
@@ -335,6 +335,9 @@ TextBlock::TextBlock(const style::font &font, const QS
3
@@ -337,6 +337,9 @@ TextBlock::TextBlock(const style::font &font, const QS
4
 
4
 
5
 		QStackTextEngine engine(part, blockFont->f);
5
 		QStackTextEngine engine(part, blockFont->f);
6
 		BlockParser parser(&engine, this, minResizeWidth, _from, part);
6
 		BlockParser parser(&engine, this, minResizeWidth, _from, part);
(-)./files/patch-Telegram_SourceFiles_window_main__window.cpp (-3 / +3 lines)
Lines 1-6 Link Here
1
--- Telegram/SourceFiles/window/main_window.cpp.orig	2019-07-07 13:34:35 UTC
1
--- Telegram/SourceFiles/window/main_window.cpp.orig	2019-09-06 13:41:43 UTC
2
+++ Telegram/SourceFiles/window/main_window.cpp
2
+++ Telegram/SourceFiles/window/main_window.cpp
3
@@ -565,7 +565,7 @@ bool MainWindow::minimizeToTray() {
3
@@ -564,7 +564,7 @@ bool MainWindow::minimizeToTray() {
4
 }
4
 }
5
 
5
 
6
 void MainWindow::reActivateWindow() {
6
 void MainWindow::reActivateWindow() {
Lines 9-15 Link Here
9
 	const auto reActivate = [=] {
9
 	const auto reActivate = [=] {
10
 		if (const auto w = App::wnd()) {
10
 		if (const auto w = App::wnd()) {
11
 			if (auto f = QApplication::focusWidget()) {
11
 			if (auto f = QApplication::focusWidget()) {
12
@@ -580,7 +580,7 @@ void MainWindow::reActivateWindow() {
12
@@ -579,7 +579,7 @@ void MainWindow::reActivateWindow() {
13
 	};
13
 	};
14
 	crl::on_main(this, reActivate);
14
 	crl::on_main(this, reActivate);
15
 	App::CallDelayed(200, this, reActivate);
15
 	App::CallDelayed(200, this, reActivate);
(-)./files/patch-Telegram_ThirdParty_libtgvoip_VoIPController.cpp (-12 / +1 lines)
Lines 1-16 Link Here
1
--- Telegram/ThirdParty/libtgvoip/VoIPController.cpp.orig	2019-06-24 11:42:33 UTC
1
--- Telegram/ThirdParty/libtgvoip/VoIPController.cpp.orig	2019-07-15 12:59:17 UTC
2
+++ Telegram/ThirdParty/libtgvoip/VoIPController.cpp
2
+++ Telegram/ThirdParty/libtgvoip/VoIPController.cpp
3
@@ -2389,8 +2389,8 @@ simpleAudioBlock random_id:long random_bytes:string ra
4
 					stm->decoder=NULL;
5
 				}else if(stm->type==STREAM_TYPE_VIDEO){
6
 					if(!stm->packetReassembler){
7
-						stm->packetReassembler=make_shared<PacketReassembler>();
8
-						stm->packetReassembler->SetCallback(bind(&VoIPController::ProcessIncomingVideoFrame, this, placeholders::_1, placeholders::_2, placeholders::_3));
9
+						//stm->packetReassembler=make_shared<PacketReassembler>();
10
+						//stm->packetReassembler->SetCallback(bind(&VoIPController::ProcessIncomingVideoFrame, this, placeholders::_1, placeholders::_2, placeholders::_3));
11
 					}
12
 				}else{
13
 					LOGW("Unknown incoming stream type: %d", stm->type);
14
@@ -3048,7 +3048,7 @@ static void initMachTimestart() {
3
@@ -3048,7 +3048,7 @@ static void initMachTimestart() {
15
 #endif
4
 #endif
16
 
5
 
(-)./files/patch-Telegram_gyp_telegram__sources.txt (-3 / +3 lines)
Lines 1-6 Link Here
1
--- Telegram/gyp/telegram_sources.txt.orig	2019-07-07 13:34:35 UTC
1
--- Telegram/gyp/telegram_sources.txt.orig	2019-09-06 13:41:43 UTC
2
+++ Telegram/gyp/telegram_sources.txt
2
+++ Telegram/gyp/telegram_sources.txt
3
@@ -577,8 +577,8 @@
3
@@ -605,8 +605,8 @@
4
 <(src_loc)/platform/linux/linux_libs.h
4
 <(src_loc)/platform/linux/linux_libs.h
5
 <(src_loc)/platform/linux/file_utilities_linux.cpp
5
 <(src_loc)/platform/linux/file_utilities_linux.cpp
6
 <(src_loc)/platform/linux/file_utilities_linux.h
6
 <(src_loc)/platform/linux/file_utilities_linux.h
Lines 11-17 Link Here
11
 <(src_loc)/platform/linux/launcher_linux.cpp
11
 <(src_loc)/platform/linux/launcher_linux.cpp
12
 <(src_loc)/platform/linux/launcher_linux.h
12
 <(src_loc)/platform/linux/launcher_linux.h
13
 <(src_loc)/platform/linux/main_window_linux.cpp
13
 <(src_loc)/platform/linux/main_window_linux.cpp
14
@@ -894,14 +894,7 @@
14
@@ -923,14 +923,7 @@
15
 <(emoji_suggestions_loc)/emoji_suggestions.cpp
15
 <(emoji_suggestions_loc)/emoji_suggestions.cpp
16
 <(emoji_suggestions_loc)/emoji_suggestions.h
16
 <(emoji_suggestions_loc)/emoji_suggestions.h
17
 
17
 
(-)./files/patch-issue6219 (-172 lines)
Lines 1-172 Link Here
1
From 0710dde4d5526454318b2748331e887c01ecfdce Mon Sep 17 00:00:00 2001
2
From: John Preston <johnprestonmail@gmail.com>
3
Date: Tue, 9 Jul 2019 13:43:57 +0200
4
Subject: [PATCH] Use private Qt color API only in official build.
5
6
Fixes #6219.
7
---
8
 .../SourceFiles/ffmpeg/ffmpeg_utility.cpp     | 100 ++++++++++++------
9
 Telegram/gyp/lib_ffmpeg.gyp                   |   6 +-
10
 2 files changed, 71 insertions(+), 35 deletions(-)
11
12
diff --git a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp b/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp
13
index 5d0e50926..3775f7503 100644
14
--- Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp
15
+++ Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp
16
@@ -11,7 +11,10 @@ For license and copyright information please follow this link:
17
 #include "logs.h"
18
 
19
 #include <QImage>
20
+
21
+#ifdef TDESKTOP_OFFICIAL_TARGET
22
 #include <private/qdrawhelper_p.h>
23
+#endif // TDESKTOP_OFFICIAL_TARGET
24
 
25
 extern "C" {
26
 #include <libavutil/opt.h>
27
@@ -44,6 +47,58 @@ void AlignedImageBufferCleanupHandler(void* data) {
28
 		&& !(image.bytesPerLine() % kAlignImageBy);
29
 }
30
 
31
+void UnPremultiplyLine(uchar *dst, const uchar *src, int intsCount) {
32
+#ifdef TDESKTOP_OFFICIAL_TARGET
33
+	const auto layout = &qPixelLayouts[QImage::Format_ARGB32];
34
+	const auto convert = layout->convertFromARGB32PM;
35
+#else // TDESKTOP_OFFICIAL_TARGET
36
+	const auto layout = nullptr;
37
+	const auto convert = [](
38
+			uint *dst,
39
+			const uint *src,
40
+			int count,
41
+			std::nullptr_t,
42
+			std::nullptr_t) {
43
+		for (auto i = 0; i != count; ++i) {
44
+			dst[i] = qUnpremultiply(src[i]);
45
+		}
46
+	};
47
+#endif // TDESKTOP_OFFICIAL_TARGET
48
+
49
+	convert(
50
+		reinterpret_cast<uint*>(dst),
51
+		reinterpret_cast<const uint*>(src),
52
+		intsCount,
53
+		layout,
54
+		nullptr);
55
+}
56
+
57
+void PremultiplyLine(uchar *dst, const uchar *src, int intsCount) {
58
+#ifdef TDESKTOP_OFFICIAL_TARGET
59
+	const auto layout = &qPixelLayouts[QImage::Format_ARGB32];
60
+	const auto convert = layout->convertToARGB32PM;
61
+#else // TDESKTOP_OFFICIAL_TARGET
62
+	const auto layout = nullptr;
63
+	const auto convert = [](
64
+			uint *dst,
65
+			const uint *src,
66
+			int count,
67
+			std::nullptr_t,
68
+			std::nullptr_t) {
69
+		for (auto i = 0; i != count; ++i) {
70
+			dst[i] = qPremultiply(src[i]);
71
+		}
72
+	};
73
+#endif // TDESKTOP_OFFICIAL_TARGET
74
+
75
+	convert(
76
+		reinterpret_cast<uint*>(dst),
77
+		reinterpret_cast<const uint*>(src),
78
+		intsCount,
79
+		layout,
80
+		nullptr);
81
+}
82
+
83
 } // namespace
84
 
85
 IOPointer MakeIOPointer(
86
@@ -360,58 +415,35 @@ void UnPremultiply(QImage &to, const QImage &from) {
87
 	if (!GoodStorageForFrame(to, from.size())) {
88
 		to = CreateFrameStorage(from.size());
89
 	}
90
-
91
-	const auto layout = &qPixelLayouts[QImage::Format_ARGB32];
92
-	const auto convert = layout->convertFromARGB32PM;
93
 	const auto fromPerLine = from.bytesPerLine();
94
 	const auto toPerLine = to.bytesPerLine();
95
 	const auto width = from.width();
96
+	const auto height = from.height();
97
+	auto fromBytes = from.bits();
98
+	auto toBytes = to.bits();
99
 	if (fromPerLine != width * 4 || toPerLine != width * 4) {
100
-		auto fromBytes = from.bits();
101
-		auto toBytes = to.bits();
102
-		for (auto i = 0; i != to.height(); ++i) {
103
-			convert(
104
-				reinterpret_cast<uint*>(toBytes),
105
-				reinterpret_cast<const uint*>(fromBytes),
106
-				width,
107
-				layout,
108
-				nullptr);
109
+		for (auto i = 0; i != height; ++i) {
110
+			UnPremultiplyLine(toBytes, fromBytes, width);
111
 			fromBytes += fromPerLine;
112
 			toBytes += toPerLine;
113
 		}
114
 	} else {
115
-		convert(
116
-			reinterpret_cast<uint*>(to.bits()),
117
-			reinterpret_cast<const uint*>(from.bits()),
118
-			from.width() * from.height(),
119
-			layout,
120
-			nullptr);
121
+		UnPremultiplyLine(toBytes, fromBytes, width * height);
122
 	}
123
 }
124
 
125
 void PremultiplyInplace(QImage &image) {
126
-	const auto layout = &qPixelLayouts[QImage::Format_ARGB32];
127
-	const auto convert = layout->convertToARGB32PM;
128
 	const auto perLine = image.bytesPerLine();
129
 	const auto width = image.width();
130
+	const auto height = image.height();
131
+	auto bytes = image.bits();
132
 	if (perLine != width * 4) {
133
-		auto bytes = image.bits();
134
-		for (auto i = 0; i != image.height(); ++i) {
135
-			convert(
136
-				reinterpret_cast<uint*>(bytes),
137
-				reinterpret_cast<const uint*>(bytes),
138
-				width,
139
-				layout,
140
-				nullptr);
141
+		for (auto i = 0; i != height; ++i) {
142
+			PremultiplyLine(bytes, bytes, width);
143
 			bytes += perLine;
144
 		}
145
 	} else {
146
-		convert(
147
-			reinterpret_cast<uint*>(image.bits()),
148
-			reinterpret_cast<const uint*>(image.bits()),
149
-			image.width() * image.height(),
150
-			layout,
151
-			nullptr);
152
+		PremultiplyLine(bytes, bytes, width * height);
153
 	}
154
 }
155
 
156
diff --git a/Telegram/gyp/lib_ffmpeg.gyp b/Telegram/gyp/lib_ffmpeg.gyp
157
index 9971d76ae..b9ada5362 100644
158
--- Telegram/gyp/lib_ffmpeg.gyp
159
+++ Telegram/gyp/lib_ffmpeg.gyp
160
@@ -46,7 +46,11 @@
161
       '<(src_loc)/ffmpeg/ffmpeg_utility.cpp',
162
       '<(src_loc)/ffmpeg/ffmpeg_utility.h',
163
     ],
164
-    'conditions': [[ 'build_macold', {
165
+    'conditions': [[ '"<(official_build_target)" != ""', {
166
+      'defines': [
167
+        'TDESKTOP_OFFICIAL_TARGET=<(official_build_target)',
168
+      ],
169
+    }], [ 'build_macold', {
170
       'xcode_settings': {
171
         'OTHER_CPLUSPLUSFLAGS': [ '-nostdinc++' ],
172
       },

Return to bug 240401