1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-29 14:25:07 +00:00

LibGUI+Userland: Make Dialog::ExecResult an enum class

This commit is contained in:
Sam Atkins 2022-05-13 13:10:27 +01:00 committed by Linus Groh
parent 1f82beded3
commit cdffe556c8
90 changed files with 232 additions and 232 deletions

View file

@ -42,13 +42,13 @@ PasswordInputDialog::PasswordInputDialog(Window* parent_window, String title, St
ok_button.on_click = [&](auto) {
dbgln("GUI::PasswordInputDialog: OK button clicked");
m_password = password_box.text();
done(ExecOK);
done(ExecResult::OK);
};
auto& cancel_button = *widget.find_descendant_of_type_named<GUI::Button>("cancel_button");
cancel_button.on_click = [this](auto) {
dbgln("GUI::PasswordInputDialog: Cancel button clicked");
done(ExecCancel);
done(ExecResult::Cancel);
};
password_box.on_return_pressed = [&] {
@ -60,7 +60,7 @@ PasswordInputDialog::PasswordInputDialog(Window* parent_window, String title, St
password_box.set_focus(true);
}
int PasswordInputDialog::show(Window* parent_window, String& text_value, String title, String server, String username)
Dialog::ExecResult PasswordInputDialog::show(Window* parent_window, String& text_value, String title, String server, String username)
{
auto box = PasswordInputDialog::construct(parent_window, move(title), move(server), move(username));
auto result = box->exec();