Skip to content

Commit

Permalink
fix compile error with older Qt 5.9
Browse files Browse the repository at this point in the history
  • Loading branch information
EtlamGit committed Nov 21, 2023
1 parent dc058dc commit 60fc521
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions minutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -906,15 +906,15 @@ void Minutor::updatePlayerCache(QNetworkReply * reply) {
if (reply->request().url().toString().contains("sessionserver.mojang.com")) {
QJsonDocument json = QJsonDocument::fromJson(response);
if (!json.isEmpty() && json.object().contains("name")) {
QString playerName = json["name"].toString();
QString playerName = json.object().value("name").toString();
// reconstruct player UUID
QString playerUUID = pendingNetworkAccess[reply];
// store in player cache
QSettings settings;
settings.setValue("PlayerCache/"+playerUUID+"/name", playerName);

// get URL to skin texture
QString value = json["properties"][0]["value"].toString();
QString value = json.object().value("properties").toArray()[0].toObject().value("value").toString();
QJsonDocument vjson = QJsonDocument::fromJson(QByteArray::fromBase64(value.toUtf8()));
if (!vjson.isEmpty()) {
QString url = vjson.object()["textures"].toObject()["SKIN"].toObject()["url"].toString();
Expand Down

0 comments on commit 60fc521

Please sign in to comment.