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

LibCore: Remove CTimer::create() overloads in favor of construct()

This commit is contained in:
Andreas Kling 2019-09-21 18:13:17 +02:00
parent 9e00651e14
commit f4b51a63ec
13 changed files with 14 additions and 24 deletions

View file

@ -11,7 +11,7 @@
SprayTool::SprayTool()
{
m_timer = CTimer::create();
m_timer = CTimer::construct();
m_timer->on_timeout = [&]() {
paint_it();
};

View file

@ -52,7 +52,7 @@ int main(int argc, char** argv)
auto next_sample_buffer = loader.get_more_samples();
auto timer = CTimer::create(100, [&] {
auto timer = CTimer::construct(100, [&] {
if (!next_sample_buffer) {
sample_widget->set_buffer(nullptr);
return;

View file

@ -55,7 +55,7 @@ NetworkStatisticsWidget::NetworkStatisticsWidget(GWidget* parent)
net_tcp_fields.empend("bytes_out", "Bytes Out", TextAlignment::CenterRight);
m_socket_table_view->set_model(GJsonArrayModel::create("/proc/net/tcp", move(net_tcp_fields)));
m_update_timer = CTimer::create(
m_update_timer = CTimer::construct(
1000, [this] {
update_models();
},

View file

@ -11,7 +11,7 @@ ProcessStacksWidget::ProcessStacksWidget(GWidget* parent)
m_stacks_editor = GTextEditor::construct(GTextEditor::Type::MultiLine, this);
m_stacks_editor->set_readonly(true);
m_timer = CTimer::create(1000, [this] { refresh(); }, this);
m_timer = CTimer::construct(1000, [this] { refresh(); }, this);
}
ProcessStacksWidget::~ProcessStacksWidget()

View file

@ -111,7 +111,7 @@ int main(int argc, char** argv)
auto* process_table_view = new ProcessTableView(*cpu_graph, process_table_container);
auto* memory_stats_widget = new MemoryStatsWidget(*memory_graph, graphs_container);
auto refresh_timer = CTimer::create(1000, [&] {
auto refresh_timer = CTimer::construct(1000, [&] {
process_table_view->refresh();
memory_stats_widget->refresh();
});

View file

@ -25,8 +25,8 @@ TerminalWidget::TerminalWidget(int ptm_fd, RefPtr<CConfigFile> config)
, m_notifier(CNotifier::construct(ptm_fd, CNotifier::Read))
, m_config(move(config))
{
m_cursor_blink_timer = CTimer::create();
m_visual_beep_timer = CTimer::create();
m_cursor_blink_timer = CTimer::construct();
m_visual_beep_timer = CTimer::construct();
set_frame_shape(FrameShape::Container);
set_frame_shadow(FrameShadow::Sunken);