From 65fa7db2b5b94931c51e45478f6ab64634750466 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sat, 28 Jan 2023 20:12:17 +0000 Subject: [PATCH] PixelPaint: Remove `try_` prefix from fallible ProjectLoader methods --- Userland/Applications/PixelPaint/MainWidget.cpp | 2 +- Userland/Applications/PixelPaint/ProjectLoader.cpp | 2 +- Userland/Applications/PixelPaint/ProjectLoader.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Userland/Applications/PixelPaint/MainWidget.cpp b/Userland/Applications/PixelPaint/MainWidget.cpp index e1677f9c04..8138870e98 100644 --- a/Userland/Applications/PixelPaint/MainWidget.cpp +++ b/Userland/Applications/PixelPaint/MainWidget.cpp @@ -1097,7 +1097,7 @@ void MainWidget::set_actions_enabled(bool enabled) void MainWidget::open_image(FileSystemAccessClient::File file) { - auto try_load = m_loader.try_load_from_file(file.release_stream()); + auto try_load = m_loader.load_from_file(file.release_stream()); if (try_load.is_error()) { GUI::MessageBox::show_error(window(), DeprecatedString::formatted("Unable to open file: {}, {}", file.filename(), try_load.error())); return; diff --git a/Userland/Applications/PixelPaint/ProjectLoader.cpp b/Userland/Applications/PixelPaint/ProjectLoader.cpp index c00e435204..020beb5423 100644 --- a/Userland/Applications/PixelPaint/ProjectLoader.cpp +++ b/Userland/Applications/PixelPaint/ProjectLoader.cpp @@ -15,7 +15,7 @@ namespace PixelPaint { -ErrorOr ProjectLoader::try_load_from_file(NonnullOwnPtr file) +ErrorOr ProjectLoader::load_from_file(NonnullOwnPtr file) { auto contents = TRY(file->read_until_eof()); diff --git a/Userland/Applications/PixelPaint/ProjectLoader.h b/Userland/Applications/PixelPaint/ProjectLoader.h index 3acf3f0cdd..d16c7fef1a 100644 --- a/Userland/Applications/PixelPaint/ProjectLoader.h +++ b/Userland/Applications/PixelPaint/ProjectLoader.h @@ -18,7 +18,7 @@ public: ProjectLoader() = default; ~ProjectLoader() = default; - ErrorOr try_load_from_file(NonnullOwnPtr); + ErrorOr load_from_file(NonnullOwnPtr); bool is_raw_image() const { return m_is_raw_image; } bool has_image() const { return !m_image.is_null(); }