mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:44:01 +02:00
fix change of keypath after handling array index
This commit is contained in:
parent
b55889597d
commit
31c067cac5
1 changed files with 6 additions and 1 deletions
|
@ -189,7 +189,12 @@ QVariantMap JSONBreakableMarshal::fromStringList(const QStringList& stringList)
|
|||
currentValue = ¤tList[arrayIndex];
|
||||
|
||||
// update the keypath by bumping past the array index
|
||||
keypath = keypath.mid(keypath.indexOf(']'));
|
||||
keypath = keypath.mid(keypath.indexOf(']') + 1);
|
||||
|
||||
// check if there is a key after the array index - if so push the keypath forward by a char
|
||||
if (keypath.startsWith(".")) {
|
||||
keypath = keypath.mid(1);
|
||||
}
|
||||
} else {
|
||||
qDebug() << "Failed to convert array index from keypath" << keypath << "to int. Will not add"
|
||||
<< "value to resulting QJsonObject.";
|
||||
|
|
Loading…
Reference in a new issue