1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:17:35 +00:00

PixelPaint: Remove unused methods to access files directly

After transitioning to FileSystemAccessServer, some of the methods
in `MainWidget` and `ProjectLoader` for opening files directly with
a filename as opposed to with a file descriptor are unused. This
commit removes them.
This commit is contained in:
Mustafa Quraish 2021-09-11 13:59:00 -04:00 committed by Andreas Kling
parent f337580191
commit 1e1e5bb5f7
4 changed files with 0 additions and 22 deletions

View file

@ -63,13 +63,5 @@ Result<void, String> ProjectLoader::try_load_from_fd_and_close(int fd, StringVie
m_image = image;
return {};
}
Result<void, String> ProjectLoader::try_load_from_path(StringView path)
{
auto file_or_error = Core::File::open(path, Core::OpenMode::ReadOnly);
if (file_or_error.is_error())
return String::formatted("Unable to open file because: {}", file_or_error.release_error());
return try_load_from_fd_and_close(file_or_error.release_value()->leak_fd(), path);
}
}