1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:38:10 +00:00

LibCore: Add comment about child events for partially-constructed children.

Since ChildAdded events originate from the CObject constructor, they are not
fully constructed when their parent learns that they were added.
Added a little comment about this to the child_event() declaration.
This commit is contained in:
Andreas Kling 2019-07-27 09:31:46 +02:00
parent 185ba4dc3f
commit 10c35d345a

View file

@ -64,9 +64,11 @@ protected:
CObject(CObject* parent = nullptr, bool is_widget = false);
virtual void timer_event(CTimerEvent&);
virtual void child_event(CChildEvent&);
virtual void custom_event(CCustomEvent&);
// NOTE: You may get child events for children that are not yet fully constructed!
virtual void child_event(CChildEvent&);
private:
CObject* m_parent { nullptr };
String m_name;