From bbc59c1a999dd753a11c4c8fd4f42f853c77aadc Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Wed, 28 Oct 2020 18:15:43 +0400 Subject: [PATCH] Use Launcher::initHook on Linux --- Telegram/SourceFiles/core/launcher.cpp | 4 ---- Telegram/SourceFiles/platform/linux/launcher_linux.cpp | 7 +++++++ Telegram/SourceFiles/platform/linux/launcher_linux.h | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/core/launcher.cpp b/Telegram/SourceFiles/core/launcher.cpp index 28271acd9f..aa50e19a29 100644 --- a/Telegram/SourceFiles/core/launcher.cpp +++ b/Telegram/SourceFiles/core/launcher.cpp @@ -301,10 +301,6 @@ void Launcher::init() { QApplication::setApplicationName(qsl("TelegramDesktop")); -#if defined Q_OS_UNIX && !defined Q_OS_MAC && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) - QApplication::setDesktopFileName(Platform::GetLauncherFilename()); -#endif - #ifndef OS_MAC_OLD QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true); #endif // OS_MAC_OLD diff --git a/Telegram/SourceFiles/platform/linux/launcher_linux.cpp b/Telegram/SourceFiles/platform/linux/launcher_linux.cpp index 1d948fd192..0a21a18415 100644 --- a/Telegram/SourceFiles/platform/linux/launcher_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/launcher_linux.cpp @@ -8,9 +8,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "platform/linux/launcher_linux.h" #include "base/platform/base_platform_info.h" +#include "platform/linux/specific_linux.h" #include "core/crash_reports.h" #include "core/update_checker.h" +#include + #include #include #include @@ -46,6 +49,10 @@ Launcher::Launcher(int argc, char *argv[]) : Core::Launcher(argc, argv, DeviceModelPretty(), SystemVersionPretty()) { } +void Launcher::initHook() { + QApplication::setDesktopFileName(GetLauncherFilename()); +} + bool Launcher::launchUpdater(UpdaterLaunch action) { if (cExeName().isEmpty()) { return false; diff --git a/Telegram/SourceFiles/platform/linux/launcher_linux.h b/Telegram/SourceFiles/platform/linux/launcher_linux.h index 0b7dea1318..188b1b6e6d 100644 --- a/Telegram/SourceFiles/platform/linux/launcher_linux.h +++ b/Telegram/SourceFiles/platform/linux/launcher_linux.h @@ -16,6 +16,7 @@ public: Launcher(int argc, char *argv[]); private: + void initHook() override; bool launchUpdater(UpdaterLaunch action) override; };