mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:27:35 +00:00
Userland: Compare event MIME type list with a StringView
The following commit will port MIME types to String. Traits<String> - used in Vector::contains_slow - can't compare String type with char*, so we need to use StringView instead.
This commit is contained in:
parent
2f35348104
commit
e75d694974
16 changed files with 16 additions and 16 deletions
|
@ -128,7 +128,7 @@ private:
|
|||
void GLContextWidget::drag_enter_event(GUI::DragEvent& event)
|
||||
{
|
||||
auto const& mime_types = event.mime_types();
|
||||
if (mime_types.contains_slow("text/uri-list"))
|
||||
if (mime_types.contains_slow("text/uri-list"sv))
|
||||
event.accept();
|
||||
}
|
||||
|
||||
|
|
|
@ -987,7 +987,7 @@ void MainWidget::update_preview()
|
|||
void MainWidget::drag_enter_event(GUI::DragEvent& event)
|
||||
{
|
||||
auto const& mime_types = event.mime_types();
|
||||
if (mime_types.contains_slow("text/uri-list"))
|
||||
if (mime_types.contains_slow("text/uri-list"sv))
|
||||
event.accept();
|
||||
}
|
||||
|
||||
|
|
|
@ -624,7 +624,7 @@ void HexEditorWidget::set_value_inspector_visible(bool visible)
|
|||
void HexEditorWidget::drag_enter_event(GUI::DragEvent& event)
|
||||
{
|
||||
auto const& mime_types = event.mime_types();
|
||||
if (mime_types.contains_slow("text/uri-list"))
|
||||
if (mime_types.contains_slow("text/uri-list"sv))
|
||||
event.accept();
|
||||
}
|
||||
|
||||
|
|
|
@ -283,7 +283,7 @@ ErrorOr<void> ViewWidget::try_open_file(String const& path, Core::File& file)
|
|||
void ViewWidget::drag_enter_event(GUI::DragEvent& event)
|
||||
{
|
||||
auto const& mime_types = event.mime_types();
|
||||
if (mime_types.contains_slow("text/uri-list"))
|
||||
if (mime_types.contains_slow("text/uri-list"sv))
|
||||
event.accept();
|
||||
}
|
||||
|
||||
|
|
|
@ -1473,7 +1473,7 @@ ImageEditor& MainWidget::create_new_editor(NonnullRefPtr<Image> image)
|
|||
void MainWidget::drag_enter_event(GUI::DragEvent& event)
|
||||
{
|
||||
auto const& mime_types = event.mime_types();
|
||||
if (mime_types.contains_slow("text/uri-list"))
|
||||
if (mime_types.contains_slow("text/uri-list"sv))
|
||||
event.accept();
|
||||
}
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ void PresenterWidget::second_paint_event(GUI::PaintEvent& event)
|
|||
void PresenterWidget::drag_enter_event(GUI::DragEvent& event)
|
||||
{
|
||||
auto const& mime_types = event.mime_types();
|
||||
if (mime_types.contains_slow("text/uri-list"))
|
||||
if (mime_types.contains_slow("text/uri-list"sv))
|
||||
event.accept();
|
||||
}
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ void SoundPlayerWidget::set_nonlinear_volume_slider(bool nonlinear)
|
|||
void SoundPlayerWidget::drag_enter_event(GUI::DragEvent& event)
|
||||
{
|
||||
auto const& mime_types = event.mime_types();
|
||||
if (mime_types.contains_slow("text/uri-list"))
|
||||
if (mime_types.contains_slow("text/uri-list"sv))
|
||||
event.accept();
|
||||
}
|
||||
|
||||
|
|
|
@ -832,7 +832,7 @@ bool MainWidget::request_close()
|
|||
void MainWidget::drag_enter_event(GUI::DragEvent& event)
|
||||
{
|
||||
auto const& mime_types = event.mime_types();
|
||||
if (mime_types.contains_slow("text/uri-list"))
|
||||
if (mime_types.contains_slow("text/uri-list"sv))
|
||||
event.accept();
|
||||
}
|
||||
|
||||
|
|
|
@ -678,7 +678,7 @@ ErrorOr<void> MainWidget::load_from_file(String const& filename, NonnullOwnPtr<C
|
|||
void MainWidget::drag_enter_event(GUI::DragEvent& event)
|
||||
{
|
||||
auto const& mime_types = event.mime_types();
|
||||
if (mime_types.contains_slow("text/uri-list"))
|
||||
if (mime_types.contains_slow("text/uri-list"sv))
|
||||
event.accept();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue