added missing comment

This commit is contained in:
csoler 2023-08-31 23:18:06 +02:00
parent 811b3b3658
commit d80951cd53

View File

@ -74,8 +74,12 @@ AppearancePage::AppearancePage(QWidget * parent, Qt::WindowFlags flags)
foreach (QString code, LanguageSupport::languageCodes()) {
ui.cmboLanguage->addItem(FilesDefs::getIconFromQtResourcePath(":/images/flags/" + code + ".png"), LanguageSupport::languageName(code), code);
}
foreach (QString style, QStyleFactory::keys()) {
if(style.toLower() != "gtk2" || (getenv("QT_QPA_PLATFORMTHEME")!=nullptr && !strcmp(getenv("QT_QPA_PLATFORMTHEME"),"gtk2"))) // make sure that if style is gtk2, the system has the correct environment variable set.
// Note: apparently, on some linux systems (e.g. Debian 11), the gtk2 style makes Qt libs crash when the environment variable is not set.
// So we first check that it's here before start.
foreach (QString style, QStyleFactory::keys()) {
if(style.toLower() != "gtk2" || (getenv("QT_QPA_PLATFORMTHEME")!=nullptr && !strcmp(getenv("QT_QPA_PLATFORMTHEME"),"gtk2")))
ui.cmboStyle->addItem(style, style.toLower());
}