1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 12:07:45 +00:00

Update Badge<T> instantiations to simply be {}.

This commit is contained in:
Andreas Kling 2019-05-31 15:44:04 +02:00
parent fa6446fc0d
commit fdf3608c8a
11 changed files with 23 additions and 23 deletions

View file

@ -20,10 +20,10 @@ void GAbstractView::set_model(RetainPtr<GModel>&& model)
if (model == m_model)
return;
if (m_model)
m_model->unregister_view(Badge<GAbstractView>(), *this);
m_model->unregister_view({}, *this);
m_model = move(model);
if (m_model)
m_model->register_view(Badge<GAbstractView>(), *this);
m_model->register_view({}, *this);
did_update_model();
}

View file

@ -39,19 +39,19 @@ GAction::GAction(const String& text, const GShortcut& shortcut, RetainPtr<Graphi
{
if (m_widget) {
m_scope = ShortcutScope::WidgetLocal;
m_widget->register_local_shortcut_action(Badge<GAction>(), *this);
m_widget->register_local_shortcut_action({}, *this);
} else {
m_scope = ShortcutScope::ApplicationGlobal;
GApplication::the().register_global_shortcut_action(Badge<GAction>(), *this);
GApplication::the().register_global_shortcut_action({}, *this);
}
}
GAction::~GAction()
{
if (m_shortcut.is_valid() && m_scope == ShortcutScope::ApplicationGlobal)
GApplication::the().unregister_global_shortcut_action(Badge<GAction>(), *this);
GApplication::the().unregister_global_shortcut_action({}, *this);
if (m_widget && m_scope == ShortcutScope::WidgetLocal)
m_widget->unregister_local_shortcut_action(Badge<GAction>(), *this);
m_widget->unregister_local_shortcut_action({}, *this);
}
void GAction::activate()

View file

@ -46,10 +46,10 @@ void GApplication::quit(int exit_code)
void GApplication::set_menubar(OwnPtr<GMenuBar>&& menubar)
{
if (m_menubar)
m_menubar->notify_removed_from_application(Badge<GApplication>());
m_menubar->notify_removed_from_application({});
m_menubar = move(menubar);
if (m_menubar)
m_menubar->notify_added_to_application(Badge<GApplication>());
m_menubar->notify_added_to_application({});
}
void GApplication::register_global_shortcut_action(Badge<GAction>, GAction& action)

View file

@ -243,7 +243,7 @@ void GEventLoop::process_unprocessed_bundles()
}
if (event.type == WSAPI_ServerMessage::Type::ScreenRectChanged) {
GDesktop::the().did_receive_screen_rect(Badge<GEventLoop>(), event.screen.rect);
GDesktop::the().did_receive_screen_rect({}, event.screen.rect);
continue;
}
@ -414,5 +414,5 @@ void GEventLoop::handle_greeting(WSAPI_ServerMessage& message)
{
s_server_pid = message.greeting.server_pid;
s_my_client_id = message.greeting.your_client_id;
GDesktop::the().did_receive_screen_rect(Badge<GEventLoop>(), message.greeting.screen_rect);
GDesktop::the().did_receive_screen_rect({}, message.greeting.screen_rect);
}

View file

@ -26,7 +26,7 @@ void GLayout::add_entry(Entry&& entry)
{
m_entries.append(move(entry));
if (m_owner)
m_owner->notify_layout_changed(Badge<GLayout>());
m_owner->notify_layout_changed({});
}
void GLayout::add_spacer()
@ -58,7 +58,7 @@ void GLayout::remove_widget(GWidget& widget)
return entry.widget == &widget;
});
if (m_owner)
m_owner->notify_layout_changed(Badge<GLayout>());
m_owner->notify_layout_changed({});
}
void GLayout::set_spacing(int spacing)
@ -67,7 +67,7 @@ void GLayout::set_spacing(int spacing)
return;
m_spacing = spacing;
if (m_owner)
m_owner->notify_layout_changed(Badge<GLayout>());
m_owner->notify_layout_changed({});
}
void GLayout::set_margins(const GMargins& margins)
@ -76,5 +76,5 @@ void GLayout::set_margins(const GMargins& margins)
return;
m_margins = margins;
if (m_owner)
m_owner->notify_layout_changed(Badge<GLayout>());
m_owner->notify_layout_changed({});
}

View file

@ -131,10 +131,10 @@ void GWidget::handle_paint_event(GPaintEvent& event)
void GWidget::set_layout(OwnPtr<GLayout>&& layout)
{
if (m_layout)
m_layout->notify_disowned(Badge<GWidget>(), *this);
m_layout->notify_disowned({}, *this);
m_layout = move(layout);
if (m_layout) {
m_layout->notify_adopted(Badge<GWidget>(), *this);
m_layout->notify_adopted({}, *this);
do_layout();
} else {
update();