Skip empty parts in QT_QPA_PLATFORMTHEME

This commit is contained in:
Ilya Fedin 2020-06-03 08:25:42 +04:00 committed by John Preston
parent 0165e31ca7
commit ab13d9bdaf
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}();