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

feat: add option to import OBK *.json layout file #355

Merged
merged 1 commit into from
Nov 5, 2023
Merged

feat: add option to import OBK *.json layout file #355

merged 1 commit into from
Nov 5, 2023

Conversation

NabilSnigdho
Copy link

@NabilSnigdho NabilSnigdho commented Oct 29, 2023

As suggested in #345, this adds option to import OBK *.json layout file.
Support for version 1 layout format is not added.

if (QJsonDocument::fromJson(jsonFile.readAll()).object()
.value("info").toObject()
.value("version").toString() != "2") {
return UnsupportedLayout;
Copy link
Member

Choose a reason for hiding this comment

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

How about using the LayoutConverter::convertLayoutFormat() function here to perform the conversion if we detect an old layout version (version 1)?

Copy link
Author

Choose a reason for hiding this comment

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

I wasn't sure if the old version had the same schema, it turns out it had, just updated the code to handle version 1.

@mominul
Copy link
Member

mominul commented Nov 2, 2023

Thanks a lot, @NabilSnigdho! ❤️ I have made a comment, please address that 😄

@mominul mominul merged commit 7586ea9 into OpenBangla:develop Nov 5, 2023
2 checks passed
@mominul
Copy link
Member

mominul commented Nov 5, 2023

Thanks again! ❤️

@NabilSnigdho NabilSnigdho deleted the develop branch November 5, 2023 18:10
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