mirror of
https://github.com/RGBCube/serenity
synced 2025-07-30 06:17:35 +00:00
Everywhere: Rename to_{string => deprecated_string}() where applicable
This will make it easier to support both string types at the same time while we convert code, and tracking down remaining uses. One big exception is Value::to_string() in LibJS, where the name is dictated by the ToString AO.
This commit is contained in:
parent
6e19ab2bbc
commit
57dc179b1f
597 changed files with 1973 additions and 1972 deletions
|
@ -582,7 +582,7 @@ void BrickGame::game_over()
|
|||
Config::write_i32(m_app_name, m_app_name, "HighScore"sv, int(m_high_score = current_score));
|
||||
}
|
||||
GUI::MessageBox::show(window(),
|
||||
text.to_string(),
|
||||
text.to_deprecated_string(),
|
||||
"Game Over"sv,
|
||||
GUI::MessageBox::Type::Information);
|
||||
|
||||
|
|
|
@ -550,7 +550,7 @@ void ChessWidget::import_pgn(Core::File& file)
|
|||
DeprecatedString movetext;
|
||||
|
||||
for (size_t j = i; j < lines.size(); j++)
|
||||
movetext = DeprecatedString::formatted("{}{}", movetext, lines.at(i).to_string());
|
||||
movetext = DeprecatedString::formatted("{}{}", movetext, lines.at(i).to_deprecated_string());
|
||||
|
||||
for (auto token : movetext.split(' ')) {
|
||||
token = token.trim_whitespace();
|
||||
|
@ -626,7 +626,7 @@ void ChessWidget::export_pgn(Core::File& file) const
|
|||
// Tag Pair Section
|
||||
file.write("[Event \"Casual Game\"]\n"sv);
|
||||
file.write("[Site \"SerenityOS Chess\"]\n"sv);
|
||||
file.write(DeprecatedString::formatted("[Date \"{}\"]\n", Core::DateTime::now().to_string("%Y.%m.%d"sv)));
|
||||
file.write(DeprecatedString::formatted("[Date \"{}\"]\n", Core::DateTime::now().to_deprecated_string("%Y.%m.%d"sv)));
|
||||
file.write("[Round \"1\"]\n"sv);
|
||||
|
||||
DeprecatedString username(getlogin());
|
||||
|
@ -635,7 +635,7 @@ void ChessWidget::export_pgn(Core::File& file) const
|
|||
file.write(DeprecatedString::formatted("[White \"{}\"]\n", m_side == Chess::Color::White ? player1 : player2));
|
||||
file.write(DeprecatedString::formatted("[Black \"{}\"]\n", m_side == Chess::Color::Black ? player1 : player2));
|
||||
|
||||
file.write(DeprecatedString::formatted("[Result \"{}\"]\n", Chess::Board::result_to_points(m_board.game_result(), m_board.turn())));
|
||||
file.write(DeprecatedString::formatted("[Result \"{}\"]\n", Chess::Board::result_to_points_deprecated_string(m_board.game_result(), m_board.turn())));
|
||||
file.write("[WhiteElo \"?\"]\n"sv);
|
||||
file.write("[BlackElo \"?\"]\n"sv);
|
||||
file.write("[Variant \"Standard\"]\n"sv);
|
||||
|
@ -656,9 +656,9 @@ void ChessWidget::export_pgn(Core::File& file) const
|
|||
}
|
||||
|
||||
file.write("{ "sv);
|
||||
file.write(Chess::Board::result_to_string(m_board.game_result(), m_board.turn()));
|
||||
file.write(Chess::Board::result_to_deprecated_string(m_board.game_result(), m_board.turn()));
|
||||
file.write(" } "sv);
|
||||
file.write(Chess::Board::result_to_points(m_board.game_result(), m_board.turn()));
|
||||
file.write(Chess::Board::result_to_points_deprecated_string(m_board.game_result(), m_board.turn()));
|
||||
file.write("\n"sv);
|
||||
}
|
||||
|
||||
|
@ -688,7 +688,7 @@ int ChessWidget::resign()
|
|||
|
||||
set_drag_enabled(false);
|
||||
update();
|
||||
const DeprecatedString msg = Chess::Board::result_to_string(m_board.game_result(), m_board.turn());
|
||||
const DeprecatedString msg = Chess::Board::result_to_deprecated_string(m_board.game_result(), m_board.turn());
|
||||
GUI::MessageBox::show(window(), msg, "Game Over"sv, GUI::MessageBox::Type::Information);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -30,7 +30,7 @@ void Pattern::rotate_clockwise()
|
|||
for (int j = m_pattern.size() - 1; j >= 0; j--) {
|
||||
builder.append(m_pattern.at(j).substring(i, 1));
|
||||
}
|
||||
rotated.append(builder.to_string());
|
||||
rotated.append(builder.to_deprecated_string());
|
||||
}
|
||||
m_pattern = move(rotated);
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ void Game::show_score_card(bool game_over)
|
|||
title_builder.append("Score Card"sv);
|
||||
if (game_over)
|
||||
title_builder.append(" - Game Over"sv);
|
||||
score_dialog->set_title(title_builder.to_string());
|
||||
score_dialog->set_title(title_builder.to_deprecated_string());
|
||||
|
||||
RefPtr<Core::Timer> close_timer;
|
||||
if (!m_players[0].is_human) {
|
||||
|
|
|
@ -250,7 +250,7 @@ void SnakeGame::game_over()
|
|||
text.append("\nThat's a new high score!"sv);
|
||||
}
|
||||
GUI::MessageBox::show(window(),
|
||||
text.to_string(),
|
||||
text.to_deprecated_string(),
|
||||
"Game Over"sv,
|
||||
GUI::MessageBox::Type::Information);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue