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

Replace QT's JSON library with nlohmann's JSON library #1562

Draft
wants to merge 34 commits into
base: develop
Choose a base branch
from

Conversation

Sightem
Copy link

@Sightem Sightem commented Feb 26, 2023

This pull request replaces the usage of QT's JSON library with nlohmann's JSON library in order to improve code readability and maintainability. QT's JSON library syntax can be unintuitive and make code difficult to understand, whereas nlohmann's JSON library provides a more straightforward and easy-to-use syntax

Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
launcher/meta/BaseEntity.cpp Outdated Show resolved Hide resolved
launcher/meta/BaseEntity.cpp Outdated Show resolved Hide resolved
@xslendix
Copy link
Contributor

You should not keep unused code commented. Makes the code harder to read and it's no longer needed. Just delete it.

@Sightem
Copy link
Author

Sightem commented Feb 27, 2023

You should not keep unused code commented. Makes the code harder to read and it's no longer needed. Just delete it.

They're temporary, nvim's git integration plugin sucks and sometimes breaks when I wanna view the changes, they will be removed once I finish thoroughly testing the changes

Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
Currently not compilable

Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
- Switched to .get<std::string>.c_str() instead of fromStdString() as it proved to be drastically faster at scale.
- Improved some inconsistencies I came across.

Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
currently compilable

Signed-off-by: sightem <sightem@national.shitposting.agency>
- also fixed mod downloader

Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
- Ironed out some bugs having to do with metadata generation
- Removed some unused includes

Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
- I did some small refactors also

Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
i hate mac

Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
Signed-off-by: sightem <sightem@national.shitposting.agency>
@binex-dsk
Copy link
Collaborator

QT's JSON library syntax can be unintuitive and make code difficult to understand

Seems quite intuitive to me. You just insert stuff.

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.

None yet

3 participants