mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:17:35 +00:00
LibGUI: Convert GTextBox, GTextEditor and GResizeCorner to ObjectPtr
This commit is contained in:
parent
4ea229accd
commit
93851c3832
25 changed files with 38 additions and 36 deletions
|
@ -22,7 +22,7 @@ TextEditorWidget::TextEditorWidget()
|
|||
layout()->set_spacing(0);
|
||||
|
||||
auto* toolbar = new GToolBar(this);
|
||||
m_editor = new GTextEditor(GTextEditor::MultiLine, this);
|
||||
m_editor = GTextEditor::construct(GTextEditor::MultiLine, this);
|
||||
m_editor->set_ruler_visible(true);
|
||||
m_editor->set_automatic_indentation_enabled(true);
|
||||
m_editor->set_line_wrapping_enabled(true);
|
||||
|
@ -42,7 +42,7 @@ TextEditorWidget::TextEditorWidget()
|
|||
m_find_widget->layout()->set_margins({ 2, 2, 2, 2 });
|
||||
m_find_widget->set_visible(false);
|
||||
|
||||
m_find_textbox = new GTextBox(m_find_widget);
|
||||
m_find_textbox = GTextBox::construct(m_find_widget);
|
||||
|
||||
m_find_next_action = GAction::create("Find next", { Mod_Ctrl, Key_G }, [&](auto&) {
|
||||
auto needle = m_find_textbox->text();
|
||||
|
|
|
@ -22,7 +22,7 @@ private:
|
|||
void set_path(const FileSystemPath& file);
|
||||
void update_title();
|
||||
|
||||
GTextEditor* m_editor { nullptr };
|
||||
ObjectPtr<GTextEditor> m_editor;
|
||||
String m_path;
|
||||
String m_name;
|
||||
String m_extension;
|
||||
|
@ -35,7 +35,7 @@ private:
|
|||
RefPtr<GAction> m_find_next_action;
|
||||
RefPtr<GAction> m_find_previous_action;
|
||||
|
||||
GTextBox* m_find_textbox { nullptr };
|
||||
ObjectPtr<GTextBox> m_find_textbox;
|
||||
GButton* m_find_previous_button { nullptr };
|
||||
GButton* m_find_next_button { nullptr };
|
||||
GWidget* m_find_widget { nullptr };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue