mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
LibGUI: Tweak API for getting the selected path
Return a String instead of a LexicalPath. Also call it a path instead of a file since that's what we're really returning.
This commit is contained in:
@@ -37,7 +37,7 @@ Optional<String> FilePicker::get_open_filepath(Window* parent_window, const Stri
|
||||
picker->set_title(window_title);
|
||||
|
||||
if (picker->exec() == Dialog::ExecOK) {
|
||||
String file_path = picker->selected_file().string();
|
||||
String file_path = picker->selected_file();
|
||||
|
||||
if (file_path.is_null())
|
||||
return {};
|
||||
@@ -52,7 +52,7 @@ Optional<String> FilePicker::get_save_filepath(Window* parent_window, const Stri
|
||||
auto picker = FilePicker::construct(parent_window, Mode::Save, String::formatted("{}.{}", title, extension), path);
|
||||
|
||||
if (picker->exec() == Dialog::ExecOK) {
|
||||
String file_path = picker->selected_file().string();
|
||||
String file_path = picker->selected_file();
|
||||
|
||||
if (file_path.is_null())
|
||||
return {};
|
||||
@@ -255,7 +255,7 @@ void FilePicker::on_file_return()
|
||||
return;
|
||||
}
|
||||
|
||||
m_selected_file = path;
|
||||
m_selected_file = path.string();
|
||||
done(ExecOK);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user