mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:47:44 +00:00
PixelPaint: Remove try_
prefix from fallible ProjectLoader methods
This commit is contained in:
parent
86f28ceace
commit
65fa7db2b5
3 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
namespace PixelPaint {
|
||||
|
||||
ErrorOr<void> ProjectLoader::try_load_from_file(NonnullOwnPtr<Core::Stream::File> file)
|
||||
ErrorOr<void> ProjectLoader::load_from_file(NonnullOwnPtr<Core::Stream::File> file)
|
||||
{
|
||||
auto contents = TRY(file->read_until_eof());
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
ProjectLoader() = default;
|
||||
~ProjectLoader() = default;
|
||||
|
||||
ErrorOr<void> try_load_from_file(NonnullOwnPtr<Core::Stream::File>);
|
||||
ErrorOr<void> load_from_file(NonnullOwnPtr<Core::Stream::File>);
|
||||
|
||||
bool is_raw_image() const { return m_is_raw_image; }
|
||||
bool has_image() const { return !m_image.is_null(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue