mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +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
|
@ -31,7 +31,7 @@ public:
|
|||
BoolModelEditingDelegate() {}
|
||||
virtual ~BoolModelEditingDelegate() override {}
|
||||
|
||||
virtual ObjectPtr<GWidget> create_widget() override
|
||||
virtual RefPtr<GWidget> create_widget() override
|
||||
{
|
||||
auto combo = GComboBox::construct(nullptr);
|
||||
combo->set_only_allow_values_from_model(true);
|
||||
|
|
|
@ -15,5 +15,5 @@ public:
|
|||
const GTableView& table_view() const { return *m_table_view; }
|
||||
|
||||
private:
|
||||
ObjectPtr<GTableView> m_table_view;
|
||||
RefPtr<GTableView> m_table_view;
|
||||
};
|
||||
|
|
|
@ -81,7 +81,7 @@ private:
|
|||
|
||||
VBWidgetType m_type { VBWidgetType::None };
|
||||
VBForm& m_form;
|
||||
ObjectPtr<GWidget> m_gwidget;
|
||||
RefPtr<GWidget> m_gwidget;
|
||||
NonnullOwnPtrVector<VBProperty> m_properties;
|
||||
NonnullRefPtr<VBWidgetPropertyModel> m_property_model;
|
||||
Rect m_transform_origin_rect;
|
||||
|
|
|
@ -68,7 +68,7 @@ VBWidgetType widget_type_from_class_name(const StringView& name)
|
|||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
static ObjectPtr<GWidget> build_gwidget(VBWidgetType type, GWidget* parent)
|
||||
static RefPtr<GWidget> build_gwidget(VBWidgetType type, GWidget* parent)
|
||||
{
|
||||
switch (type) {
|
||||
case VBWidgetType::GWidget:
|
||||
|
@ -125,7 +125,7 @@ static ObjectPtr<GWidget> build_gwidget(VBWidgetType type, GWidget* parent)
|
|||
}
|
||||
}
|
||||
|
||||
ObjectPtr<GWidget> VBWidgetRegistry::build_gwidget(VBWidget& widget, VBWidgetType type, GWidget* parent, NonnullOwnPtrVector<VBProperty>& properties)
|
||||
RefPtr<GWidget> VBWidgetRegistry::build_gwidget(VBWidget& widget, VBWidgetType type, GWidget* parent, NonnullOwnPtrVector<VBProperty>& properties)
|
||||
{
|
||||
auto gwidget = ::build_gwidget(type, parent);
|
||||
auto add_readonly_property = [&](const String& name, const GVariant& value) {
|
||||
|
|
|
@ -19,7 +19,7 @@ public:
|
|||
callback((VBWidgetType)i);
|
||||
}
|
||||
|
||||
static ObjectPtr<GWidget> build_gwidget(VBWidget&, VBWidgetType, GWidget* parent, NonnullOwnPtrVector<VBProperty>&);
|
||||
static RefPtr<GWidget> build_gwidget(VBWidget&, VBWidgetType, GWidget* parent, NonnullOwnPtrVector<VBProperty>&);
|
||||
};
|
||||
|
||||
String to_class_name(VBWidgetType);
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static ObjectPtr<GWindow> make_toolbox_window();
|
||||
static RefPtr<GWindow> make_toolbox_window();
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
@ -74,7 +74,7 @@ int main(int argc, char** argv)
|
|||
return app.exec();
|
||||
}
|
||||
|
||||
ObjectPtr<GWindow> make_toolbox_window()
|
||||
RefPtr<GWindow> make_toolbox_window()
|
||||
{
|
||||
auto window = GWindow::construct();
|
||||
window->set_title("Widgets");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue