mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-18 04:14:28 -05: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,6 +75,7 @@ AppearancePage::AppearancePage(QWidget * parent, Qt::WindowFlags flags)
|
|||||||
ui.cmboLanguage->addItem(FilesDefs::getIconFromQtResourcePath(":/images/flags/" + code + ".png"), LanguageSupport::languageName(code), code);
|
ui.cmboLanguage->addItem(FilesDefs::getIconFromQtResourcePath(":/images/flags/" + code + ".png"), LanguageSupport::languageName(code), code);
|
||||||
}
|
}
|
||||||
foreach (QString style, QStyleFactory::keys()) {
|
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());
|
ui.cmboStyle->addItem(style, style.toLower());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user