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

Refactor main menu #2075

Merged
merged 2 commits into from
Oct 29, 2024
Merged

Refactor main menu #2075

merged 2 commits into from
Oct 29, 2024

Conversation

vkbo
Copy link
Owner

@vkbo vkbo commented Oct 29, 2024

Summary:

This PR:

  • Moves the linking of menu action objects to the main GUI to where the actions are defined instead of pulling them in a utility function.
  • Adds a new qtLambda function to be used for Qt signals when passing custom arguments. This strips the original arguments, and properly sets a None return value. For Qt6, the linter will otherwise complain about this. This also solves the problems of generating slots using lambdas in for loops. Python will by default not generate new lambdas for each cycle, so it has to be tricked. Otherwise, all elements in the loop will end up with the last lambda generated.

Related Issue(s):

Reviewer's Checklist:

  • The header of all files contain a reference to the repository license
  • The overall test coverage is increased or remains the same as before
  • All tests are passing
  • All flake8 checks are passing and the style guide is followed
  • Documentation (as docstrings) is complete and understandable
  • Only files that have been actively changed are committed

@vkbo vkbo added this to the Release 2.6 Beta 1 milestone Oct 29, 2024
@vkbo vkbo merged commit 8725eda into main Oct 29, 2024
9 checks passed
@vkbo vkbo deleted the main_gui_actions branch October 29, 2024 16:46
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.

1 participant