mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-27 12:46:06 +00:00
LibURL: Port create_with_file_scheme to Optional
Removing one of the main remaining users of URL valid state.
This commit is contained in:
parent
2072eee83d
commit
00bbb2105b
Notes:
github-actions[bot]
2025-04-19 11:20:14 +00:00
Author: https://github.com/shannonbooth
Commit: 00bbb2105b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4401
Reviewed-by: https://github.com/trflynn89 ✅
5 changed files with 18 additions and 16 deletions
|
@ -119,8 +119,8 @@ Web::DragEvent ns_event_to_drag_event(Web::DragEvent::Type type, id<NSDraggingIn
|
|||
Vector<URL::URL> urls;
|
||||
|
||||
for_each_file([&](ByteString const& file_path) {
|
||||
if (auto url = URL::create_with_url_or_path(file_path); url.is_valid())
|
||||
urls.append(move(url));
|
||||
if (auto url = URL::create_with_url_or_path(file_path); url.has_value())
|
||||
urls.append(url.release_value());
|
||||
});
|
||||
|
||||
browser_data = make<DragData>(move(urls));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue