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

Protect against deleted nodes in Qt TreeEditor #1973

Merged
merged 5 commits into from
Dec 19, 2022

Conversation

corranwebster
Copy link
Contributor

@corranwebster corranwebster commented Dec 15, 2022

This change makes checks that the underlying Qt QTreeViewItem exists before attempting to access any data stored on it. This hopefully resolves some issues observed in PySide6 which I suspect were caused by a change in API from returning AttrbuteError to RuntimeError when accessing that data.

Checklist

  • Add a news fragment if this PR is news-worthy for end users. (see docs/releases/README.rst)

@corranwebster corranwebster marked this pull request as ready for review December 16, 2022 09:36
@corranwebster
Copy link
Contributor Author

I've added issue #1974 for the test segfault on MacOS.

Copy link
Member

@tmreay tmreay left a comment

Choose a reason for hiding this comment

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

Code changes look good and make sense to me!

@corranwebster corranwebster merged commit 2e10601 into main Dec 19, 2022
@corranwebster corranwebster deleted the fix/pyside6-deleted-nodes branch December 19, 2022 08:33
corranwebster added a commit that referenced this pull request Jan 12, 2023
* Possible fix for tree editor issues.

* Add changelog.

* Add tests for new helper function.

* Skip helper tests on Mac/PySide6

* Add reference to segfault issue.
corranwebster added a commit that referenced this pull request Jan 12, 2023
* Possible fix for tree editor issues.

* Add changelog.

* Add tests for new helper function.

* Skip helper tests on Mac/PySide6

* Add reference to segfault issue.
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.

None yet

2 participants