Address a CR comment.

This commit is contained in:
Roxanne Skelly 2019-04-02 17:25:00 -07:00
parent 959b8bfbed
commit ac97a82bad

View file

@ -108,22 +108,20 @@ bool OctreeEntitiesFileParser::parseEntities(QVariantMap& parsedEntities) {
return false;
}
if (idString == "{00000000-0000-0000-0000-000000000000}") {
// some older archives may have a null string id, so
// return success without setting parsedEntities,
// which will result in a new uuid for the restored
// archive. (not parsing and using isNull as parsing
// results in null if there is a corrupt string)
return true;
}
// some older archives may have a null string id, so
// return success without setting parsedEntities,
// which will result in a new uuid for the restored
// archive. (not parsing and using isNull as parsing
// results in null if there is a corrupt string)
QUuid idValue = QUuid::fromString(QLatin1String(idString.c_str()) );
if (idValue.isNull()) {
_errorString = "Id value invalid UUID string: " + idString;
return false;
if (idString != "{00000000-0000-0000-0000-000000000000}") {
QUuid idValue = QUuid::fromString(QLatin1String(idString.c_str()) );
if (idValue.isNull()) {
_errorString = "Id value invalid UUID string: " + idString;
return false;
}
parsedEntities["Id"] = idValue;
}
parsedEntities["Id"] = idValue;
} else if (key == "Version") {
if (gotVersion) {
_errorString = "Duplicate Version entries";