fix(designer): avoid touching deleted widgets during init as QtDesigner will segfault
Description
Designer randomly segfaults on pre_release. It seems as if this is caused by the _enforce_unique_sibling_name method as it accesses all widgets and thus may also try to access widgets that have been marked for deletion by QtDesigner. However, it appears to be sufficient to move these checks outside of __init__. Here, I achieved this by using a single shot timer. In addition, I'm checking for deleted widgets before trying to access them. However, moving it to a single shot meant that the object is created and potentially returned through rpc before it is even registered. To remedy this, commit 0463b32d introduces a check to ensure that the serialized object is a valid entry in the registry.
While I was at it, I also fixed the TODOs in BECConnector (#475 (closed), #472 (closed))
Related Issues
closes #484 (closed) #475 (closed) #472 (closed)
Additional Comments
Please try to play around with QtDesigner a bit. For me, the segfaults happened when clicking on the plugins.
If this MR really solves the problem, we should double-check that we are not accessing other widgets or even all widgets in other __init__ methods.
Definition of Done
-
Documentation is up-to-date.