mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:07:35 +00:00
LibCore: Remove ObjectPtr in favor of RefPtr
Now that CObject is fully ref-counted, just use RefPtr everywhere! :^)
This commit is contained in:
parent
bc319d9e88
commit
d6abfbdc5a
71 changed files with 146 additions and 156 deletions
|
@ -22,7 +22,7 @@ MemoryStatsWidget::MemoryStatsWidget(GraphWidget& graph, GWidget* parent)
|
|||
layout()->set_margins({ 0, 8, 0, 0 });
|
||||
layout()->set_spacing(3);
|
||||
|
||||
auto build_widgets_for_label = [this](const String& description) -> ObjectPtr<GLabel> {
|
||||
auto build_widgets_for_label = [this](const String& description) -> RefPtr<GLabel> {
|
||||
auto container = GWidget::construct(this);
|
||||
container->set_layout(make<GBoxLayout>(Orientation::Horizontal));
|
||||
container->set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed);
|
||||
|
|
|
@ -18,9 +18,9 @@ private:
|
|||
virtual void timer_event(CTimerEvent&) override;
|
||||
|
||||
GraphWidget& m_graph;
|
||||
ObjectPtr<GLabel> m_user_physical_pages_label;
|
||||
ObjectPtr<GLabel> m_supervisor_physical_pages_label;
|
||||
ObjectPtr<GLabel> m_kmalloc_label;
|
||||
ObjectPtr<GLabel> m_kmalloc_count_label;
|
||||
ObjectPtr<CFile> m_proc_memstat;
|
||||
RefPtr<GLabel> m_user_physical_pages_label;
|
||||
RefPtr<GLabel> m_supervisor_physical_pages_label;
|
||||
RefPtr<GLabel> m_kmalloc_label;
|
||||
RefPtr<GLabel> m_kmalloc_count_label;
|
||||
RefPtr<CFile> m_proc_memstat;
|
||||
};
|
||||
|
|
|
@ -14,7 +14,7 @@ private:
|
|||
explicit NetworkStatisticsWidget(GWidget* parent = nullptr);
|
||||
void update_models();
|
||||
|
||||
ObjectPtr<GTableView> m_adapter_table_view;
|
||||
ObjectPtr<GTableView> m_socket_table_view;
|
||||
ObjectPtr<CTimer> m_update_timer;
|
||||
RefPtr<GTableView> m_adapter_table_view;
|
||||
RefPtr<GTableView> m_socket_table_view;
|
||||
RefPtr<CTimer> m_update_timer;
|
||||
};
|
||||
|
|
|
@ -14,6 +14,6 @@ public:
|
|||
private:
|
||||
explicit ProcessFileDescriptorMapWidget(GWidget* parent);
|
||||
|
||||
ObjectPtr<GTableView> m_table_view;
|
||||
RefPtr<GTableView> m_table_view;
|
||||
pid_t m_pid { -1 };
|
||||
};
|
||||
|
|
|
@ -13,6 +13,6 @@ public:
|
|||
|
||||
private:
|
||||
explicit ProcessMemoryMapWidget(GWidget* parent);
|
||||
ObjectPtr<GTableView> m_table_view;
|
||||
RefPtr<GTableView> m_table_view;
|
||||
pid_t m_pid { -1 };
|
||||
};
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibCore/ObjectPtr.h>
|
||||
#include <LibGUI/GTextEditor.h>
|
||||
#include <LibGUI/GWidget.h>
|
||||
|
||||
|
@ -17,6 +16,6 @@ public:
|
|||
|
||||
private:
|
||||
pid_t m_pid { -1 };
|
||||
ObjectPtr<GTextEditor> m_stacks_editor;
|
||||
ObjectPtr<CTimer> m_timer;
|
||||
RefPtr<GTextEditor> m_stacks_editor;
|
||||
RefPtr<CTimer> m_timer;
|
||||
};
|
||||
|
|
|
@ -39,9 +39,9 @@ static String human_readable_size(u32 size)
|
|||
return String::format("%u GB", size / GB);
|
||||
}
|
||||
|
||||
static ObjectPtr<GWidget> build_file_systems_tab();
|
||||
static ObjectPtr<GWidget> build_pci_devices_tab();
|
||||
static ObjectPtr<GWidget> build_devices_tab();
|
||||
static RefPtr<GWidget> build_file_systems_tab();
|
||||
static RefPtr<GWidget> build_pci_devices_tab();
|
||||
static RefPtr<GWidget> build_devices_tab();
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
@ -234,7 +234,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
ObjectPtr<GWidget> build_file_systems_tab()
|
||||
RefPtr<GWidget> build_file_systems_tab()
|
||||
{
|
||||
auto fs_widget = GWidget::construct();
|
||||
fs_widget->set_layout(make<GBoxLayout>(Orientation::Vertical));
|
||||
|
@ -299,7 +299,7 @@ ObjectPtr<GWidget> build_file_systems_tab()
|
|||
return fs_widget;
|
||||
}
|
||||
|
||||
ObjectPtr<GWidget> build_pci_devices_tab()
|
||||
RefPtr<GWidget> build_pci_devices_tab()
|
||||
{
|
||||
auto pci_widget = GWidget::construct();
|
||||
pci_widget->set_layout(make<GBoxLayout>(Orientation::Vertical));
|
||||
|
@ -353,7 +353,7 @@ ObjectPtr<GWidget> build_pci_devices_tab()
|
|||
return pci_widget;
|
||||
}
|
||||
|
||||
ObjectPtr<GWidget> build_devices_tab()
|
||||
RefPtr<GWidget> build_devices_tab()
|
||||
{
|
||||
auto devices_widget = GWidget::construct();
|
||||
devices_widget->set_layout(make<GBoxLayout>(Orientation::Vertical));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue