1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 19:57:45 +00:00

SpiceAgent: Rename ClipboardType::JPG to ClipboardType::JPEG

This commit is contained in:
Lucas CHOLLET 2023-02-18 16:11:05 -05:00 committed by Andreas Kling
parent 856d0202f2
commit 9c1dbf1ac5
2 changed files with 4 additions and 4 deletions

View file

@ -46,7 +46,7 @@ Optional<SpiceAgent::ClipboardType> SpiceAgent::mime_type_to_clipboard_type(Depr
if (mime == "text/plain") if (mime == "text/plain")
return ClipboardType::Text; return ClipboardType::Text;
else if (mime == "image/jpeg") else if (mime == "image/jpeg")
return ClipboardType::JPG; return ClipboardType::JPEG;
else if (mime == "image/bmp") else if (mime == "image/bmp")
return ClipboardType::BMP; return ClipboardType::BMP;
else if (mime == "image/png" || mime == "image/x-serenityos") else if (mime == "image/png" || mime == "image/x-serenityos")
@ -100,7 +100,7 @@ void SpiceAgent::on_message_received()
switch (type) { switch (type) {
case ClipboardType::PNG: case ClipboardType::PNG:
case ClipboardType::BMP: case ClipboardType::BMP:
case ClipboardType::JPG: case ClipboardType::JPEG:
found_type = type; found_type = type;
break; break;
default: default:
@ -153,7 +153,7 @@ void SpiceAgent::on_message_received()
if (bmp_decoder->initialize()) if (bmp_decoder->initialize())
frame_or_error = bmp_decoder->frame(0); frame_or_error = bmp_decoder->frame(0);
} }
} else if (type == ClipboardType::JPG) { } else if (type == ClipboardType::JPEG) {
if (Gfx::JPEGImageDecoderPlugin::sniff({ data_buffer.data(), data_buffer.size() }).release_value_but_fixme_should_propagate_errors()) { if (Gfx::JPEGImageDecoderPlugin::sniff({ data_buffer.data(), data_buffer.size() }).release_value_but_fixme_should_propagate_errors()) {
auto jpeg_decoder = Gfx::JPEGImageDecoderPlugin::create({ data_buffer.data(), data_buffer.size() }).release_value_but_fixme_should_propagate_errors(); auto jpeg_decoder = Gfx::JPEGImageDecoderPlugin::create({ data_buffer.data(), data_buffer.size() }).release_value_but_fixme_should_propagate_errors();
if (jpeg_decoder->initialize()) if (jpeg_decoder->initialize())

View file

@ -81,7 +81,7 @@ public:
PNG, PNG,
BMP, BMP,
TIFF, TIFF,
JPG, JPEG,
FileList, FileList,
__Count __Count
}; };