Summary: | API: AccessibilityObject::actions() returns raw pointers | ||
---|---|---|---|
Product: | [Frameworks and Libraries] qaccessibilityclient | Reporter: | Peter Grasch <me> |
Component: | general | Assignee: | Frederik Gladhorn <gladhorn> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | mail, sebsauer |
Priority: | NOR | ||
Version: | 0.3.0 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Peter Grasch
2012-09-23 15:02:52 UTC
Sebastian, it would be great if we could discuss this api and maybe come up with some improvements. The different concepts we could follow: 1. Shared ownership. That could for example means that we return a QVector< QSharedPointer<QAction> > but that means users still need to make sure to keep in there application to keep a the ref-counter and prevent freeing. Note that this is not different from how it works now cause you can just keep a AccessibleObject in your app and then the actions will keep on to live as long as the AccessibleObject does. 2. Caller-responsibility. We just always pass responsibility to delete the actions to the caller. I think this is rather error-prune through at the end it may the most clean way forward. Problem of invalid-notifications I think it makes absolute sense if our lib keeps a list of the actions it passed out (as in a kind of "cache") cause that way we could easily automate/handle the case that the object the actions points to is invalidated (e.g. marked defunct). What we really like here is a way to inform the caller (means the app) that the action is not valid any longer so the application can react like for example setEnabled(false) the actions or just remove/delete them. Dear Bug Submitter, This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond. Thank you for helping us make KDE software even better for everyone! Dear Bug Submitter, This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand. Thank you for helping us make KDE software even better for everyone! |