From c9c0d74b68ab2cddd9a0613d16508ca8d9006c26 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 9 Sep 2019 17:47:05 +0300 Subject: [PATCH] Fix build for Linux. --- Telegram/SourceFiles/platform/linux/linux_libs.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/linux_libs.cpp b/Telegram/SourceFiles/platform/linux/linux_libs.cpp index f799ca391f..5071d63d18 100644 --- a/Telegram/SourceFiles/platform/linux/linux_libs.cpp +++ b/Telegram/SourceFiles/platform/linux/linux_libs.cpp @@ -11,6 +11,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "platform/linux/linux_libnotify.h" #include "platform/linux/linux_desktop_environment.h" +#include + namespace Platform { namespace Libs { namespace { @@ -106,10 +108,10 @@ bool setupGtkBase(QLibrary &lib_gtk) { // Otherwise we get segfault in Ubuntu 17.04 in gtk_init_check() call. // See https://github.com/telegramdesktop/tdesktop/issues/3176 // See https://github.com/telegramdesktop/tdesktop/issues/3162 - if(QApplication::platformName().startsWith(qsl("wayland"), Qt::CaseInsensitive)) { + if(QGuiApplication::platformName().startsWith(qsl("wayland"), Qt::CaseInsensitive)) { DEBUG_LOG(("Limit allowed GDK backends to wayland")); gdk_set_allowed_backends("wayland"); - } else if (QApplication::platformName() == qsl("xcb")) { + } else if (QGuiApplication::platformName() == qsl("xcb")) { DEBUG_LOG(("Limit allowed GDK backends to x11")); gdk_set_allowed_backends("x11"); } @@ -233,7 +235,7 @@ void start() { bool gtkLoaded = false; bool indicatorLoaded = false; - bool isWayland = QApplication::platformName().startsWith(qsl("wayland"), Qt::CaseInsensitive); + bool isWayland = QGuiApplication::platformName().startsWith(qsl("wayland"), Qt::CaseInsensitive); QLibrary lib_gtk, lib_indicator; if (loadLibrary(lib_indicator, "ayatana-appindicator3", 1) || loadLibrary(lib_indicator, "appindicator3", 1)) { if (loadLibrary(lib_gtk, "gtk-3", 0)) {