Merge pull request #1381 from ZeldaZach/flags_to_lower

Country to lower (fix win bug)
This commit is contained in:
ctrlaltca 2015-08-22 11:53:22 +02:00
commit 18ec8e20b6
3 changed files with 2 additions and 4 deletions

View file

@ -35,7 +35,7 @@ DlgEditUser::DlgEditUser(QWidget *parent, QString email, int gender, QString cou
foreach(QString c, countries)
{
countryEdit->addItem(QPixmap(":/resources/countries/" + c + ".svg"), c);
if(c == country)
if (c == country)
countryEdit->setCurrentIndex(i);
++i;

View file

@ -62,9 +62,7 @@ DlgRegister::DlgRegister(QWidget *parent)
countryEdit->setCurrentIndex(0);
QStringList countries = settingsCache->getCountries();
foreach(QString c, countries)
{
countryEdit->addItem(QPixmap(":/resources/countries/" + c + ".svg"), c);
}
realnameLabel = new QLabel(tr("Real name:"));
realnameEdit = new QLineEdit();

View file

@ -119,7 +119,7 @@ QPixmap CountryPixmapGenerator::generatePixmap(int height, const QString &countr
if (pmCache.contains(key))
return pmCache.value(key);
QSvgRenderer svg(QString(":/resources/countries/" + countryCode + ".svg"));
QSvgRenderer svg(QString(":/resources/countries/" + countryCode.toLower() + ".svg"));
int width = (int) round(height * (double) svg.defaultSize().width() / (double) svg.defaultSize().height());
QPixmap pixmap(width, height);
pixmap.fill(Qt::transparent);