From 652f87821b8a01ae8a4c369d2a1f95755be4c2d5 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 11 Jan 2023 17:27:28 +0000 Subject: [PATCH] Userland: Replace remaining Core::Timer::construct()s with try_create() --- Userland/Applications/ImageViewer/ViewWidget.cpp | 2 +- Userland/Applications/Spreadsheet/SpreadsheetView.h | 4 ++-- Userland/Libraries/LibGUI/ImageWidget.cpp | 2 +- Userland/Libraries/LibWeb/Platform/TimerSerenity.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Userland/Applications/ImageViewer/ViewWidget.cpp b/Userland/Applications/ImageViewer/ViewWidget.cpp index 397fe533db..258b053d10 100644 --- a/Userland/Applications/ImageViewer/ViewWidget.cpp +++ b/Userland/Applications/ImageViewer/ViewWidget.cpp @@ -24,7 +24,7 @@ namespace ImageViewer { ViewWidget::ViewWidget() - : m_timer(Core::Timer::construct()) + : m_timer(Core::Timer::try_create().release_value_but_fixme_should_propagate_errors()) { set_fill_with_background_color(false); } diff --git a/Userland/Applications/Spreadsheet/SpreadsheetView.h b/Userland/Applications/Spreadsheet/SpreadsheetView.h index 911644d074..829b98a151 100644 --- a/Userland/Applications/Spreadsheet/SpreadsheetView.h +++ b/Userland/Applications/Spreadsheet/SpreadsheetView.h @@ -64,8 +64,8 @@ public: private: InfinitelyScrollableTableView() - : m_horizontal_scroll_end_timer(Core::Timer::construct()) - , m_vertical_scroll_end_timer(Core::Timer::construct()) + : m_horizontal_scroll_end_timer(Core::Timer::try_create().release_value_but_fixme_should_propagate_errors()) + , m_vertical_scroll_end_timer(Core::Timer::try_create().release_value_but_fixme_should_propagate_errors()) { } virtual void did_scroll() override; diff --git a/Userland/Libraries/LibGUI/ImageWidget.cpp b/Userland/Libraries/LibGUI/ImageWidget.cpp index 8e37a067a7..27c42b407a 100644 --- a/Userland/Libraries/LibGUI/ImageWidget.cpp +++ b/Userland/Libraries/LibGUI/ImageWidget.cpp @@ -16,7 +16,7 @@ REGISTER_WIDGET(GUI, ImageWidget) namespace GUI { ImageWidget::ImageWidget(StringView) - : m_timer(Core::Timer::construct()) + : m_timer(Core::Timer::try_create().release_value_but_fixme_should_propagate_errors()) { set_frame_thickness(0); diff --git a/Userland/Libraries/LibWeb/Platform/TimerSerenity.cpp b/Userland/Libraries/LibWeb/Platform/TimerSerenity.cpp index cef22b8768..eef24ee22f 100644 --- a/Userland/Libraries/LibWeb/Platform/TimerSerenity.cpp +++ b/Userland/Libraries/LibWeb/Platform/TimerSerenity.cpp @@ -16,7 +16,7 @@ NonnullRefPtr TimerSerenity::create() } TimerSerenity::TimerSerenity() - : m_timer(Core::Timer::construct()) + : m_timer(Core::Timer::try_create().release_value_but_fixme_should_propagate_errors()) { m_timer->on_timeout = [this] { if (on_timeout)