mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 14:14:45 +03:00
Update Badge<T> instantiations to simply be {}.
This commit is contained in:
parent
fa6446fc0d
commit
fdf3608c8a
Notes:
sideshowbarker
2024-07-19 13:49:22 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/fdf3608c8a0
@ -78,13 +78,13 @@ void Inode::will_be_destroyed()
|
||||
void Inode::inode_contents_changed(off_t offset, ssize_t size, const byte* data)
|
||||
{
|
||||
if (m_vmo)
|
||||
m_vmo->inode_contents_changed(Badge<Inode>(), offset, size, data);
|
||||
m_vmo->inode_contents_changed({}, offset, size, data);
|
||||
}
|
||||
|
||||
void Inode::inode_size_changed(size_t old_size, size_t new_size)
|
||||
{
|
||||
if (m_vmo)
|
||||
m_vmo->inode_size_changed(Badge<Inode>(), old_size, new_size);
|
||||
m_vmo->inode_size_changed({}, old_size, new_size);
|
||||
}
|
||||
|
||||
int Inode::set_atime(time_t)
|
||||
|
@ -189,7 +189,7 @@ KResultOr<Retained<FileDescriptor>> VFS::open(StringView path, int options, mode
|
||||
auto descriptor_or_error = (*it).value->open(options);
|
||||
if (descriptor_or_error.is_error())
|
||||
return descriptor_or_error.error();
|
||||
descriptor_or_error.value()->set_original_inode(Badge<VFS>(), inode);
|
||||
descriptor_or_error.value()->set_original_inode({}, inode);
|
||||
return descriptor_or_error;
|
||||
}
|
||||
if (should_truncate_file)
|
||||
|
@ -23,7 +23,7 @@ MasterPTY::~MasterPTY()
|
||||
#ifdef MASTERPTY_DEBUG
|
||||
dbgprintf("~MasterPTY(%u)\n", m_index);
|
||||
#endif
|
||||
PTYMultiplexer::the().notify_master_destroyed(Badge<MasterPTY>(), m_index);
|
||||
PTYMultiplexer::the().notify_master_destroyed({}, m_index);
|
||||
}
|
||||
|
||||
String MasterPTY::pts_name() const
|
||||
|
@ -62,5 +62,5 @@ ssize_t SlavePTY::read(FileDescriptor& descriptor, byte* buffer, ssize_t size)
|
||||
|
||||
void SlavePTY::close()
|
||||
{
|
||||
m_master->notify_slave_closed(Badge<SlavePTY>());
|
||||
m_master->notify_slave_closed({});
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ CNotifier::CNotifier(int fd, unsigned event_mask)
|
||||
: m_fd(fd)
|
||||
, m_event_mask(event_mask)
|
||||
{
|
||||
CEventLoop::register_notifier(Badge<CNotifier>(), *this);
|
||||
CEventLoop::register_notifier({}, *this);
|
||||
}
|
||||
|
||||
CNotifier::~CNotifier()
|
||||
{
|
||||
CEventLoop::unregister_notifier(Badge<CNotifier>(), *this);
|
||||
CEventLoop::unregister_notifier({}, *this);
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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({});
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user