mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
Libraries: 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
3796d417e0
commit
b3e9a4e603
19 changed files with 62 additions and 50 deletions
|
@ -129,11 +129,6 @@ private:
|
|||
class ColorSelectOverlay final : public Widget {
|
||||
C_OBJECT(ColorSelectOverlay)
|
||||
public:
|
||||
ColorSelectOverlay()
|
||||
{
|
||||
set_override_cursor(Gfx::StandardCursor::Eyedropper);
|
||||
}
|
||||
|
||||
Optional<Color> exec()
|
||||
{
|
||||
m_event_loop = make<Core::EventLoop>();
|
||||
|
@ -156,6 +151,11 @@ public:
|
|||
Function<void(Color)> on_color_changed;
|
||||
|
||||
private:
|
||||
ColorSelectOverlay()
|
||||
{
|
||||
set_override_cursor(Gfx::StandardCursor::Eyedropper);
|
||||
}
|
||||
|
||||
virtual void mousedown_event(GUI::MouseEvent&) override { m_event_loop->quit(1); }
|
||||
virtual void mousemove_event(GUI::MouseEvent&) override
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue