1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:48:12 +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:
Andreas Kling 2019-09-22 00:31:54 +02:00
parent bc319d9e88
commit d6abfbdc5a
71 changed files with 146 additions and 156 deletions

View file

@ -29,7 +29,7 @@ public:
virtual void will_begin_editing() { }
protected:
virtual ObjectPtr<GWidget> create_widget() = 0;
virtual RefPtr<GWidget> create_widget() = 0;
void commit()
{
if (on_commit)
@ -39,7 +39,7 @@ protected:
private:
RefPtr<GModel> m_model;
GModelIndex m_index;
ObjectPtr<GWidget> m_widget;
RefPtr<GWidget> m_widget;
};
class GStringModelEditingDelegate : public GModelEditingDelegate {
@ -47,7 +47,7 @@ public:
GStringModelEditingDelegate() {}
virtual ~GStringModelEditingDelegate() override {}
virtual ObjectPtr<GWidget> create_widget() override
virtual RefPtr<GWidget> create_widget() override
{
auto textbox = GTextBox::construct(nullptr);
textbox->on_return_pressed = [this] {