Skip to content
Permalink
Browse files

Merge PR #2793: Show fallback icon on missing country flag icon

  • Loading branch information...
mkrautz committed Feb 3, 2017
2 parents 4886268 + 95c7b5e commit d871f34f4941930ad9f05c78549774131428e600
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/mumble/ConnectDialog.cpp
@@ -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"));
}

0 comments on commit d871f34

Please sign in to comment.
You can’t perform that action at this time.