Fix building without spellcheck Upcoming changes to tdesktop include language recognition, which is a bit of a doozy, and as is tradition, "unusual" compilation flags go untested. Regular builds would always return false here, anyway, as linux isn't a priority with these things. /var/tmp/portage/net-im/telegram-desktop-4.3.4/work/tdesktop-4.3.4-full/Telegram/SourceFiles/boxes/translate_box.cpp:18:10: fatal error: spellcheck/platform/platform_language.h: No such file or directory 18 | #include "spellcheck/platform/platform_language.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. --- tdesktop-4.3.4-full.orig/Telegram/SourceFiles/boxes/translate_box.cpp +++ tdesktop-4.3.4-full/Telegram/SourceFiles/boxes/translate_box.cpp @@ -15,7 +15,9 @@ #include "main/main_session.h" #include "mtproto/sender.h" #include "settings/settings_common.h" +#ifndef TDESKTOP_DISABLE_SPELLCHECK #include "spellcheck/platform/platform_language.h" +#endif #include "ui/effects/loading_element.h" #include "ui/layers/generic_box.h" #include "ui/widgets/buttons.h" @@ -331,6 +333,7 @@ if (!hasLetters) { return true; } +#ifndef TDESKTOP_DISABLE_SPELLCHECK const auto result = Platform::Language::Recognize(text); if (result.unknown) { return false; @@ -343,6 +346,9 @@ ? QLocale::English : settingsLang; return (result.locale.language() == skip); +#else + return false; +#endif } } // namespace Ui