mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-12 01:09:26 -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
1 changed files with 2 additions and 1 deletions
|
@ -75,6 +75,7 @@ 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()) {
|
||||
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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue