1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 14:55:07 +00:00

Spreadsheet: Don't store help window's widgets in raw pointers

We can just use RefPtr for these and lighten the cognitive burden.
This commit is contained in:
Andreas Kling 2020-08-28 13:02:41 +02:00
parent 3c73b6d531
commit 60cf97726f
2 changed files with 6 additions and 7 deletions

View file

@ -91,13 +91,12 @@ HelpWindow::HelpWindow(GUI::Window* parent)
left_frame.set_layout<GUI::VerticalBoxLayout>().set_margins({ 0, 0, 0, 0 });
left_frame.set_preferred_size(100, 0);
left_frame.set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fill);
auto& list_view = left_frame.add<GUI::ListView>();
m_listview = &list_view;
list_view.set_model(HelpListModel::create());
m_listview = left_frame.add<GUI::ListView>();
m_listview->set_model(HelpListModel::create());
m_webview = &splitter.add<Web::OutOfProcessWebView>();
m_webview = splitter.add<Web::OutOfProcessWebView>();
list_view.on_activation = [this](auto& index) {
m_listview->on_activation = [this](auto& index) {
if (!m_webview)
return;