mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:37:34 +00:00
Demos+DevTools+Games: Fix visibility of Object-derivative constructors
Derivatives of Core::Object should be constructed through ClassName::construct(), to avoid handling ref-counted objects with refcount zero. Fixing the visibility means that misuses like this are more difficult.
This commit is contained in:
parent
465af4c4d4
commit
3796d417e0
6 changed files with 9 additions and 5 deletions
|
@ -43,7 +43,6 @@ class Field final : public GUI::Frame {
|
|||
friend class SquareLabel;
|
||||
|
||||
public:
|
||||
Field(GUI::Label& flag_label, GUI::Label& time_label, GUI::Button& face_button, Function<void(Gfx::IntSize)> on_size_changed);
|
||||
virtual ~Field() override;
|
||||
|
||||
size_t rows() const { return m_rows; }
|
||||
|
@ -58,6 +57,8 @@ public:
|
|||
void reset();
|
||||
|
||||
private:
|
||||
Field(GUI::Label& flag_label, GUI::Label& time_label, GUI::Button& face_button, Function<void(Gfx::IntSize)> on_size_changed);
|
||||
|
||||
virtual void paint_event(GUI::PaintEvent&) override;
|
||||
|
||||
void on_square_clicked(Square&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue