From b66f32fe9ec810de7024e62ee0aa45b04c9709fe Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 28 Sep 2018 15:50:47 +0300 Subject: [PATCH] Version 1.4.0: Fix build for old OS X versions. --- Telegram/SourceFiles/base/bytes.h | 1 + Telegram/SourceFiles/export/export_pch.h | 4 ++++ Telegram/SourceFiles/platform/mac/specific_mac_p.mm | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/Telegram/SourceFiles/base/bytes.h b/Telegram/SourceFiles/base/bytes.h index 4606a2d3fc..9b062f1ce7 100644 --- a/Telegram/SourceFiles/base/bytes.h +++ b/Telegram/SourceFiles/base/bytes.h @@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once +#include "base/basic_types.h" #include #include diff --git a/Telegram/SourceFiles/export/export_pch.h b/Telegram/SourceFiles/export/export_pch.h index 8c420524a2..475eb75d6b 100644 --- a/Telegram/SourceFiles/export/export_pch.h +++ b/Telegram/SourceFiles/export/export_pch.h @@ -17,6 +17,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include +#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) +#define OS_MAC_OLD +#endif // QT_VERSION < 5.5.0 + #include #include diff --git a/Telegram/SourceFiles/platform/mac/specific_mac_p.mm b/Telegram/SourceFiles/platform/mac/specific_mac_p.mm index ba43a3e6c0..d671775efc 100644 --- a/Telegram/SourceFiles/platform/mac/specific_mac_p.mm +++ b/Telegram/SourceFiles/platform/mac/specific_mac_p.mm @@ -121,7 +121,11 @@ ApplicationDelegate *_sharedDelegate = nil; }); #ifndef OS_MAC_STORE if ([SPMediaKeyTap usesGlobalMediaKeyTap]) { +#ifndef OS_MAC_OLD if (QSysInfo::macVersion() < Q_MV_OSX(10, 14)) { +#else // OS_MAC_OLD + if (true) { +#endif // OS_MAC_OLD _keyTap = [[SPMediaKeyTap alloc] initWithDelegate:self]; } else { // In macOS Mojave it requires accessibility features.