diff options
author | Mustafa Quraish <mustafaq9@gmail.com> | 2021-09-11 13:59:00 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-12 00:17:04 +0200 |
commit | 1e1e5bb5f7a1c086078d1c289c511a59e3157db4 (patch) | |
tree | b0fd84fd8e7bc5beb7a03fc102b8da8f40ca3b42 /Userland/Applications/PixelPaint/ProjectLoader.cpp | |
parent | f3375801912118637d96da9f795fdc2bf0160f50 (diff) | |
download | serenity-1e1e5bb5f7a1c086078d1c289c511a59e3157db4.zip |
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.
Diffstat (limited to 'Userland/Applications/PixelPaint/ProjectLoader.cpp')
-rw-r--r-- | Userland/Applications/PixelPaint/ProjectLoader.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/Userland/Applications/PixelPaint/ProjectLoader.cpp b/Userland/Applications/PixelPaint/ProjectLoader.cpp index 51c83736a2..a6c703fe7e 100644 --- a/Userland/Applications/PixelPaint/ProjectLoader.cpp +++ b/Userland/Applications/PixelPaint/ProjectLoader.cpp @@ -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); -} } |