summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/FilePicker.h
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-12-04 18:02:33 +0000
committerAndreas Kling <kling@serenityos.org>2022-12-06 08:54:33 +0100
commit6e19ab2bbce0b113b628e6f8e9b5c0640053933e (patch)
tree372d21b2f5dcff112f5d0089559c6af5798680d4 /Userland/Libraries/LibGUI/FilePicker.h
parentf74251606d74b504a1379ebb893fdb5529054ea5 (diff)
downloadserenity-6e19ab2bbce0b113b628e6f8e9b5c0640053933e.zip
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
Diffstat (limited to 'Userland/Libraries/LibGUI/FilePicker.h')
-rw-r--r--Userland/Libraries/LibGUI/FilePicker.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/Userland/Libraries/LibGUI/FilePicker.h b/Userland/Libraries/LibGUI/FilePicker.h
index 163082f537..20b8ff89e0 100644
--- a/Userland/Libraries/LibGUI/FilePicker.h
+++ b/Userland/Libraries/LibGUI/FilePicker.h
@@ -28,24 +28,24 @@ public:
Save
};
- static Optional<String> get_open_filepath(Window* parent_window, String const& window_title = {}, StringView path = Core::StandardPaths::home_directory(), bool folder = false, ScreenPosition screen_position = Dialog::ScreenPosition::CenterWithinParent);
- static Optional<String> get_save_filepath(Window* parent_window, String const& title, String const& extension, StringView path = Core::StandardPaths::home_directory(), ScreenPosition screen_position = Dialog::ScreenPosition::CenterWithinParent);
+ static Optional<DeprecatedString> get_open_filepath(Window* parent_window, DeprecatedString const& window_title = {}, StringView path = Core::StandardPaths::home_directory(), bool folder = false, ScreenPosition screen_position = Dialog::ScreenPosition::CenterWithinParent);
+ static Optional<DeprecatedString> get_save_filepath(Window* parent_window, DeprecatedString const& title, DeprecatedString const& extension, StringView path = Core::StandardPaths::home_directory(), ScreenPosition screen_position = Dialog::ScreenPosition::CenterWithinParent);
virtual ~FilePicker() override;
- String const& selected_file() const { return m_selected_file; }
+ DeprecatedString const& selected_file() const { return m_selected_file; }
private:
void on_file_return();
- void set_path(String const&);
+ void set_path(DeprecatedString const&);
// ^GUI::ModelClient
virtual void model_did_update(unsigned) override;
FilePicker(Window* parent_window, Mode type = Mode::Open, StringView filename = "Untitled"sv, StringView path = Core::StandardPaths::home_directory(), ScreenPosition screen_position = Dialog::ScreenPosition::CenterWithinParent);
- static String ok_button_name(Mode mode)
+ static DeprecatedString ok_button_name(Mode mode)
{
switch (mode) {
case Mode::Open:
@@ -60,13 +60,13 @@ private:
}
struct CommonLocationButton {
- String path;
+ DeprecatedString path;
size_t tray_item_index { 0 };
};
RefPtr<MultiView> m_view;
NonnullRefPtr<FileSystemModel> m_model;
- String m_selected_file;
+ DeprecatedString m_selected_file;
RefPtr<GUI::Label> m_error_label;