mirror of
https://github.com/RGBCube/serenity
synced 2025-08-01 15:37:47 +00:00
LibCore+Userland: Make Core::Timer::create_single_shot() return ErrorOr
clang-format sure has some interesting opinions about where to put a method call that comes after a lambda. :thonk:
This commit is contained in:
parent
a15d44f019
commit
a8cf0c9371
20 changed files with 42 additions and 36 deletions
|
@ -177,7 +177,8 @@ void Mixer::request_setting_sync()
|
|||
if (auto result = m_config->sync(); result.is_error())
|
||||
dbgln("Failed to write audio mixer config: {}", result.error());
|
||||
},
|
||||
this);
|
||||
this)
|
||||
.release_value_but_fixme_should_propagate_errors();
|
||||
m_config_write_timer->start();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ static Core::ConfigFile& ensure_domain_config(DeprecatedString const& domain)
|
|||
|
||||
ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSocket> client_socket, int client_id)
|
||||
: IPC::ConnectionFromClient<ConfigClientEndpoint, ConfigServerEndpoint>(*this, move(client_socket), client_id)
|
||||
, m_sync_timer(Core::Timer::create_single_shot(s_disk_sync_delay_ms, [this]() { sync_dirty_domains_to_disk(); }))
|
||||
, m_sync_timer(Core::Timer::create_single_shot(s_disk_sync_delay_ms, [this]() { sync_dirty_domains_to_disk(); }).release_value_but_fixme_should_propagate_errors())
|
||||
{
|
||||
s_connections.set(client_id, *this);
|
||||
}
|
||||
|
|
|
@ -261,7 +261,8 @@ void DHCPv4Client::handle_ack(DHCPv4Packet const& packet, ParsedDHCPv4Options co
|
|||
transaction->has_ip = false;
|
||||
dhcp_discover(interface);
|
||||
},
|
||||
this);
|
||||
this)
|
||||
.release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
Optional<IPv4Address> gateway;
|
||||
if (auto routers = options.get_many<IPv4Address>(DHCPOption::Router, 1); !routers.is_empty())
|
||||
|
@ -288,7 +289,8 @@ void DHCPv4Client::handle_nak(DHCPv4Packet const& packet, ParsedDHCPv4Options co
|
|||
[this, iface = InterfaceDescriptor { iface }] {
|
||||
dhcp_discover(iface);
|
||||
},
|
||||
this);
|
||||
this)
|
||||
.release_value_but_fixme_should_propagate_errors();
|
||||
}
|
||||
|
||||
void DHCPv4Client::process_incoming(DHCPv4Packet const& packet)
|
||||
|
|
|
@ -203,7 +203,7 @@ decltype(auto) get_or_create_connection(auto& cache, URL const& url, auto& job,
|
|||
sockets_for_url.append(make<ConnectionType>(
|
||||
socket_result.release_value(),
|
||||
typename ConnectionType::QueueType {},
|
||||
Core::Timer::create_single_shot(ConnectionKeepAliveTimeMilliseconds, nullptr)));
|
||||
Core::Timer::create_single_shot(ConnectionKeepAliveTimeMilliseconds, nullptr).release_value_but_fixme_should_propagate_errors()));
|
||||
sockets_for_url.last().proxy = move(proxy);
|
||||
did_add_new_connection = true;
|
||||
}
|
||||
|
|
|
@ -55,14 +55,16 @@ Compositor::Compositor()
|
|||
[this] {
|
||||
compose();
|
||||
},
|
||||
this);
|
||||
this)
|
||||
.release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
m_immediate_compose_timer = Core::Timer::create_single_shot(
|
||||
0,
|
||||
[this] {
|
||||
compose();
|
||||
},
|
||||
this);
|
||||
this)
|
||||
.release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
init_bitmaps();
|
||||
}
|
||||
|
@ -1589,7 +1591,8 @@ void Compositor::start_window_stack_switch_overlay_timer()
|
|||
[this] {
|
||||
remove_window_stack_switch_overlays();
|
||||
},
|
||||
this);
|
||||
this)
|
||||
.release_value_but_fixme_should_propagate_errors();
|
||||
m_stack_switch_overlay_timer->start();
|
||||
}
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ void ConnectionFromClient::flash_menubar_menu(i32 window_id, i32 menu_id)
|
|||
return;
|
||||
weak_window->menubar().flash_menu(nullptr);
|
||||
weak_window->frame().invalidate_menubar();
|
||||
});
|
||||
}).release_value_but_fixme_should_propagate_errors();
|
||||
m_flashed_menu_timer->start();
|
||||
} else if (m_flashed_menu_timer) {
|
||||
m_flashed_menu_timer->restart();
|
||||
|
@ -1134,7 +1134,7 @@ void ConnectionFromClient::may_have_become_unresponsive()
|
|||
async_ping();
|
||||
m_ping_timer = Core::Timer::create_single_shot(1000, [this] {
|
||||
set_unresponsive(true);
|
||||
});
|
||||
}).release_value_but_fixme_should_propagate_errors();
|
||||
m_ping_timer->start();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue