mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
attempt at fixing crash with gtk2 style when the proper environment variable is not set
This commit is contained in:
parent
eeacb4500d
commit
fd9f31987d
@ -75,7 +75,8 @@ AppearancePage::AppearancePage(QWidget * parent, Qt::WindowFlags flags)
|
||||
ui.cmboLanguage->addItem(FilesDefs::getIconFromQtResourcePath(":/images/flags/" + code + ".png"), LanguageSupport::languageName(code), code);
|
||||
}
|
||||
foreach (QString style, QStyleFactory::keys()) {
|
||||
ui.cmboStyle->addItem(style, style.toLower());
|
||||
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.
|
||||
ui.cmboStyle->addItem(style, style.toLower());
|
||||
}
|
||||
|
||||
QMap<QString, QString> styleSheets;
|
||||
|
Loading…
Reference in New Issue
Block a user