mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 17:44:01 -07:00
Small fixes.
This commit is contained in:
parent
4e31384ff1
commit
2867fbabe6
3 changed files with 9 additions and 2 deletions
|
|
@ -27,6 +27,13 @@ void ArchidektApiResponseDeckListingContainer::fromJson(const QJsonObject &json)
|
||||||
// tags = {""};
|
// tags = {""};
|
||||||
parentFolderId = json.value("parentFolderId").toInt();
|
parentFolderId = json.value("parentFolderId").toInt();
|
||||||
owner.fromJson(json.value("owner").toObject());
|
owner.fromJson(json.value("owner").toObject());
|
||||||
|
|
||||||
|
auto colorsJson = json.value("colors").toObject();
|
||||||
|
|
||||||
|
for (auto color : colorsJson.keys()) {
|
||||||
|
colors[color] = colorsJson[color].toInt();
|
||||||
|
}
|
||||||
|
|
||||||
cardPackage = json.value("cardPackage").toString();
|
cardPackage = json.value("cardPackage").toString();
|
||||||
contest = json.value("contest").toString();
|
contest = json.value("contest").toString();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
void ArchidektApiResponseDeckOwner::fromJson(const QJsonObject &json)
|
void ArchidektApiResponseDeckOwner::fromJson(const QJsonObject &json)
|
||||||
{
|
{
|
||||||
id = json.value("id").toInt();
|
id = json.value("id").toInt();
|
||||||
userName = json.value("userName").toString();
|
userName = json.value("username").toString();
|
||||||
avatar = QUrl(json.value("avatar").toString());
|
avatar = QUrl(json.value("avatar").toString());
|
||||||
moderator = json.value("moderator").toBool();
|
moderator = json.value("moderator").toBool();
|
||||||
pledgeLevel = json.value("pledgeLevel").toInt();
|
pledgeLevel = json.value("pledgeLevel").toInt();
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ public:
|
||||||
// Debug method for logging
|
// Debug method for logging
|
||||||
void debugPrint() const;
|
void debugPrint() const;
|
||||||
|
|
||||||
QString getName() const
|
[[nodiscard]] QString getName() const
|
||||||
{
|
{
|
||||||
return userName;
|
return userName;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue