1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 22:17:42 +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

@ -17,7 +17,7 @@
#include <LibGUI/TextBox.h>
#include <LibGUI/Widget.h>
int GoToOffsetDialog::show(GUI::Window* parent_window, int& history_offset, int& out_offset, int selection_offset, int buffer_size)
GUI::Dialog::ExecResult GoToOffsetDialog::show(GUI::Window* parent_window, int& history_offset, int& out_offset, int selection_offset, int buffer_size)
{
auto dialog = GoToOffsetDialog::construct();
dialog->m_selection_offset = selection_offset;
@ -31,7 +31,7 @@ int GoToOffsetDialog::show(GUI::Window* parent_window, int& history_offset, int&
auto result = dialog->exec();
if (result != GUI::Dialog::ExecOK)
if (result != ExecResult::OK)
return result;
auto input_offset = dialog->process_input();
@ -41,7 +41,7 @@ int GoToOffsetDialog::show(GUI::Window* parent_window, int& history_offset, int&
dbgln("Go to offset: value={}", new_offset);
out_offset = move(new_offset);
return GUI::Dialog::ExecOK;
return ExecResult::OK;
}
int GoToOffsetDialog::process_input()
@ -124,7 +124,7 @@ GoToOffsetDialog::GoToOffsetDialog()
};
m_go_button->on_click = [this](auto) {
done(ExecResult::ExecOK);
done(ExecResult::OK);
};
m_text_editor->on_change = [this]() {