1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:58:11 +00:00

Calendar: Fix using OwnPtr<> with RefCounted types

This commit is contained in:
Sergey Bugaev 2020-06-12 16:26:12 +03:00 committed by Andreas Kling
parent 5624f8d8ee
commit eb3700c565
3 changed files with 8 additions and 9 deletions

View file

@ -60,8 +60,7 @@ int main(int argc, char** argv)
window->set_title("Calendar");
window->set_rect(20, 200, 596, 475);
auto calendar_widget = make<CalendarWidget>();
window->set_main_widget(calendar_widget);
auto& calendar_widget = window->set_main_widget<CalendarWidget>();
window->show();
window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-calendar.png"));
@ -70,7 +69,7 @@ int main(int argc, char** argv)
app_menu.add_action(GUI::Action::create("Add Event", { Mod_Ctrl | Mod_Shift, Key_E },
[&](const GUI::Action&) {
calendar_widget->show_add_event_window();
calendar_widget.show_add_event_window();
return;
}));