Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix json loading in gui #222

Merged
merged 1 commit into from
Nov 29, 2024
Merged

fix: Fix json loading in gui #222

merged 1 commit into from
Nov 29, 2024

Conversation

narnaud
Copy link
Member

@narnaud narnaud commented Nov 19, 2024

The loading was working to be able to use the JsonDocument API, but it
didn't work in the GUI to display the file.

This is fixed, and we update the underlying json model after each save.

The loading was working to be able to use the JsonDocument API, but it
didn't work in the GUI to display the file.

This is fixed, and we update the underlying json model after each save.
Copy link
Collaborator

@LeonMatthesKDAB LeonMatthesKDAB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this fixes the problem that JSON documents aren't loading at all.

However, I want to point out that this is still not bug-free!
If I see it correctly, editing the document in Knuts text view won't update the m_jsonData.
These changes therefore won't be reflected in the ::value/::hasValue calls.
::setValue will also override any changes to the document that weren't saved.

Overall, the JsonDocument still needs some more work, but this is moving in the right direction.

@narnaud
Copy link
Member Author

narnaud commented Nov 29, 2024

I agree with you, there is still an issue syncing both representation of the json file.
I fixed the most pressing issue, but for now you can't mix'n match JsonDocument API and TextDocument API.
I've create #226 .

@narnaud narnaud merged commit 0168c1d into KDAB:main Nov 29, 2024
5 checks passed
@narnaud narnaud deleted the fix-json branch November 29, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants