1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

Userland: Take StringView in MimeData::data() and has_{format,text,urls}

This commit is contained in:
Karol Kosek 2023-08-21 16:45:46 +02:00 committed by Sam Atkins
parent d054116012
commit 4f638d3af2
4 changed files with 9 additions and 9 deletions

View file

@ -28,8 +28,8 @@ DragOperation::Outcome DragOperation::exec()
VERIFY(m_mime_data);
Gfx::ShareableBitmap drag_bitmap;
if (m_mime_data->has_format("image/x-raw-bitmap")) {
auto data = m_mime_data->data("image/x-raw-bitmap");
if (m_mime_data->has_format("image/x-raw-bitmap"sv)) {
auto data = m_mime_data->data("image/x-raw-bitmap"sv);
auto bitmap = Gfx::Bitmap::create_from_serialized_byte_buffer(move(data)).release_value_but_fixme_should_propagate_errors();
drag_bitmap = bitmap->to_shareable_bitmap();
}