diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-07 02:15:10 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-08 00:35:27 +0100 |
commit | a7f1f1c34b99ad2bad25111746725c3736f9442f (patch) | |
tree | 7abde4d6302983a25eb3a95689e5a78ea1e405a5 /Userland/Applications/PixelPaint/PaletteWidget.cpp | |
parent | fac25501436dc3c85c0cb482942173240e94a5e4 (diff) | |
download | serenity-a7f1f1c34b99ad2bad25111746725c3736f9442f.zip |
LibCore: Use ErrorOr<T> for Core::File::open()
Diffstat (limited to 'Userland/Applications/PixelPaint/PaletteWidget.cpp')
-rw-r--r-- | Userland/Applications/PixelPaint/PaletteWidget.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Applications/PixelPaint/PaletteWidget.cpp b/Userland/Applications/PixelPaint/PaletteWidget.cpp index bae64b426c..d5adcf290c 100644 --- a/Userland/Applications/PixelPaint/PaletteWidget.cpp +++ b/Userland/Applications/PixelPaint/PaletteWidget.cpp @@ -15,6 +15,7 @@ #include <LibGUI/ColorPicker.h> #include <LibGUI/MessageBox.h> #include <LibGfx/Palette.h> +#include <string.h> REGISTER_WIDGET(PixelPaint, PaletteWidget); @@ -263,7 +264,7 @@ Result<Vector<Color>, String> PaletteWidget::load_palette_path(String const& fil { auto file_or_error = Core::File::open(file_path, Core::OpenMode::ReadOnly); if (file_or_error.is_error()) - return String { file_or_error.error().string() }; + return String { strerror(file_or_error.error().code()) }; auto& file = *file_or_error.value(); return load_palette_file(file); |