mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Show fallback icon on missing country flag icon
If a country flag icon does not exist, we now display the globe icon, which is being used for the continents as well. This will vertically align the country name with the others that have an icon.
This commit is contained in:
parent
1be562fefb
commit
95c7b5e39c
@ -435,8 +435,13 @@ QVariant ServerItem::data(int column, int role) const {
|
||||
return loadIcon(QLatin1String("skin:emblems/emblem-favorite.svg"));
|
||||
else if (itType == LANType)
|
||||
return loadIcon(QLatin1String("skin:places/network-workgroup.svg"));
|
||||
else if (! qsCountryCode.isEmpty())
|
||||
return loadIcon(QString::fromLatin1(":/flags/%1.svg").arg(qsCountryCode));
|
||||
else if (! qsCountryCode.isEmpty()) {
|
||||
QString flag = QString::fromLatin1(":/flags/%1.svg").arg(qsCountryCode);
|
||||
if (!QFileInfo::exists(flag)) {
|
||||
flag = QLatin1String("skin:categories/applications-internet.svg");
|
||||
}
|
||||
return loadIcon(flag);
|
||||
}
|
||||
else
|
||||
return loadIcon(QLatin1String("skin:categories/applications-internet.svg"));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user