mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:37:44 +00:00
Flood: Replace usage of DeprecatedString
This commit is contained in:
parent
adaf4a9ed5
commit
2114c27656
1 changed files with 4 additions and 3 deletions
|
@ -7,6 +7,7 @@
|
||||||
#include "BoardWidget.h"
|
#include "BoardWidget.h"
|
||||||
#include "MainWidget.h"
|
#include "MainWidget.h"
|
||||||
#include "SettingsDialog.h"
|
#include "SettingsDialog.h"
|
||||||
|
#include <AK/String.h>
|
||||||
#include <AK/URL.h>
|
#include <AK/URL.h>
|
||||||
#include <LibConfig/Client.h>
|
#include <LibConfig/Client.h>
|
||||||
#include <LibCore/System.h>
|
#include <LibCore/System.h>
|
||||||
|
@ -145,12 +146,12 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
board_widget->board()->update_values();
|
board_widget->board()->update_values();
|
||||||
update();
|
update();
|
||||||
if (board_widget->board()->is_flooded()) {
|
if (board_widget->board()->is_flooded()) {
|
||||||
DeprecatedString dialog_text("You have tied with the AI."sv);
|
auto dialog_text = "You have tied with the AI."_string;
|
||||||
auto dialog_title("Congratulations!"sv);
|
auto dialog_title("Congratulations!"sv);
|
||||||
if (ai_moves - moves_made == 1)
|
if (ai_moves - moves_made == 1)
|
||||||
dialog_text = "You defeated the AI by 1 move."sv;
|
dialog_text = "You defeated the AI by 1 move."_string;
|
||||||
else if (ai_moves - moves_made > 1)
|
else if (ai_moves - moves_made > 1)
|
||||||
dialog_text = DeprecatedString::formatted("You defeated the AI by {} moves.", ai_moves - moves_made);
|
dialog_text = String::formatted("You defeated the AI by {} moves.", ai_moves - moves_made).release_value_but_fixme_should_propagate_errors();
|
||||||
else
|
else
|
||||||
dialog_title = "Game over!"sv;
|
dialog_title = "Game over!"sv;
|
||||||
GUI::MessageBox::show(window,
|
GUI::MessageBox::show(window,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue