diff options
author | Linus Groh <mail@linusgroh.de> | 2022-12-04 18:02:33 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-06 08:54:33 +0100 |
commit | 6e19ab2bbce0b113b628e6f8e9b5c0640053933e (patch) | |
tree | 372d21b2f5dcff112f5d0089559c6af5798680d4 /Userland/Libraries/LibGUI/Event.h | |
parent | f74251606d74b504a1379ebb893fdb5529054ea5 (diff) | |
download | serenity-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/Event.h')
-rw-r--r-- | Userland/Libraries/LibGUI/Event.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Userland/Libraries/LibGUI/Event.h b/Userland/Libraries/LibGUI/Event.h index 7f07f21a7c..721243c8dc 100644 --- a/Userland/Libraries/LibGUI/Event.h +++ b/Userland/Libraries/LibGUI/Event.h @@ -180,7 +180,7 @@ public: { } - String const& title() const { return m_title; } + DeprecatedString const& title() const { return m_title; } Gfx::IntRect const& rect() const { return m_rect; } bool is_active() const { return m_active; } bool is_blocked() const { return m_blocked; } @@ -192,7 +192,7 @@ public: unsigned workspace_column() const { return m_workspace_column; } private: - String m_title; + DeprecatedString m_title; Gfx::IntRect m_rect; WindowType m_window_type; unsigned m_workspace_row; @@ -251,16 +251,16 @@ private: class WMKeymapChangedEvent : public WMEvent { public: - explicit WMKeymapChangedEvent(int client_id, String const& keymap) + explicit WMKeymapChangedEvent(int client_id, DeprecatedString const& keymap) : WMEvent(Event::Type::WM_KeymapChanged, client_id, 0) , m_keymap(keymap) { } - String const& keymap() const { return m_keymap; } + DeprecatedString const& keymap() const { return m_keymap; } private: - const String m_keymap; + const DeprecatedString m_keymap; }; class MultiPaintEvent final : public Event { @@ -386,7 +386,7 @@ public: bool super() const { return m_modifiers & Mod_Super; } u8 modifiers() const { return m_modifiers; } u32 code_point() const { return m_code_point; } - String text() const + DeprecatedString text() const { StringBuilder sb; sb.append_code_point(m_code_point); @@ -394,7 +394,7 @@ public: } u32 scancode() const { return m_scancode; } - String to_string() const; + DeprecatedString to_string() const; bool is_arrow_key() const { @@ -460,7 +460,7 @@ private: class DragEvent final : public Event { public: - DragEvent(Type type, Gfx::IntPoint const& position, Vector<String> mime_types) + DragEvent(Type type, Gfx::IntPoint const& position, Vector<DeprecatedString> mime_types) : Event(type) , m_position(position) , m_mime_types(move(mime_types)) @@ -468,26 +468,26 @@ public: } Gfx::IntPoint const& position() const { return m_position; } - Vector<String> const& mime_types() const { return m_mime_types; } + Vector<DeprecatedString> const& mime_types() const { return m_mime_types; } private: Gfx::IntPoint m_position; - Vector<String> m_mime_types; + Vector<DeprecatedString> m_mime_types; }; class DropEvent final : public Event { public: - DropEvent(Gfx::IntPoint const&, String const& text, NonnullRefPtr<Core::MimeData> mime_data); + DropEvent(Gfx::IntPoint const&, DeprecatedString const& text, NonnullRefPtr<Core::MimeData> mime_data); ~DropEvent() = default; Gfx::IntPoint const& position() const { return m_position; } - String const& text() const { return m_text; } + DeprecatedString const& text() const { return m_text; } Core::MimeData const& mime_data() const { return m_mime_data; } private: Gfx::IntPoint m_position; - String m_text; + DeprecatedString m_text; NonnullRefPtr<Core::MimeData> m_mime_data; }; |