diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2021-10-31 23:38:04 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-02 22:56:53 +0100 |
commit | 465af4c4d4f403909208a420c21dbf7cf9cc015d (patch) | |
tree | eac280a0bf8e2a6d852852bb2a4bb5a430967843 /Userland/Applets | |
parent | 6b75a4dfc32e870e001cc2856fb4498069c39708 (diff) | |
download | serenity-465af4c4d4f403909208a420c21dbf7cf9cc015d.zip |
Applications: 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.
Diffstat (limited to 'Userland/Applets')
-rw-r--r-- | Userland/Applets/Network/main.cpp | 3 | ||||
-rw-r--r-- | Userland/Applets/ResourceGraph/main.cpp | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Applets/Network/main.cpp b/Userland/Applets/Network/main.cpp index dbb44cd856..fd06555704 100644 --- a/Userland/Applets/Network/main.cpp +++ b/Userland/Applets/Network/main.cpp @@ -20,7 +20,7 @@ class NetworkWidget final : public GUI::ImageWidget { C_OBJECT(NetworkWidget); -public: +private: NetworkWidget(bool notifications) { m_notifications = notifications; @@ -28,7 +28,6 @@ public: start_timer(5000); } -private: virtual void timer_event(Core::TimerEvent&) override { update_widget(); diff --git a/Userland/Applets/ResourceGraph/main.cpp b/Userland/Applets/ResourceGraph/main.cpp index 60287ad0a4..69300ccff4 100644 --- a/Userland/Applets/ResourceGraph/main.cpp +++ b/Userland/Applets/ResourceGraph/main.cpp @@ -30,6 +30,7 @@ class GraphWidget final : public GUI::Frame { public: static constexpr size_t history_size = 24; +private: GraphWidget(GraphType graph_type, Optional<Gfx::Color> graph_color, Optional<Gfx::Color> graph_error_color) : m_graph_type(graph_type) { @@ -39,7 +40,6 @@ public: start_timer(1000); } -private: virtual void timer_event(Core::TimerEvent&) override { switch (m_graph_type) { |