mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +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
|
@ -19,13 +19,13 @@ namespace FileManager {
|
|||
|
||||
HashTable<NonnullRefPtr<GUI::Window>> file_operation_windows;
|
||||
|
||||
void delete_paths(Vector<DeprecatedString> const& paths, bool should_confirm, GUI::Window* parent_window)
|
||||
void delete_paths(Vector<ByteString> const& paths, bool should_confirm, GUI::Window* parent_window)
|
||||
{
|
||||
DeprecatedString message;
|
||||
ByteString message;
|
||||
if (paths.size() == 1) {
|
||||
message = DeprecatedString::formatted("Are you sure you want to delete \"{}\"?", LexicalPath::basename(paths[0]));
|
||||
message = ByteString::formatted("Are you sure you want to delete \"{}\"?", LexicalPath::basename(paths[0]));
|
||||
} else {
|
||||
message = DeprecatedString::formatted("Are you sure you want to delete {} files?", paths.size());
|
||||
message = ByteString::formatted("Are you sure you want to delete {} files?", paths.size());
|
||||
}
|
||||
|
||||
if (should_confirm) {
|
||||
|
@ -42,7 +42,7 @@ void delete_paths(Vector<DeprecatedString> const& paths, bool should_confirm, GU
|
|||
_exit(1);
|
||||
}
|
||||
|
||||
ErrorOr<void> run_file_operation(FileOperation operation, Vector<DeprecatedString> const& sources, DeprecatedString const& destination, GUI::Window* parent_window)
|
||||
ErrorOr<void> run_file_operation(FileOperation operation, Vector<ByteString> const& sources, ByteString const& destination, GUI::Window* parent_window)
|
||||
{
|
||||
auto pipe_fds = TRY(Core::System::pipe2(0));
|
||||
|
||||
|
@ -110,7 +110,7 @@ ErrorOr<void> run_file_operation(FileOperation operation, Vector<DeprecatedStrin
|
|||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<bool> handle_drop(GUI::DropEvent const& event, DeprecatedString const& destination, GUI::Window* window)
|
||||
ErrorOr<bool> handle_drop(GUI::DropEvent const& event, ByteString const& destination, GUI::Window* window)
|
||||
{
|
||||
bool has_accepted_drop = false;
|
||||
|
||||
|
@ -127,12 +127,12 @@ ErrorOr<bool> handle_drop(GUI::DropEvent const& event, DeprecatedString const& d
|
|||
if (!FileSystem::is_directory(target))
|
||||
return has_accepted_drop;
|
||||
|
||||
Vector<DeprecatedString> paths_to_copy;
|
||||
Vector<ByteString> paths_to_copy;
|
||||
for (auto& url_to_copy : urls) {
|
||||
auto file_path = url_to_copy.serialize_path();
|
||||
if (!url_to_copy.is_valid() || file_path == target)
|
||||
continue;
|
||||
auto new_path = DeprecatedString::formatted("{}/{}", target, LexicalPath::basename(file_path));
|
||||
auto new_path = ByteString::formatted("{}/{}", target, LexicalPath::basename(file_path));
|
||||
if (file_path == new_path)
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue