mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 04:12:43 +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 @@ | |||
| 
 | ||||
| #include "PDFViewerWidget.h" | ||||
| #include <AK/Assertions.h> | ||||
| #include <AK/DeprecatedString.h> | ||||
| #include <AK/ByteString.h> | ||||
| #include <AK/Format.h> | ||||
| #include <AK/HashMap.h> | ||||
| #include <AK/HashTable.h> | ||||
|  | @ -38,7 +38,7 @@ class PagedErrorsModel : public GUI::Model { | |||
|         _Count | ||||
|     }; | ||||
| 
 | ||||
|     using PageErrors = AK::OrderedHashTable<DeprecatedString>; | ||||
|     using PageErrors = AK::OrderedHashTable<ByteString>; | ||||
|     using PagedErrors = HashMap<u32, PageErrors>; | ||||
| 
 | ||||
| public: | ||||
|  | @ -102,7 +102,7 @@ public: | |||
|             case Columns::Page: | ||||
|                 return m_pages_with_errors[index.row()] + 1; | ||||
|             case Columns::Message: | ||||
|                 return DeprecatedString::formatted("{} errors", error_count_in_page(index)); | ||||
|                 return ByteString::formatted("{} errors", error_count_in_page(index)); | ||||
|             default: | ||||
|                 VERIFY_NOT_REACHED(); | ||||
|             } | ||||
|  | @ -366,14 +366,14 @@ void PDFViewerWidget::open_file(StringView path, NonnullOwnPtr<Core::File> file) | |||
|     if (maybe_error.is_error()) { | ||||
|         auto error = maybe_error.release_error(); | ||||
|         warnln("{}", error.message()); | ||||
|         auto user_error_message = DeprecatedString::formatted("Failed to load the document. Error:\n{}.", error.message()); | ||||
|         auto user_error_message = ByteString::formatted("Failed to load the document. Error:\n{}.", error.message()); | ||||
|         GUI::MessageBox::show_error(nullptr, user_error_message.view()); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| PDF::PDFErrorOr<void> PDFViewerWidget::try_open_file(StringView path, NonnullOwnPtr<Core::File> file) | ||||
| { | ||||
|     window()->set_title(DeprecatedString::formatted("{} - PDF Viewer", path)); | ||||
|     window()->set_title(ByteString::formatted("{} - PDF Viewer", path)); | ||||
| 
 | ||||
|     m_buffer = TRY(file->read_until_eof()); | ||||
|     auto document = TRY(PDF::Document::create(m_buffer)); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ali Mohammad Pur
						Ali Mohammad Pur