diff options
Diffstat (limited to 'Userland/Libraries/LibGUI')
51 files changed, 97 insertions, 97 deletions
diff --git a/Userland/Libraries/LibGUI/AboutDialog.cpp b/Userland/Libraries/LibGUI/AboutDialog.cpp index ba657eed0d..abda05c205 100644 --- a/Userland/Libraries/LibGUI/AboutDialog.cpp +++ b/Userland/Libraries/LibGUI/AboutDialog.cpp @@ -16,7 +16,7 @@ namespace GUI { -AboutDialog::AboutDialog(const StringView& name, const Gfx::Bitmap* icon, Window* parent_window, const StringView& version) +AboutDialog::AboutDialog(StringView name, const Gfx::Bitmap* icon, Window* parent_window, StringView version) : Dialog(parent_window) , m_name(name) , m_icon(icon) @@ -58,7 +58,7 @@ AboutDialog::AboutDialog(const StringView& name, const Gfx::Bitmap* icon, Window right_container.set_layout<VerticalBoxLayout>(); right_container.layout()->set_margins({ 12, 4, 4, 0 }); - auto make_label = [&](const StringView& text, bool bold = false) { + auto make_label = [&](StringView text, bool bold = false) { auto& label = right_container.add<Label>(text); label.set_text_alignment(Gfx::TextAlignment::CenterLeft); label.set_fixed_height(14); diff --git a/Userland/Libraries/LibGUI/AboutDialog.h b/Userland/Libraries/LibGUI/AboutDialog.h index 3d41704498..840ae8295e 100644 --- a/Userland/Libraries/LibGUI/AboutDialog.h +++ b/Userland/Libraries/LibGUI/AboutDialog.h @@ -16,7 +16,7 @@ class AboutDialog final : public Dialog { public: virtual ~AboutDialog() override; - static void show(const StringView& name, const Gfx::Bitmap* icon = nullptr, Window* parent_window = nullptr, const Gfx::Bitmap* window_icon = nullptr, const StringView& version = Core::Version::SERENITY_VERSION) + static void show(StringView name, const Gfx::Bitmap* icon = nullptr, Window* parent_window = nullptr, const Gfx::Bitmap* window_icon = nullptr, StringView version = Core::Version::SERENITY_VERSION) { auto dialog = AboutDialog::construct(name, icon, parent_window, version); if (window_icon) @@ -25,7 +25,7 @@ public: } private: - AboutDialog(const StringView& name, const Gfx::Bitmap* icon = nullptr, Window* parent_window = nullptr, const StringView& version = Core::Version::SERENITY_VERSION); + AboutDialog(StringView name, const Gfx::Bitmap* icon = nullptr, Window* parent_window = nullptr, StringView version = Core::Version::SERENITY_VERSION); String m_name; RefPtr<Gfx::Bitmap> m_icon; diff --git a/Userland/Libraries/LibGUI/AbstractView.cpp b/Userland/Libraries/LibGUI/AbstractView.cpp index 77eab48f55..1af93ffa35 100644 --- a/Userland/Libraries/LibGUI/AbstractView.cpp +++ b/Userland/Libraries/LibGUI/AbstractView.cpp @@ -684,7 +684,7 @@ void AbstractView::set_searchable(bool searchable) stop_highlighted_search_timer(); } -void AbstractView::draw_item_text(Gfx::Painter& painter, ModelIndex const& index, bool is_selected, Gfx::IntRect const& text_rect, StringView const& item_text, Gfx::Font const& font, Gfx::TextAlignment alignment, Gfx::TextElision elision, size_t search_highlighting_offset) +void AbstractView::draw_item_text(Gfx::Painter& painter, ModelIndex const& index, bool is_selected, Gfx::IntRect const& text_rect, StringView item_text, Gfx::Font const& font, Gfx::TextAlignment alignment, Gfx::TextElision elision, size_t search_highlighting_offset) { if (m_edit_index == index) return; diff --git a/Userland/Libraries/LibGUI/AbstractView.h b/Userland/Libraries/LibGUI/AbstractView.h index ded681917e..cc13084541 100644 --- a/Userland/Libraries/LibGUI/AbstractView.h +++ b/Userland/Libraries/LibGUI/AbstractView.h @@ -154,7 +154,7 @@ protected: virtual void did_change_cursor_index([[maybe_unused]] ModelIndex const& old_index, [[maybe_unused]] ModelIndex const& new_index) { } virtual void editing_widget_did_change([[maybe_unused]] ModelIndex const& index) { } - void draw_item_text(Gfx::Painter&, ModelIndex const&, bool, Gfx::IntRect const&, StringView const&, Gfx::Font const&, Gfx::TextAlignment, Gfx::TextElision, size_t search_highlighting_offset = 0); + void draw_item_text(Gfx::Painter&, ModelIndex const&, bool, Gfx::IntRect const&, StringView, Gfx::Font const&, Gfx::TextAlignment, Gfx::TextElision, size_t search_highlighting_offset = 0); void set_suppress_update_on_selection_change(bool value) { m_suppress_update_on_selection_change = value; } diff --git a/Userland/Libraries/LibGUI/ComboBox.cpp b/Userland/Libraries/LibGUI/ComboBox.cpp index 3d7ac21772..aae3474a07 100644 --- a/Userland/Libraries/LibGUI/ComboBox.cpp +++ b/Userland/Libraries/LibGUI/ComboBox.cpp @@ -141,7 +141,7 @@ ComboBox::~ComboBox() { } -void ComboBox::set_editor_placeholder(const StringView& placeholder) +void ComboBox::set_editor_placeholder(StringView placeholder) { m_editor->set_placeholder(placeholder); } diff --git a/Userland/Libraries/LibGUI/ComboBox.h b/Userland/Libraries/LibGUI/ComboBox.h index 6c76d2d5ba..a772718838 100644 --- a/Userland/Libraries/LibGUI/ComboBox.h +++ b/Userland/Libraries/LibGUI/ComboBox.h @@ -40,7 +40,7 @@ public: int model_column() const; void set_model_column(int); - void set_editor_placeholder(const StringView& placeholder); + void set_editor_placeholder(StringView placeholder); const String& editor_placeholder() const; Function<void(const String&, const ModelIndex&)> on_change; diff --git a/Userland/Libraries/LibGUI/Desktop.cpp b/Userland/Libraries/LibGUI/Desktop.cpp index ce9bf989b9..0fcf69dc23 100644 --- a/Userland/Libraries/LibGUI/Desktop.cpp +++ b/Userland/Libraries/LibGUI/Desktop.cpp @@ -45,17 +45,17 @@ void Desktop::did_receive_screen_rects(Badge<WindowServerConnection>, const Vect callback(*this); } -void Desktop::set_background_color(const StringView& background_color) +void Desktop::set_background_color(StringView background_color) { WindowServerConnection::the().async_set_background_color(background_color); } -void Desktop::set_wallpaper_mode(const StringView& mode) +void Desktop::set_wallpaper_mode(StringView mode) { WindowServerConnection::the().async_set_wallpaper_mode(mode); } -bool Desktop::set_wallpaper(const StringView& path, bool save_config) +bool Desktop::set_wallpaper(StringView path, bool save_config) { WindowServerConnection::the().async_set_wallpaper(path); auto ret_val = WindowServerConnection::the().wait_for_specific_message<Messages::WindowClient::SetWallpaperFinished>()->success(); diff --git a/Userland/Libraries/LibGUI/Desktop.h b/Userland/Libraries/LibGUI/Desktop.h index 554b723ad4..9dc0842923 100644 --- a/Userland/Libraries/LibGUI/Desktop.h +++ b/Userland/Libraries/LibGUI/Desktop.h @@ -25,12 +25,12 @@ public: static Desktop& the(); Desktop(); - void set_background_color(const StringView& background_color); + void set_background_color(StringView background_color); - void set_wallpaper_mode(const StringView& mode); + void set_wallpaper_mode(StringView mode); String wallpaper() const; - bool set_wallpaper(const StringView& path, bool save_config = true); + bool set_wallpaper(StringView path, bool save_config = true); Gfx::IntRect rect() const { return m_bounding_rect; } const Vector<Gfx::IntRect, 4>& rects() const { return m_rects; } diff --git a/Userland/Libraries/LibGUI/EmojiInputDialog.cpp b/Userland/Libraries/LibGUI/EmojiInputDialog.cpp index b1ec3267c1..5553f0f3e5 100644 --- a/Userland/Libraries/LibGUI/EmojiInputDialog.cpp +++ b/Userland/Libraries/LibGUI/EmojiInputDialog.cpp @@ -26,7 +26,7 @@ static Vector<u32> supported_emoji_code_points() auto lexical_path = LexicalPath(filename); if (lexical_path.extension() != "png") continue; - auto& basename = lexical_path.basename(); + auto basename = lexical_path.basename(); if (!basename.starts_with("U+")) continue; u32 code_point = strtoul(basename.to_string().characters() + 2, nullptr, 16); diff --git a/Userland/Libraries/LibGUI/Event.h b/Userland/Libraries/LibGUI/Event.h index 4f174225ae..13e7b3953b 100644 --- a/Userland/Libraries/LibGUI/Event.h +++ b/Userland/Libraries/LibGUI/Event.h @@ -138,7 +138,7 @@ public: class WMWindowStateChangedEvent : public WMEvent { public: - WMWindowStateChangedEvent(int client_id, int window_id, int parent_client_id, int parent_window_id, const StringView& title, const Gfx::IntRect& rect, unsigned virtual_desktop_row, unsigned virtual_desktop_column, bool is_active, bool is_modal, WindowType window_type, bool is_minimized, bool is_frameless, Optional<int> progress) + WMWindowStateChangedEvent(int client_id, int window_id, int parent_client_id, int parent_window_id, StringView title, const Gfx::IntRect& rect, unsigned virtual_desktop_row, unsigned virtual_desktop_column, bool is_active, bool is_modal, WindowType window_type, bool is_minimized, bool is_frameless, Optional<int> progress) : WMEvent(Event::Type::WM_WindowStateChanged, client_id, window_id) , m_parent_client_id(parent_client_id) , m_parent_window_id(parent_window_id) diff --git a/Userland/Libraries/LibGUI/FilePicker.cpp b/Userland/Libraries/LibGUI/FilePicker.cpp index 04d264b7cc..a92a3006f9 100644 --- a/Userland/Libraries/LibGUI/FilePicker.cpp +++ b/Userland/Libraries/LibGUI/FilePicker.cpp @@ -32,7 +32,7 @@ namespace GUI { -Optional<String> FilePicker::get_open_filepath(Window* parent_window, const String& window_title, const StringView& path, bool folder, ScreenPosition screen_position) +Optional<String> FilePicker::get_open_filepath(Window* parent_window, const String& window_title, StringView path, bool folder, ScreenPosition screen_position) { auto picker = FilePicker::construct(parent_window, folder ? Mode::OpenFolder : Mode::Open, "", path, screen_position); @@ -50,7 +50,7 @@ Optional<String> FilePicker::get_open_filepath(Window* parent_window, const Stri return {}; } -Optional<String> FilePicker::get_save_filepath(Window* parent_window, const String& title, const String& extension, const StringView& path, ScreenPosition screen_position) +Optional<String> FilePicker::get_save_filepath(Window* parent_window, const String& title, const String& extension, StringView path, ScreenPosition screen_position) { auto picker = FilePicker::construct(parent_window, Mode::Save, String::formatted("{}.{}", title, extension), path, screen_position); @@ -65,7 +65,7 @@ Optional<String> FilePicker::get_save_filepath(Window* parent_window, const Stri return {}; } -FilePicker::FilePicker(Window* parent_window, Mode mode, const StringView& filename, const StringView& path, ScreenPosition screen_position) +FilePicker::FilePicker(Window* parent_window, Mode mode, StringView filename, StringView path, ScreenPosition screen_position) : Dialog(parent_window, screen_position) , m_model(FileSystemModel::create(path)) , m_mode(mode) diff --git a/Userland/Libraries/LibGUI/FilePicker.h b/Userland/Libraries/LibGUI/FilePicker.h index 149016fcd3..1152e95f4a 100644 --- a/Userland/Libraries/LibGUI/FilePicker.h +++ b/Userland/Libraries/LibGUI/FilePicker.h @@ -28,8 +28,8 @@ public: Save }; - static Optional<String> get_open_filepath(Window* parent_window, const String& window_title = {}, const StringView& path = Core::StandardPaths::home_directory(), bool folder = false, ScreenPosition screen_position = Dialog::ScreenPosition::CenterWithinParent); - static Optional<String> get_save_filepath(Window* parent_window, const String& title, const String& extension, const StringView& path = Core::StandardPaths::home_directory(), ScreenPosition screen_position = Dialog::ScreenPosition::CenterWithinParent); + static Optional<String> get_open_filepath(Window* parent_window, const String& 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, const String& title, const String& extension, StringView path = Core::StandardPaths::home_directory(), ScreenPosition screen_position = Dialog::ScreenPosition::CenterWithinParent); virtual ~FilePicker() override; @@ -43,7 +43,7 @@ private: // ^GUI::ModelClient virtual void model_did_update(unsigned) override; - FilePicker(Window* parent_window, Mode type = Mode::Open, const StringView& filename = "Untitled", const StringView& path = Core::StandardPaths::home_directory(), ScreenPosition screen_position = Dialog::ScreenPosition::CenterWithinParent); + FilePicker(Window* parent_window, Mode type = Mode::Open, StringView filename = "Untitled", StringView path = Core::StandardPaths::home_directory(), ScreenPosition screen_position = Dialog::ScreenPosition::CenterWithinParent); static String ok_button_name(Mode mode) { diff --git a/Userland/Libraries/LibGUI/FileSystemModel.cpp b/Userland/Libraries/LibGUI/FileSystemModel.cpp index 014f73a99c..0a71f25062 100644 --- a/Userland/Libraries/LibGUI/FileSystemModel.cpp +++ b/Userland/Libraries/LibGUI/FileSystemModel.cpp @@ -615,7 +615,7 @@ Icon FileSystemModel::icon_for(Node const& node) const static HashMap<String, RefPtr<Gfx::Bitmap>> s_thumbnail_cache; -static RefPtr<Gfx::Bitmap> render_thumbnail(StringView const& path) +static RefPtr<Gfx::Bitmap> render_thumbnail(StringView path) { auto bitmap_or_error = Gfx::Bitmap::try_load_from_file(path); if (bitmap_or_error.is_error()) @@ -760,7 +760,7 @@ void FileSystemModel::set_data(ModelIndex const& index, Variant const& data) on_rename_successful(node.full_path(), new_full_path); } -Vector<ModelIndex> FileSystemModel::matches(StringView const& searching, unsigned flags, ModelIndex const& index) +Vector<ModelIndex> FileSystemModel::matches(StringView searching, unsigned flags, ModelIndex const& index) { Node& node = const_cast<Node&>(this->node(index)); node.reify_if_needed(); diff --git a/Userland/Libraries/LibGUI/FileSystemModel.h b/Userland/Libraries/LibGUI/FileSystemModel.h index 67973e5625..4eede5e947 100644 --- a/Userland/Libraries/LibGUI/FileSystemModel.h +++ b/Userland/Libraries/LibGUI/FileSystemModel.h @@ -133,7 +133,7 @@ public: virtual bool is_editable(ModelIndex const&) const override; virtual bool is_searchable() const override { return true; } virtual void set_data(ModelIndex const&, Variant const&) override; - virtual Vector<ModelIndex> matches(StringView const&, unsigned = MatchesFlag::AllMatching, ModelIndex const& = ModelIndex()) override; + virtual Vector<ModelIndex> matches(StringView, unsigned = MatchesFlag::AllMatching, ModelIndex const& = ModelIndex()) override; virtual void invalidate() override; static String timestamp_string(time_t timestamp) diff --git a/Userland/Libraries/LibGUI/FilteringProxyModel.cpp b/Userland/Libraries/LibGUI/FilteringProxyModel.cpp index c3b884453c..23df13616c 100644 --- a/Userland/Libraries/LibGUI/FilteringProxyModel.cpp +++ b/Userland/Libraries/LibGUI/FilteringProxyModel.cpp @@ -79,7 +79,7 @@ void FilteringProxyModel::filter() add_matching(parent_index); } -void FilteringProxyModel::set_filter_term(StringView const& term) +void FilteringProxyModel::set_filter_term(StringView term) { if (m_filter_term == term) return; @@ -104,7 +104,7 @@ bool FilteringProxyModel::is_searchable() const return m_model.is_searchable(); } -Vector<ModelIndex> FilteringProxyModel::matches(StringView const& searching, unsigned flags, ModelIndex const& index) +Vector<ModelIndex> FilteringProxyModel::matches(StringView searching, unsigned flags, ModelIndex const& index) { auto found_indices = m_model.matches(searching, flags, index); for (size_t i = 0; i < found_indices.size(); i++) diff --git a/Userland/Libraries/LibGUI/FilteringProxyModel.h b/Userland/Libraries/LibGUI/FilteringProxyModel.h index 27689123df..b642e55b07 100644 --- a/Userland/Libraries/LibGUI/FilteringProxyModel.h +++ b/Userland/Libraries/LibGUI/FilteringProxyModel.h @@ -29,9 +29,9 @@ public: virtual void invalidate() override; virtual ModelIndex index(int row, int column = 0, ModelIndex const& parent = ModelIndex()) const override; virtual bool is_searchable() const override; - virtual Vector<ModelIndex> matches(StringView const&, unsigned = MatchesFlag::AllMatching, ModelIndex const& = ModelIndex()) override; + virtual Vector<ModelIndex> matches(StringView, unsigned = MatchesFlag::AllMatching, ModelIndex const& = ModelIndex()) override; - void set_filter_term(StringView const& term); + void set_filter_term(StringView term); ModelIndex map(ModelIndex const&) const; diff --git a/Userland/Libraries/LibGUI/GMLAutocompleteProvider.h b/Userland/Libraries/LibGUI/GMLAutocompleteProvider.h index b08e30db51..85133f8e45 100644 --- a/Userland/Libraries/LibGUI/GMLAutocompleteProvider.h +++ b/Userland/Libraries/LibGUI/GMLAutocompleteProvider.h @@ -16,7 +16,7 @@ public: virtual ~GMLAutocompleteProvider() override { } private: - static bool can_have_declared_layout(const StringView& class_name) + static bool can_have_declared_layout(StringView class_name) { return class_name.is_one_of("GUI::Widget", "GUI::Frame"); } diff --git a/Userland/Libraries/LibGUI/GMLFormatter.cpp b/Userland/Libraries/LibGUI/GMLFormatter.cpp index 2391d4a4c4..07f378fbcc 100644 --- a/Userland/Libraries/LibGUI/GMLFormatter.cpp +++ b/Userland/Libraries/LibGUI/GMLFormatter.cpp @@ -86,7 +86,7 @@ static String format_gml_object(const JsonObject& node, size_t indentation = 0, return builder.to_string(); } -String format_gml(const StringView& string) +String format_gml(StringView string) { // FIXME: Preserve comments somehow, they're not contained // in the JSON object returned by parse_gml() diff --git a/Userland/Libraries/LibGUI/GMLFormatter.h b/Userland/Libraries/LibGUI/GMLFormatter.h index 7f2a0a50b7..0f3c347b67 100644 --- a/Userland/Libraries/LibGUI/GMLFormatter.h +++ b/Userland/Libraries/LibGUI/GMLFormatter.h @@ -10,6 +10,6 @@ namespace GUI { -String format_gml(const StringView&); +String format_gml(StringView); } diff --git a/Userland/Libraries/LibGUI/GMLLexer.cpp b/Userland/Libraries/LibGUI/GMLLexer.cpp index e884e087ca..72fc43eba6 100644 --- a/Userland/Libraries/LibGUI/GMLLexer.cpp +++ b/Userland/Libraries/LibGUI/GMLLexer.cpp @@ -10,7 +10,7 @@ namespace GUI { -GMLLexer::GMLLexer(StringView const& input) +GMLLexer::GMLLexer(StringView input) : m_input(input) { } diff --git a/Userland/Libraries/LibGUI/GMLLexer.h b/Userland/Libraries/LibGUI/GMLLexer.h index 9e418c6cae..9d1f31d84e 100644 --- a/Userland/Libraries/LibGUI/GMLLexer.h +++ b/Userland/Libraries/LibGUI/GMLLexer.h @@ -53,7 +53,7 @@ struct GMLToken { class GMLLexer { public: - GMLLexer(StringView const&); + GMLLexer(StringView); Vector<GMLToken> lex(); diff --git a/Userland/Libraries/LibGUI/GMLParser.cpp b/Userland/Libraries/LibGUI/GMLParser.cpp index 301ab3f7b4..3a8baf25af 100644 --- a/Userland/Libraries/LibGUI/GMLParser.cpp +++ b/Userland/Libraries/LibGUI/GMLParser.cpp @@ -121,7 +121,7 @@ static Optional<JsonValue> parse_core_object(Queue<GMLToken>& tokens) return object; } -JsonValue parse_gml(const StringView& string) +JsonValue parse_gml(StringView string) { auto lexer = GMLLexer(string); diff --git a/Userland/Libraries/LibGUI/GMLParser.h b/Userland/Libraries/LibGUI/GMLParser.h index 3e4b0cebc8..4670199a6e 100644 --- a/Userland/Libraries/LibGUI/GMLParser.h +++ b/Userland/Libraries/LibGUI/GMLParser.h @@ -10,6 +10,6 @@ namespace GUI { -JsonValue parse_gml(const StringView&); +JsonValue parse_gml(StringView); } diff --git a/Userland/Libraries/LibGUI/GroupBox.cpp b/Userland/Libraries/LibGUI/GroupBox.cpp index 6918f5ba6f..f0f4a853ff 100644 --- a/Userland/Libraries/LibGUI/GroupBox.cpp +++ b/Userland/Libraries/LibGUI/GroupBox.cpp @@ -14,7 +14,7 @@ REGISTER_WIDGET(GUI, GroupBox) namespace GUI { -GroupBox::GroupBox(const StringView& title) +GroupBox::GroupBox(StringView title) : m_title(title) { REGISTER_STRING_PROPERTY("title", title, set_title); @@ -58,7 +58,7 @@ void GroupBox::fonts_change_event(FontsChangeEvent& event) invalidate_layout(); } -void GroupBox::set_title(const StringView& title) +void GroupBox::set_title(StringView title) { if (m_title == title) return; diff --git a/Userland/Libraries/LibGUI/GroupBox.h b/Userland/Libraries/LibGUI/GroupBox.h index 8d7da6037c..a928bd8789 100644 --- a/Userland/Libraries/LibGUI/GroupBox.h +++ b/Userland/Libraries/LibGUI/GroupBox.h @@ -16,11 +16,11 @@ public: virtual ~GroupBox() override; String title() const { return m_title; } - void set_title(const StringView&); + void set_title(StringView); virtual Margins content_margins() const override; protected: - explicit GroupBox(const StringView& title = {}); + explicit GroupBox(StringView title = {}); virtual void paint_event(PaintEvent&) override; virtual void fonts_change_event(FontsChangeEvent&) override; diff --git a/Userland/Libraries/LibGUI/INILexer.cpp b/Userland/Libraries/LibGUI/INILexer.cpp index ce2c850d99..fd5ee1fd1f 100644 --- a/Userland/Libraries/LibGUI/INILexer.cpp +++ b/Userland/Libraries/LibGUI/INILexer.cpp @@ -10,7 +10,7 @@ namespace GUI { -IniLexer::IniLexer(StringView const& input) +IniLexer::IniLexer(StringView input) : m_input(input) { } diff --git a/Userland/Libraries/LibGUI/INILexer.h b/Userland/Libraries/LibGUI/INILexer.h index f6a01e08f3..411a01bba7 100644 --- a/Userland/Libraries/LibGUI/INILexer.h +++ b/Userland/Libraries/LibGUI/INILexer.h @@ -52,7 +52,7 @@ struct IniToken { class IniLexer { public: - IniLexer(StringView const&); + IniLexer(StringView); Vector<IniToken> lex(); diff --git a/Userland/Libraries/LibGUI/Icon.cpp b/Userland/Libraries/LibGUI/Icon.cpp index 5bd64a3ae6..803a1a1c7c 100644 --- a/Userland/Libraries/LibGUI/Icon.cpp +++ b/Userland/Libraries/LibGUI/Icon.cpp @@ -72,7 +72,7 @@ void IconImpl::set_bitmap_for_size(int size, RefPtr<Gfx::Bitmap>&& bitmap) m_bitmaps.set(size, move(bitmap)); } -Icon Icon::default_icon(const StringView& name) +Icon Icon::default_icon(StringView name) { RefPtr<Gfx::Bitmap> bitmap16; RefPtr<Gfx::Bitmap> bitmap32; diff --git a/Userland/Libraries/LibGUI/Icon.h b/Userland/Libraries/LibGUI/Icon.h index 3be0b7a3c4..fbe01f66da 100644 --- a/Userland/Libraries/LibGUI/Icon.h +++ b/Userland/Libraries/LibGUI/Icon.h @@ -43,7 +43,7 @@ public: Icon(const Icon&); ~Icon() { } - static Icon default_icon(const StringView&); + static Icon default_icon(StringView); Icon& operator=(const Icon& other) { diff --git a/Userland/Libraries/LibGUI/ImageWidget.cpp b/Userland/Libraries/LibGUI/ImageWidget.cpp index 71e05e87bc..dcf4f16d25 100644 --- a/Userland/Libraries/LibGUI/ImageWidget.cpp +++ b/Userland/Libraries/LibGUI/ImageWidget.cpp @@ -14,7 +14,7 @@ REGISTER_WIDGET(GUI, ImageWidget) namespace GUI { -ImageWidget::ImageWidget(const StringView&) +ImageWidget::ImageWidget(StringView) : m_timer(Core::Timer::construct()) { @@ -71,7 +71,7 @@ void ImageWidget::animate() } } -void ImageWidget::load_from_file(const StringView& path) +void ImageWidget::load_from_file(StringView path) { auto file_or_error = MappedFile::map(path); if (file_or_error.is_error()) diff --git a/Userland/Libraries/LibGUI/ImageWidget.h b/Userland/Libraries/LibGUI/ImageWidget.h index d2b3d46571..8acae2c23e 100644 --- a/Userland/Libraries/LibGUI/ImageWidget.h +++ b/Userland/Libraries/LibGUI/ImageWidget.h @@ -26,7 +26,7 @@ public: bool auto_resize() const { return m_auto_resize; } void animate(); - void load_from_file(const StringView&); + void load_from_file(StringView); int opacity_percent() const { return m_opacity_percent; } void set_opacity_percent(int percent); @@ -34,7 +34,7 @@ public: Function<void()> on_click; protected: - explicit ImageWidget(const StringView& text = {}); + explicit ImageWidget(StringView text = {}); virtual void mousedown_event(GUI::MouseEvent&) override; virtual void paint_event(PaintEvent&) override; diff --git a/Userland/Libraries/LibGUI/InputBox.cpp b/Userland/Libraries/LibGUI/InputBox.cpp index 4096100bfb..39427aaa6e 100644 --- a/Userland/Libraries/LibGUI/InputBox.cpp +++ b/Userland/Libraries/LibGUI/InputBox.cpp @@ -14,7 +14,7 @@ namespace GUI { -InputBox::InputBox(Window* parent_window, String& text_value, StringView const& prompt, StringView const& title, StringView const& placeholder, InputType input_type) +InputBox::InputBox(Window* parent_window, String& text_value, StringView prompt, StringView title, StringView placeholder, InputType input_type) : Dialog(parent_window) , m_text_value(text_value) , m_prompt(prompt) @@ -28,7 +28,7 @@ InputBox::~InputBox() { } -int InputBox::show(Window* parent_window, String& text_value, StringView const& prompt, StringView const& title, StringView const& placeholder, InputType input_type) +int InputBox::show(Window* parent_window, String& text_value, StringView prompt, StringView title, StringView placeholder, InputType input_type) { auto box = InputBox::construct(parent_window, text_value, prompt, title, placeholder, input_type); box->set_resizable(false); diff --git a/Userland/Libraries/LibGUI/InputBox.h b/Userland/Libraries/LibGUI/InputBox.h index dbf6e9d778..60705ad21c 100644 --- a/Userland/Libraries/LibGUI/InputBox.h +++ b/Userland/Libraries/LibGUI/InputBox.h @@ -21,10 +21,10 @@ class InputBox : public Dialog { public: virtual ~InputBox() override; - static int show(Window* parent_window, String& text_value, StringView const& prompt, StringView const& title, StringView const& placeholder = {}, InputType input_type = InputType::Text); + static int show(Window* parent_window, String& text_value, StringView prompt, StringView title, StringView placeholder = {}, InputType input_type = InputType::Text); private: - explicit InputBox(Window* parent_window, String& text_value, StringView const& prompt, StringView const& title, StringView const& placeholder, InputType input_type); + explicit InputBox(Window* parent_window, String& text_value, StringView prompt, StringView title, StringView placeholder, InputType input_type); String text_value() const { return m_text_value; } diff --git a/Userland/Libraries/LibGUI/ItemListModel.h b/Userland/Libraries/LibGUI/ItemListModel.h index eaa9b333ca..ff7639ef1c 100644 --- a/Userland/Libraries/LibGUI/ItemListModel.h +++ b/Userland/Libraries/LibGUI/ItemListModel.h @@ -78,7 +78,7 @@ public: } virtual bool is_searchable() const override { return true; } - virtual Vector<GUI::ModelIndex> matches(StringView const& searching, unsigned flags, GUI::ModelIndex const&) override + virtual Vector<GUI::ModelIndex> matches(StringView searching, unsigned flags, GUI::ModelIndex const&) override { Vector<GUI::ModelIndex> found_indices; if constexpr (IsTwoDimensional) { diff --git a/Userland/Libraries/LibGUI/MessageBox.cpp b/Userland/Libraries/LibGUI/MessageBox.cpp index 28a2d71efc..08e2ce3f72 100644 --- a/Userland/Libraries/LibGUI/MessageBox.cpp +++ b/Userland/Libraries/LibGUI/MessageBox.cpp @@ -13,7 +13,7 @@ namespace GUI { -int MessageBox::show(Window* parent_window, const StringView& text, const StringView& title, Type type, InputType input_type) +int MessageBox::show(Window* parent_window, StringView text, StringView title, Type type, InputType input_type) { auto box = MessageBox::construct(parent_window, text, title, type, input_type); if (parent_window) @@ -21,12 +21,12 @@ int MessageBox::show(Window* parent_window, const StringView& text, const String return box->exec(); } -int MessageBox::show_error(Window* parent_window, const StringView& text) +int MessageBox::show_error(Window* parent_window, StringView text) { return show(parent_window, text, "Error", GUI::MessageBox::Type::Error, GUI::MessageBox::InputType::OK); } -MessageBox::MessageBox(Window* parent_window, const StringView& text, const StringView& title, Type type, InputType input_type) +MessageBox::MessageBox(Window* parent_window, StringView text, StringView title, Type type, InputType input_type) : Dialog(parent_window) , m_text(text) , m_type(type) diff --git a/Userland/Libraries/LibGUI/MessageBox.h b/Userland/Libraries/LibGUI/MessageBox.h index bcd68bb175..8ca4ba2a04 100644 --- a/Userland/Libraries/LibGUI/MessageBox.h +++ b/Userland/Libraries/LibGUI/MessageBox.h @@ -30,11 +30,11 @@ public: virtual ~MessageBox() override; - static int show(Window* parent_window, const StringView& text, const StringView& title, Type type = Type::None, InputType input_type = InputType::OK); - static int show_error(Window* parent_window, const StringView& text); + static int show(Window* parent_window, StringView text, StringView title, Type type = Type::None, InputType input_type = InputType::OK); + static int show_error(Window* parent_window, StringView text); private: - explicit MessageBox(Window* parent_window, const StringView& text, const StringView& title, Type type = Type::None, InputType input_type = InputType::OK); + explicit MessageBox(Window* parent_window, StringView text, StringView title, Type type = Type::None, InputType input_type = InputType::OK); bool should_include_ok_button() const; bool should_include_cancel_button() const; diff --git a/Userland/Libraries/LibGUI/Model.h b/Userland/Libraries/LibGUI/Model.h index 2afeca4e45..498cea4dbe 100644 --- a/Userland/Libraries/LibGUI/Model.h +++ b/Userland/Libraries/LibGUI/Model.h @@ -75,7 +75,7 @@ public: virtual void set_data(ModelIndex const&, Variant const&) { } virtual int tree_column() const { return 0; } virtual bool accepts_drag(ModelIndex const&, Vector<String> const& mime_types) const; - virtual Vector<ModelIndex> matches(StringView const&, unsigned = MatchesFlag::AllMatching, ModelIndex const& = ModelIndex()) { return {}; } + virtual Vector<ModelIndex> matches(StringView, unsigned = MatchesFlag::AllMatching, ModelIndex const& = ModelIndex()) { return {}; } virtual bool is_column_sortable([[maybe_unused]] int column_index) const { return true; } virtual void sort([[maybe_unused]] int column, SortOrder) { } @@ -104,7 +104,7 @@ protected: void for_each_client(Function<void(ModelClient&)>); void did_update(unsigned flags = UpdateFlag::InvalidateAllIndices); - static bool string_matches(StringView const& str, StringView const& needle, unsigned flags) + static bool string_matches(StringView str, StringView needle, unsigned flags) { auto case_sensitivity = (flags & CaseInsensitive) ? CaseSensitivity::CaseInsensitive : CaseSensitivity::CaseSensitive; if (flags & MatchFull) diff --git a/Userland/Libraries/LibGUI/ProcessChooser.cpp b/Userland/Libraries/LibGUI/ProcessChooser.cpp index 82fa40b90d..91c9b9dab1 100644 --- a/Userland/Libraries/LibGUI/ProcessChooser.cpp +++ b/Userland/Libraries/LibGUI/ProcessChooser.cpp @@ -14,7 +14,7 @@ namespace GUI { -ProcessChooser::ProcessChooser(const StringView& window_title, const StringView& button_label, const Gfx::Bitmap* window_icon, GUI::Window* parent_window) +ProcessChooser::ProcessChooser(StringView window_title, StringView button_label, const Gfx::Bitmap* window_icon, GUI::Window* parent_window) : Dialog(parent_window) , m_window_title(window_title) , m_button_label(button_label) diff --git a/Userland/Libraries/LibGUI/ProcessChooser.h b/Userland/Libraries/LibGUI/ProcessChooser.h index 412648bbde..983abb3f65 100644 --- a/Userland/Libraries/LibGUI/ProcessChooser.h +++ b/Userland/Libraries/LibGUI/ProcessChooser.h @@ -21,7 +21,7 @@ public: pid_t pid() const { return m_pid; } private: - ProcessChooser(const StringView& window_title = "Process Chooser", const StringView& button_label = "Select", const Gfx::Bitmap* window_icon = nullptr, GUI::Window* parent_window = nullptr); + ProcessChooser(StringView window_title = "Process Chooser", StringView button_label = "Select", const Gfx::Bitmap* window_icon = nullptr, GUI::Window* parent_window = nullptr); void set_pid_from_index_and_close(const ModelIndex&); diff --git a/Userland/Libraries/LibGUI/SortingProxyModel.cpp b/Userland/Libraries/LibGUI/SortingProxyModel.cpp index e2f1efe2e2..33bc1db1cf 100644 --- a/Userland/Libraries/LibGUI/SortingProxyModel.cpp +++ b/Userland/Libraries/LibGUI/SortingProxyModel.cpp @@ -288,7 +288,7 @@ bool SortingProxyModel::is_searchable() const return source().is_searchable(); } -Vector<ModelIndex> SortingProxyModel::matches(StringView const& searching, unsigned flags, ModelIndex const& proxy_index) +Vector<ModelIndex> SortingProxyModel::matches(StringView searching, unsigned flags, ModelIndex const& proxy_index) { auto found_indices = source().matches(searching, flags, map_to_source(proxy_index)); for (size_t i = 0; i < found_indices.size(); i++) diff --git a/Userland/Libraries/LibGUI/SortingProxyModel.h b/Userland/Libraries/LibGUI/SortingProxyModel.h index ef93f73bab..85ca910cb0 100644 --- a/Userland/Libraries/LibGUI/SortingProxyModel.h +++ b/Userland/Libraries/LibGUI/SortingProxyModel.h @@ -28,7 +28,7 @@ public: virtual bool is_editable(ModelIndex const&) const override; virtual bool is_searchable() const override; virtual void set_data(ModelIndex const&, Variant const&) override; - virtual Vector<ModelIndex> matches(StringView const&, unsigned = MatchesFlag::AllMatching, ModelIndex const& = ModelIndex()) override; + virtual Vector<ModelIndex> matches(StringView, unsigned = MatchesFlag::AllMatching, ModelIndex const& = ModelIndex()) override; virtual bool accepts_drag(ModelIndex const&, Vector<String> const& mime_types) const override; virtual bool is_column_sortable(int column_index) const override; diff --git a/Userland/Libraries/LibGUI/TabWidget.cpp b/Userland/Libraries/LibGUI/TabWidget.cpp index c0220f0681..474b805a9d 100644 --- a/Userland/Libraries/LibGUI/TabWidget.cpp +++ b/Userland/Libraries/LibGUI/TabWidget.cpp @@ -44,7 +44,7 @@ TabWidget::~TabWidget() { } -void TabWidget::add_widget(const StringView& title, Widget& widget) +void TabWidget::add_widget(StringView title, Widget& widget) { m_tabs.append({ title, nullptr, &widget }); add_child(widget); @@ -537,7 +537,7 @@ Optional<size_t> TabWidget::active_tab_index() const return {}; } -void TabWidget::set_tab_title(Widget& tab, const StringView& title) +void TabWidget::set_tab_title(Widget& tab, StringView title) { for (auto& t : m_tabs) { if (t.widget == &tab) { diff --git a/Userland/Libraries/LibGUI/TabWidget.h b/Userland/Libraries/LibGUI/TabWidget.h index ee86e15690..bd232857e1 100644 --- a/Userland/Libraries/LibGUI/TabWidget.h +++ b/Userland/Libraries/LibGUI/TabWidget.h @@ -36,11 +36,11 @@ public: GUI::Margins const& container_margins() const { return m_container_margins; } void set_container_margins(GUI::Margins const&); - void add_widget(const StringView&, Widget&); + void add_widget(StringView, Widget&); void remove_widget(Widget&); template<class T, class... Args> - T& add_tab(const StringView& title, Args&&... args) + T& add_tab(StringView title, Args&&... args) { auto t = T::construct(forward<Args>(args)...); add_widget(title, *t); @@ -50,7 +50,7 @@ public: void remove_tab(Widget& tab) { remove_widget(tab); } void remove_all_tabs_except(Widget& tab); - void set_tab_title(Widget& tab, const StringView& title); + void set_tab_title(Widget& tab, StringView title); void set_tab_icon(Widget& tab, const Gfx::Bitmap*); void activate_next_tab(); diff --git a/Userland/Libraries/LibGUI/TextDocument.cpp b/Userland/Libraries/LibGUI/TextDocument.cpp index 832220a172..aaed29702c 100644 --- a/Userland/Libraries/LibGUI/TextDocument.cpp +++ b/Userland/Libraries/LibGUI/TextDocument.cpp @@ -39,7 +39,7 @@ TextDocument::~TextDocument() { } -bool TextDocument::set_text(const StringView& text, AllowCallback allow_callback) +bool TextDocument::set_text(StringView text, AllowCallback allow_callback) { m_client_notifications_enabled = false; m_undo_stack.clear(); @@ -161,7 +161,7 @@ TextDocumentLine::TextDocumentLine(TextDocument& document) clear(document); } -TextDocumentLine::TextDocumentLine(TextDocument& document, const StringView& text) +TextDocumentLine::TextDocumentLine(TextDocument& document, StringView text) { set_text(document, text); } @@ -178,7 +178,7 @@ void TextDocumentLine::set_text(TextDocument& document, const Vector<u32> text) document.update_views({}); } -bool TextDocumentLine::set_text(TextDocument& document, const StringView& text) +bool TextDocumentLine::set_text(TextDocument& document, StringView text) { if (text.is_empty()) { clear(document); @@ -403,7 +403,7 @@ TextPosition TextDocument::previous_position_before(const TextPosition& position return { position.line(), position.column() - 1 }; } -void TextDocument::update_regex_matches(const StringView& needle) +void TextDocument::update_regex_matches(StringView needle) { if (m_regex_needs_update || needle != m_regex_needle) { Regex<PosixExtended> re(needle); @@ -421,7 +421,7 @@ void TextDocument::update_regex_matches(const StringView& needle) } } -TextRange TextDocument::find_next(const StringView& needle, const TextPosition& start, SearchShouldWrap should_wrap, bool regmatch, bool match_case) +TextRange TextDocument::find_next(StringView needle, const TextPosition& start, SearchShouldWrap should_wrap, bool regmatch, bool match_case) { if (needle.is_empty()) return {}; @@ -501,7 +501,7 @@ TextRange TextDocument::find_next(const StringView& needle, const TextPosition& return {}; } -TextRange TextDocument::find_previous(const StringView& needle, const TextPosition& start, SearchShouldWrap should_wrap, bool regmatch, bool match_case) +TextRange TextDocument::find_previous(StringView needle, const TextPosition& start, SearchShouldWrap should_wrap, bool regmatch, bool match_case) { if (needle.is_empty()) return {}; @@ -585,7 +585,7 @@ TextRange TextDocument::find_previous(const StringView& needle, const TextPositi return {}; } -Vector<TextRange> TextDocument::find_all(const StringView& needle, bool regmatch) +Vector<TextRange> TextDocument::find_all(StringView needle, bool regmatch) { Vector<TextRange> ranges; @@ -889,7 +889,7 @@ void RemoveTextCommand::undo() m_document.set_all_cursors(new_cursor); } -TextPosition TextDocument::insert_at(const TextPosition& position, const StringView& text, const Client* client) +TextPosition TextDocument::insert_at(const TextPosition& position, StringView text, const Client* client) { TextPosition cursor = position; Utf8View utf8_view(text); diff --git a/Userland/Libraries/LibGUI/TextDocument.h b/Userland/Libraries/LibGUI/TextDocument.h index 17218725b5..efe7a3e4e0 100644 --- a/Userland/Libraries/LibGUI/TextDocument.h +++ b/Userland/Libraries/LibGUI/TextDocument.h @@ -63,7 +63,7 @@ public: void set_spans(Vector<TextDocumentSpan> spans) { m_spans = move(spans); } - bool set_text(const StringView&, AllowCallback = AllowCallback::Yes); + bool set_text(StringView, AllowCallback = AllowCallback::Yes); const NonnullOwnPtrVector<TextDocumentLine>& lines() const { return m_lines; } NonnullOwnPtrVector<TextDocumentLine>& lines() { return m_lines; } @@ -88,11 +88,11 @@ public: String text() const; String text_in_range(const TextRange&) const; - Vector<TextRange> find_all(const StringView& needle, bool regmatch = false); + Vector<TextRange> find_all(StringView needle, bool regmatch = false); - void update_regex_matches(const StringView&); - TextRange find_next(const StringView&, const TextPosition& start = {}, SearchShouldWrap = SearchShouldWrap::Yes, bool regmatch = false, bool match_case = true); - TextRange find_previous(const StringView&, const TextPosition& start = {}, SearchShouldWrap = SearchShouldWrap::Yes, bool regmatch = false, bool match_case = true); + void update_regex_matches(StringView); + TextRange find_next(StringView, const TextPosition& start = {}, SearchShouldWrap = SearchShouldWrap::Yes, bool regmatch = false, bool match_case = true); + TextRange find_previous(StringView, const TextPosition& start = {}, SearchShouldWrap = SearchShouldWrap::Yes, bool regmatch = false, bool match_case = true); TextPosition next_position_after(const TextPosition&, SearchShouldWrap = SearchShouldWrap::Yes) const; TextPosition previous_position_before(const TextPosition&, SearchShouldWrap = SearchShouldWrap::Yes) const; @@ -122,7 +122,7 @@ public: void set_all_cursors(const TextPosition&); TextPosition insert_at(const TextPosition&, u32, const Client* = nullptr); - TextPosition insert_at(const TextPosition&, const StringView&, const Client* = nullptr); + TextPosition insert_at(const TextPosition&, StringView, const Client* = nullptr); void remove(const TextRange&); virtual bool is_code_document() const { return false; } @@ -154,14 +154,14 @@ private: class TextDocumentLine { public: explicit TextDocumentLine(TextDocument&); - explicit TextDocumentLine(TextDocument&, const StringView&); + explicit TextDocumentLine(TextDocument&, StringView); String to_utf8() const; Utf32View view() const { return { code_points(), length() }; } const u32* code_points() const { return m_text.data(); } size_t length() const { return m_text.size(); } - bool set_text(TextDocument&, const StringView&); + bool set_text(TextDocument&, StringView); void set_text(TextDocument&, Vector<u32>); void append(TextDocument&, u32); void prepend(TextDocument&, u32); diff --git a/Userland/Libraries/LibGUI/TextEditor.cpp b/Userland/Libraries/LibGUI/TextEditor.cpp index 59b65c7467..1d84ae18ea 100644 --- a/Userland/Libraries/LibGUI/TextEditor.cpp +++ b/Userland/Libraries/LibGUI/TextEditor.cpp @@ -101,7 +101,7 @@ void TextEditor::create_actions() m_select_all_action = CommonActions::make_select_all_action([this](auto&) { select_all(); }, this); } -void TextEditor::set_text(StringView const& text, AllowCallback allow_callback) +void TextEditor::set_text(StringView text, AllowCallback allow_callback) { m_selection.clear(); @@ -1378,7 +1378,7 @@ void TextEditor::delete_text_range(TextRange range) update(); } -void TextEditor::insert_at_cursor_or_replace_selection(StringView const& text) +void TextEditor::insert_at_cursor_or_replace_selection(StringView text) { ReflowDeferrer defer(*this); VERIFY(is_editable()); diff --git a/Userland/Libraries/LibGUI/TextEditor.h b/Userland/Libraries/LibGUI/TextEditor.h index 596e48a65d..2b84abaf3c 100644 --- a/Userland/Libraries/LibGUI/TextEditor.h +++ b/Userland/Libraries/LibGUI/TextEditor.h @@ -57,7 +57,7 @@ public: virtual void set_document(TextDocument&); String const& placeholder() const { return m_placeholder; } - void set_placeholder(StringView const& placeholder) { m_placeholder = placeholder; } + void set_placeholder(StringView placeholder) { m_placeholder = placeholder; } TextDocumentLine& current_line() { return line(m_cursor.line()); } TextDocumentLine const& current_line() const { return line(m_cursor.line()); } @@ -108,7 +108,7 @@ public: Function<void()> on_focusin; Function<void()> on_focusout; - void set_text(StringView const&, AllowCallback = AllowCallback::Yes); + void set_text(StringView, AllowCallback = AllowCallback::Yes); void scroll_cursor_into_view(); void scroll_position_into_view(TextPosition const&); size_t line_count() const { return document().line_count(); } @@ -121,7 +121,7 @@ public: TextPosition cursor() const { return m_cursor; } TextRange normalized_selection() const { return m_selection.normalized(); } - void insert_at_cursor_or_replace_selection(StringView const&); + void insert_at_cursor_or_replace_selection(StringView); bool write_to_file(String const& path); bool write_to_file_and_close(int fd); bool has_selection() const { return m_selection.is_valid(); } diff --git a/Userland/Libraries/LibGUI/Variant.cpp b/Userland/Libraries/LibGUI/Variant.cpp index 541ed1a542..1098e0bce0 100644 --- a/Userland/Libraries/LibGUI/Variant.cpp +++ b/Userland/Libraries/LibGUI/Variant.cpp @@ -163,7 +163,7 @@ Variant::Variant(const FlyString& value) { } -Variant::Variant(const StringView& value) +Variant::Variant(StringView value) : Variant(value.to_string()) { } diff --git a/Userland/Libraries/LibGUI/Variant.h b/Userland/Libraries/LibGUI/Variant.h index 3bfb91e39e..501859cd81 100644 --- a/Userland/Libraries/LibGUI/Variant.h +++ b/Userland/Libraries/LibGUI/Variant.h @@ -24,7 +24,7 @@ public: Variant(u32); Variant(u64); Variant(const char*); - Variant(const StringView&); + Variant(StringView); Variant(const String&); Variant(const FlyString&); Variant(const Gfx::Bitmap&); diff --git a/Userland/Libraries/LibGUI/Widget.cpp b/Userland/Libraries/LibGUI/Widget.cpp index 6b9a56f9b3..edc1702fa7 100644 --- a/Userland/Libraries/LibGUI/Widget.cpp +++ b/Userland/Libraries/LibGUI/Widget.cpp @@ -1055,7 +1055,7 @@ void Widget::set_override_cursor(AK::Variant<Gfx::StandardCursor, NonnullRefPtr< } } -bool Widget::load_from_gml(const StringView& gml_string) +bool Widget::load_from_gml(StringView gml_string) { return load_from_gml(gml_string, [](const String& class_name) -> RefPtr<Core::Object> { dbgln("Class '{}' not registered", class_name); @@ -1063,7 +1063,7 @@ bool Widget::load_from_gml(const StringView& gml_string) }); } -bool Widget::load_from_gml(const StringView& gml_string, RefPtr<Core::Object> (*unregistered_child_handler)(const String&)) +bool Widget::load_from_gml(StringView gml_string, RefPtr<Core::Object> (*unregistered_child_handler)(const String&)) { auto value = parse_gml(gml_string); if (!value.is_object()) diff --git a/Userland/Libraries/LibGUI/Widget.h b/Userland/Libraries/LibGUI/Widget.h index 40fb9e1b3b..ba27266ce4 100644 --- a/Userland/Libraries/LibGUI/Widget.h +++ b/Userland/Libraries/LibGUI/Widget.h @@ -280,8 +280,8 @@ public: AK::Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>> override_cursor() const { return m_override_cursor; } void set_override_cursor(AK::Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>>); - bool load_from_gml(const StringView&); - bool load_from_gml(const StringView&, RefPtr<Core::Object> (*unregistered_child_handler)(const String&)); + bool load_from_gml(StringView); + bool load_from_gml(StringView, RefPtr<Core::Object> (*unregistered_child_handler)(const String&)); void set_shrink_to_fit(bool); bool is_shrink_to_fit() const { return m_shrink_to_fit; } |