mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:07:36 +00:00
Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte string. As the null state has already been removed, there are no other particularly hairy blockers in repurposing this type as a byte string (what it _really_ is). This commit is auto-generated: $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \ Meta Ports Ladybird Tests Kernel) $ perl -pie 's/\bDeprecatedString\b/ByteString/g; s/deprecated_string/byte_string/g' $xs $ clang-format --style=file -i \ $(git diff --name-only | grep \.cpp\|\.h) $ gn format $(git ls-files '*.gn' '*.gni')
This commit is contained in:
parent
38d62563b3
commit
5e1499d104
1615 changed files with 10257 additions and 10257 deletions
|
@ -7,7 +7,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Badge.h>
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/ByteString.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/HashTable.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
|
@ -66,26 +66,26 @@ public:
|
|||
WindowLocal,
|
||||
ApplicationGlobal,
|
||||
};
|
||||
static NonnullRefPtr<Action> create(DeprecatedString text, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create(DeprecatedString text, RefPtr<Gfx::Bitmap const> icon, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create(DeprecatedString text, Shortcut const& shortcut, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create(DeprecatedString text, Shortcut const& shortcut, Shortcut const& alternate_shortcut, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create(DeprecatedString text, Shortcut const& shortcut, RefPtr<Gfx::Bitmap const> icon, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create(DeprecatedString text, Shortcut const& shortcut, Shortcut const& alternate_shortcut, RefPtr<Gfx::Bitmap const> icon, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create_checkable(DeprecatedString text, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create_checkable(DeprecatedString text, RefPtr<Gfx::Bitmap const> icon, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create_checkable(DeprecatedString text, Shortcut const& shortcut, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create_checkable(DeprecatedString text, Shortcut const& shortcut, RefPtr<Gfx::Bitmap const> icon, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create(ByteString text, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create(ByteString text, RefPtr<Gfx::Bitmap const> icon, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create(ByteString text, Shortcut const& shortcut, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create(ByteString text, Shortcut const& shortcut, Shortcut const& alternate_shortcut, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create(ByteString text, Shortcut const& shortcut, RefPtr<Gfx::Bitmap const> icon, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create(ByteString text, Shortcut const& shortcut, Shortcut const& alternate_shortcut, RefPtr<Gfx::Bitmap const> icon, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create_checkable(ByteString text, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create_checkable(ByteString text, RefPtr<Gfx::Bitmap const> icon, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create_checkable(ByteString text, Shortcut const& shortcut, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
static NonnullRefPtr<Action> create_checkable(ByteString text, Shortcut const& shortcut, RefPtr<Gfx::Bitmap const> icon, Function<void(Action&)> callback, Core::EventReceiver* parent = nullptr);
|
||||
|
||||
static RefPtr<Action> find_action_for_shortcut(Core::EventReceiver& object, Shortcut const& shortcut);
|
||||
|
||||
virtual ~Action() override;
|
||||
|
||||
DeprecatedString text() const { return m_text; }
|
||||
void set_text(DeprecatedString);
|
||||
ByteString text() const { return m_text; }
|
||||
void set_text(ByteString);
|
||||
|
||||
DeprecatedString tooltip() const;
|
||||
void set_tooltip(DeprecatedString);
|
||||
ByteString tooltip() const;
|
||||
void set_tooltip(ByteString);
|
||||
|
||||
Optional<String> status_tip() const;
|
||||
void set_status_tip(String status_tip) { m_status_tip = move(status_tip); }
|
||||
|
@ -136,19 +136,19 @@ public:
|
|||
HashTable<MenuItem*> const& menu_items() const { return m_menu_items; }
|
||||
|
||||
private:
|
||||
Action(DeprecatedString, Function<void(Action&)> = nullptr, Core::EventReceiver* = nullptr, bool checkable = false);
|
||||
Action(DeprecatedString, Shortcut const&, Function<void(Action&)> = nullptr, Core::EventReceiver* = nullptr, bool checkable = false);
|
||||
Action(DeprecatedString, Shortcut const&, Shortcut const&, Function<void(Action&)> = nullptr, Core::EventReceiver* = nullptr, bool checkable = false);
|
||||
Action(DeprecatedString, Shortcut const&, Shortcut const&, RefPtr<Gfx::Bitmap const> icon, Function<void(Action&)> = nullptr, Core::EventReceiver* = nullptr, bool checkable = false);
|
||||
Action(DeprecatedString, RefPtr<Gfx::Bitmap const> icon, Function<void(Action&)> = nullptr, Core::EventReceiver* = nullptr, bool checkable = false);
|
||||
Action(ByteString, Function<void(Action&)> = nullptr, Core::EventReceiver* = nullptr, bool checkable = false);
|
||||
Action(ByteString, Shortcut const&, Function<void(Action&)> = nullptr, Core::EventReceiver* = nullptr, bool checkable = false);
|
||||
Action(ByteString, Shortcut const&, Shortcut const&, Function<void(Action&)> = nullptr, Core::EventReceiver* = nullptr, bool checkable = false);
|
||||
Action(ByteString, Shortcut const&, Shortcut const&, RefPtr<Gfx::Bitmap const> icon, Function<void(Action&)> = nullptr, Core::EventReceiver* = nullptr, bool checkable = false);
|
||||
Action(ByteString, RefPtr<Gfx::Bitmap const> icon, Function<void(Action&)> = nullptr, Core::EventReceiver* = nullptr, bool checkable = false);
|
||||
|
||||
template<typename Callback>
|
||||
void for_each_toolbar_button(Callback);
|
||||
template<typename Callback>
|
||||
void for_each_menu_item(Callback);
|
||||
|
||||
DeprecatedString m_text;
|
||||
Optional<DeprecatedString> m_tooltip;
|
||||
ByteString m_text;
|
||||
Optional<ByteString> m_tooltip;
|
||||
String m_status_tip;
|
||||
RefPtr<Gfx::Bitmap const> m_icon;
|
||||
Shortcut m_shortcut;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue