From ab13d9bdaf249fe37d7cb045d76b244816b5ee92 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Wed, 3 Jun 2020 08:25:42 +0400 Subject: [PATCH] Skip empty parts in QT_QPA_PLATFORMTHEME --- Telegram/SourceFiles/platform/linux/specific_linux.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp index ab1da74c64..074a493f24 100644 --- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp @@ -298,7 +298,9 @@ bool IsStaticBinary() { bool IsGtkIntegrationForced() { #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION static const auto Result = [&] { - const auto platformThemes = QString::fromUtf8(qgetenv("QT_QPA_PLATFORMTHEME")).split(':'); + const auto platformThemes = QString::fromUtf8(qgetenv("QT_QPA_PLATFORMTHEME")) + .split(':', QString::SkipEmptyParts); + return platformThemes.contains(qstr("gtk3"), Qt::CaseInsensitive) || platformThemes.contains(qstr("gtk2"), Qt::CaseInsensitive); }();