From a599317624fb8428eb64cf719affcdd075f5c9d5 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 25 Jul 2019 19:49:28 +0200 Subject: LibCore: Introduce a C_OBJECT macro. This macro goes at the top of every CObject-derived class like so: class SomeClass : public CObject { C_OBJECT(SomeClass) public: ... At the moment, all it does is create an override for the class_name() getter but in the future this will be used to automatically insert member functions into these classes. --- Libraries/LibGUI/GTableView.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Libraries/LibGUI/GTableView.h') diff --git a/Libraries/LibGUI/GTableView.h b/Libraries/LibGUI/GTableView.h index 6c6b02fa99..a5e8851cd6 100644 --- a/Libraries/LibGUI/GTableView.h +++ b/Libraries/LibGUI/GTableView.h @@ -9,6 +9,7 @@ class GScrollBar; class Painter; class GTableView : public GAbstractView { + C_OBJECT(GTableView) public: explicit GTableView(GWidget* parent); virtual ~GTableView() override; @@ -34,8 +35,6 @@ public: virtual Rect content_rect(const GModelIndex&) const override; - virtual const char* class_name() const override { return "GTableView"; } - private: virtual void did_update_model() override; virtual void paint_event(GPaintEvent&) override; -- cgit v1.2.3