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:
ebbit1q 2021-12-14 07:51:57 +01:00 committed by GitHub
parent 86881bbbc3
commit 07e6aadbbe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 25 additions and 170 deletions

View file

@ -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)