8000 Unit test for model/StrokeStyle and refactor by jhilmer · Pull Request #4702 · xournalpp/xournalpp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Unit test for model/StrokeStyle and refactor #4702

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

Merged
merged 17 commits into from
Mar 21, 2023

Conversation

jhilmer
Copy link
Contributor
@jhilmer jhilmer commented Mar 8, 2023

Tried to first put existing code under unit test and then refactor to use e.g. map, vector, sstring e.g. instead of mix of glib function and new/delete to allocate dynamic arrays.

@jhilmer jhilmer force-pushed the strokestyle-under-test branch from 68fb05c to ef2f076 Compare March 10, 2023 07:17
@jhilmer jhilmer force-pushed the strokestyle-under-test branch from ef2f076 to b9a29d9 Compare March 10, 2023 07:18
@jhilmer jhilmer requested a review from bhennion March 10, 2023 07:21
@jhilmer
Copy link
Contributor Author
jhilmer commented Mar 12, 2023

I have continue making improvement based on this PR in jhilmer#1 should I include them here or keep them as a seperate PR?

Copy link
Collaborator
@bhennion bhennion 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 looks like verygood refactoring you did there!

I'd keep it like that and let you do your deeper refactor in a follow up PR.

I made a couple of comments. I'd like for someone else to go over the code before merging though, in case I (we) missed something.

@jhilmer jhilmer requested a review from bhennion March 13, 2023 22:17
Copy link
Member
@rolandlo rolandlo left a comment

Choose a reason for hiding this comment

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

The code looks good. Nice refactoring!

One thing that could be improved: We want to document functions (and class members) in the header files, not in the source files. For the LineStyle class and the StrokeViewHelper class there is a mix between documenting in header and source file.

Also I have noticed that we don't use HexObjectEncoding anywhere, not even in the tests. So I think we should get rid of it (and also the include in ObjectIOStreamTest.cpp)

@jhilmer
Copy link
Contributor Author
jhilmer commented Mar 19, 2023

In the other PR build on top of this one - I have remove HexObjectEncoding - I will take a look on the documentation in the files.

@jhilmer jhilmer force-pushed the strokestyle-under-test branch 3 times, most recently from 7745ca5 to 6b7885c Compare March 19, 2023 18:10
@jhilmer jhilmer force-pushed the strokestyle-under-test branch from 6b7885c to a945209 Compare March 19, 2023 18:16
Copy link
Collaborator
@bhennion bhennion left a comment

Choose a reason for hiding this comment

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

LGTM!

Squashing and merging in 24 hours unless an objection is raised.

@bhennion bhennion added the merge proposed Merge was proposed by maintainer label Mar 20, 2023
@bhennion bhennion added this to the v1.2.0 milestone Mar 20, 2023
@bhennion bhennion merged commit 7f1184b into xournalpp:master Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge proposed Merge was proposed by maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0