mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-23 04:00:06 +00:00
Attempt to fix build
This commit is contained in:
@@ -504,13 +504,13 @@ void AuthContext::checkResult() {
|
|||||||
namespace {
|
namespace {
|
||||||
bool parseMinecraftProfileFromJSON(QJsonObject & obj, MinecraftProfile &output)
|
bool parseMinecraftProfileFromJSON(QJsonObject & obj, MinecraftProfile &output)
|
||||||
{
|
{
|
||||||
if(!getString(obj.value("id"), output.id))
|
if(!Parsers::getString(obj.value("id"), output.id))
|
||||||
{
|
{
|
||||||
qWarning() << "Minecraft profile id is not a string";
|
qWarning() << "Minecraft profile id is not a string";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!getString(obj.value("name"), output.name)) {
|
if(!Parsers::getString(obj.value("name"), output.name)) {
|
||||||
qWarning() << "Minecraft profile name is not a string";
|
qWarning() << "Minecraft profile name is not a string";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -519,20 +519,20 @@ bool parseMinecraftProfileFromJSON(QJsonObject & obj, MinecraftProfile &output)
|
|||||||
for(auto skin: skinsArray) {
|
for(auto skin: skinsArray) {
|
||||||
auto skinObj = skin.toObject();
|
auto skinObj = skin.toObject();
|
||||||
Skin skinOut;
|
Skin skinOut;
|
||||||
if(!getString(skinObj.value("id"), skinOut.id)) {
|
if(!Parsers::getString(skinObj.value("id"), skinOut.id)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
QString state;
|
QString state;
|
||||||
if(!getString(skinObj.value("state"), state)) {
|
if(!Parsers::getString(skinObj.value("state"), state)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(state != "ACTIVE") {
|
if(state != "ACTIVE") {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(!getString(skinObj.value("url"), skinOut.url)) {
|
if(!Parsers::getString(skinObj.value("url"), skinOut.url)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(!getString(skinObj.value("variant"), skinOut.variant)) {
|
if(!Parsers::getString(skinObj.value("variant"), skinOut.variant)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// we deal with only the active skin
|
// we deal with only the active skin
|
||||||
@@ -545,20 +545,20 @@ bool parseMinecraftProfileFromJSON(QJsonObject & obj, MinecraftProfile &output)
|
|||||||
for(auto cape: capesArray) {
|
for(auto cape: capesArray) {
|
||||||
auto capeObj = cape.toObject();
|
auto capeObj = cape.toObject();
|
||||||
Cape capeOut;
|
Cape capeOut;
|
||||||
if(!getString(capeObj.value("id"), capeOut.id)) {
|
if(!Parsers::getString(capeObj.value("id"), capeOut.id)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
QString state;
|
QString state;
|
||||||
if(!getString(capeObj.value("state"), state)) {
|
if(!Parsers::getString(capeObj.value("state"), state)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(state == "ACTIVE") {
|
if(state == "ACTIVE") {
|
||||||
currentCape = capeOut.id;
|
currentCape = capeOut.id;
|
||||||
}
|
}
|
||||||
if(!getString(capeObj.value("url"), capeOut.url)) {
|
if(!Parsers::getString(capeObj.value("url"), capeOut.url)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(!getString(capeObj.value("alias"), capeOut.alias)) {
|
if(!Parsers::getString(capeObj.value("alias"), capeOut.alias)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user