Login  Register

Re: [@dxli and @sand1024] please a tip for the RS_Eventhandler

Posted by sand1024 on Apr 10, 2025; 7:27pm
URL: https://forum.librecad.org/fixed-thanks-please-a-tip-for-the-RS-Eventhandler-tp5726883p5726889.html

@dxli
As for the ownership of actions - you mean ones inherited from RS_ActionInterface, not QAction, right?

Actually, I don't think the ownership will be a huge issues there - plus so far the codebase includes several places where actions are created outside of RS_EventHandler for various one-time operations.

So far I never seen any issues with the ownership. During the development some issues may occur with action's QAction checking/unchecking - but they are easy to deal with.  So far the overall actions's lifecycle management is fine, as for me.

Yet of course, some code in RS_EventHandler might be improved.  I've made some cleanup in that area already, I'll put these changes in nearest PR.