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

Use Qt::Edges instead of a custom enum for resizing widgets #1145

Closed
psampathkumar opened this issue Jul 16, 2022 · 2 comments · Fixed by #1265
Closed

Use Qt::Edges instead of a custom enum for resizing widgets #1145

psampathkumar opened this issue Jul 16, 2022 · 2 comments · Fixed by #1265
Labels
gui This issue requires changes to the user interface refactoring This issue requires code refactoring

Comments

@psampathkumar
Copy link
Contributor

Describe the bug
No bug, but codacy complains about MISRA 16.2 whenever Qt enums are used.

To Reproduce
Look at #1081

Expected behavior
No problems with codacy ?

Platform and version (please complete the following information):

  • master

Additional Context
Do nothing. Maybe codacy is a false positive.

@psampathkumar psampathkumar added bug Something isn't working refactoring This issue requires code refactoring gui This issue requires changes to the user interface labels Jul 16, 2022
@lmoureaux
Copy link
Contributor

lmoureaux commented Aug 4, 2022

How is this related to Qt::Edges?

@psampathkumar
Copy link
Contributor Author

Idk, you suggested that in the corresponding PR.

@lmoureaux lmoureaux removed the bug Something isn't working label Aug 13, 2022
lmoureaux added a commit to lmoureaux/freeciv21 that referenced this issue Aug 13, 2022
Instead of letting the user of the class allow resizing of each corner
separately, only use the edges to specify which resizes are allowed. Usable
corners are deduced from the list of edges. This makes for a more concise
implementation and lets us use Qt::Edges instead of a custom enum.

Closes longturn#1145.
lmoureaux added a commit to lmoureaux/freeciv21 that referenced this issue Aug 15, 2022
Instead of letting the user of the class allow resizing of each corner
separately, only use the edges to specify which resizes are allowed. Usable
corners are deduced from the list of edges. This makes for a more concise
implementation and lets us use Qt::Edges instead of a custom enum.

Closes longturn#1145.
lmoureaux added a commit that referenced this issue Aug 16, 2022
Instead of letting the user of the class allow resizing of each corner
separately, only use the edges to specify which resizes are allowed. Usable
corners are deduced from the list of edges. This makes for a more concise
implementation and lets us use Qt::Edges instead of a custom enum.

Closes #1145.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gui This issue requires changes to the user interface refactoring This issue requires code refactoring
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants