mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
deprecate the gender property from the protocol entirely (#4496)
* deprecate the gender property from the protocol entirely * use obsolete instead of deprecated * add the database migration * update internal database version as well
This commit is contained in:
parent
86881bbbc3
commit
07e6aadbbe
24 changed files with 25 additions and 170 deletions
|
|
@ -78,25 +78,6 @@ QPixmap PingPixmapGenerator::generatePixmap(int size, int value, int max)
|
|||
|
||||
QMap<int, QPixmap> PingPixmapGenerator::pmCache;
|
||||
|
||||
QPixmap GenderPixmapGenerator::generatePixmap(int height)
|
||||
{
|
||||
ServerInfo_User::Gender gender = ServerInfo_User::GenderUnknown;
|
||||
|
||||
int key = gender * 100000 + height;
|
||||
if (pmCache.contains(key))
|
||||
return pmCache.value(key);
|
||||
|
||||
QString genderStr;
|
||||
genderStr = "unknown";
|
||||
|
||||
QPixmap pixmap =
|
||||
QPixmap("theme:genders/" + genderStr).scaled(height, height, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
pmCache.insert(key, pixmap);
|
||||
return pixmap;
|
||||
}
|
||||
|
||||
QMap<int, QPixmap> GenderPixmapGenerator::pmCache;
|
||||
|
||||
QPixmap CountryPixmapGenerator::generatePixmap(int height, const QString &countryCode)
|
||||
{
|
||||
if (countryCode.size() != 2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue