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

gradients: Don't crash gammaray #431

Closed
wants to merge 1 commit into from

Conversation

peter-ha
Copy link
Collaborator

@peter-ha peter-ha commented Oct 8, 2024

gammaray etc. reads the properties and when displaying the value calls the corresponding READ methods. This will lead to crashes when calling "wrong" methods for gradients.

gammaray etc. reads the properties and when displaying the value
calls the corresponding READ methods. This will lead to crashes
when calling "wrong" methods for gradients.
@uwerat
Copy link
Owner

uwerat commented Oct 8, 2024

I'm not 100% convinced by this solution as gammaray shows a wrong information then ( of course this is better than running into an assertion ). Only one of the directions is valid and gammary should display this one only.

Some random ideas - not sure about them:

  • maybe QML needs the WRITE method only and we could go without declaring the getters as READ method.
  • maybe we can define the property in a way, that gammaray skips it
  • maybe there is a way to tell gammary to check the type() first.
  • maybe it is possible to replace the 3 properties by 1 property "direction", that is a QVariant.
  • ...

@uwerat
Copy link
Owner

uwerat commented Oct 9, 2024

assertions have been weakened to warnings,

@uwerat uwerat closed this Oct 9, 2024
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