diff --git a/Libraries/LibCore/CObject.cpp b/Libraries/LibCore/CObject.cpp index bbee4501dd..4014fc032e 100644 --- a/Libraries/LibCore/CObject.cpp +++ b/Libraries/LibCore/CObject.cpp @@ -37,6 +37,8 @@ void CObject::event(CEvent& event) case CEvent::Invalid: ASSERT_NOT_REACHED(); break; + case CEvent::Custom: + return custom_event(static_cast(event)); default: break; } @@ -70,6 +72,10 @@ void CObject::child_event(CChildEvent&) { } +void CObject::custom_event(CCustomEvent&) +{ +} + void CObject::start_timer(int ms) { if (m_timer_id) { diff --git a/Libraries/LibCore/CObject.h b/Libraries/LibCore/CObject.h index 038dc93ca8..58c8cf5ad2 100644 --- a/Libraries/LibCore/CObject.h +++ b/Libraries/LibCore/CObject.h @@ -8,6 +8,7 @@ class CEvent; class CChildEvent; +class CCustomEvent; class CTimerEvent; class CObject : public Weakable { @@ -59,6 +60,7 @@ public: protected: virtual void timer_event(CTimerEvent&); virtual void child_event(CChildEvent&); + virtual void custom_event(CCustomEvent&); private: CObject* m_parent { nullptr };