Use Launcher::initHook on Linux

This commit is contained in:
Ilya Fedin 2020-10-28 18:15:43 +04:00 committed by John Preston
parent 9b99bb172a
commit bbc59c1a99
3 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -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 <QtWidgets/QApplication>
#include <sys/stat.h>
#include <sys/types.h>
#include <cstdlib>
@ -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;

View File

@ -16,6 +16,7 @@ public:
Launcher(int argc, char *argv[]);
private:
void initHook() override;
bool launchUpdater(UpdaterLaunch action) override;
};