Repository navigation
Read all node and group ids from JSON as 64-bit numbers - #557
Merged
Merged
Conversation
Scene load, group restore and DataFlowGraphModel::loadNode still used QJsonValue::toInt(). It returns the default value for a number above the int range, so an id of 2^31 or more was lost. Use jsonValueToUInt32(), as the undo commands do.
Without the previous change, the group is not restored and the DataFlowGraphModel does not contain the loaded nodes.
paceholder
force-pushed
the
fix-id-json-reads
branch
from
November 23, 2026 10:07
cc0651d to
8e2d742
Compare
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
Description
Follow-up to #556 (the branch
fix-delete-node-id; this PR is based on it, so the diff shows only the new commits until #556 is merged).QJsonValue::toInt()returns 0 for a number above the int range, so a node or group id of 2^31 or more was lost. #556 fixed the undo commands and the connection ids. This PR fixes the remaining reads:BasicGraphicsScene:jsonValueToNodeId, the node lookup and the old id inloadItems(), and the node ids of a group inrestoreGroup()DataFlowGraphicsScene:jsonValueToGroupIdand the node ids of a group on loadDataFlowGraphModel::loadNodeAll of them now use
jsonValueToUInt32(). No id read usestoInt()any more. The last commit adds one line toAGENTS.mdfor this rule.Commits, each builds and passes on its own:
Read the remaining node and group ids from JSON as 64-bit numbersTest that scene load and group restore keep node ids above the int range. Both tests fail on the source before commit 1: the group is not restored, andDataFlowGraphModel::loaddoes not contain the nodes.Document how to read ids from JSONThe two reads in
DataFlowGraphicsScene::load()have no test, because that function opens a file dialog.Testing
Breaking changes?
No. Ids below 2^31 are read as before. Ids that were lost before are now kept.
Related issue
Follow-up to #556. Related: #554