summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Dialog.h
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-05-13 13:10:27 +0100
committerLinus Groh <mail@linusgroh.de>2022-05-13 16:27:43 +0200
commitcdffe556c8fcca034b10cf91f0b05c17d835bc7b (patch)
tree189cbd59652eee1b2783a8323a7194100c78fd07 /Userland/Libraries/LibGUI/Dialog.h
parent1f82beded3ae3664265f1ddf6075f64ca5a08cde (diff)
downloadserenity-cdffe556c8fcca034b10cf91f0b05c17d835bc7b.zip
LibGUI+Userland: Make Dialog::ExecResult an enum class
Diffstat (limited to 'Userland/Libraries/LibGUI/Dialog.h')
-rw-r--r--Userland/Libraries/LibGUI/Dialog.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/Userland/Libraries/LibGUI/Dialog.h b/Userland/Libraries/LibGUI/Dialog.h
index 259e346261..52146c8dc3 100644
--- a/Userland/Libraries/LibGUI/Dialog.h
+++ b/Userland/Libraries/LibGUI/Dialog.h
@@ -15,12 +15,12 @@ namespace GUI {
class Dialog : public Window {
C_OBJECT(Dialog)
public:
- enum ExecResult {
- ExecOK = 0,
- ExecCancel = 1,
- ExecAborted = 2,
- ExecYes = 3,
- ExecNo = 4,
+ enum class ExecResult {
+ OK = 0,
+ Cancel = 1,
+ Aborted = 2,
+ Yes = 3,
+ No = 4,
};
enum ScreenPosition {
CenterWithinParent = 0,
@@ -40,10 +40,10 @@ public:
virtual ~Dialog() override = default;
- int exec();
+ ExecResult exec();
- int result() const { return m_result; }
- void done(int result);
+ ExecResult result() const { return m_result; }
+ void done(ExecResult);
virtual void event(Core::Event&) override;
@@ -54,7 +54,7 @@ protected:
private:
OwnPtr<Core::EventLoop> m_event_loop;
- int m_result { ExecAborted };
+ ExecResult m_result { ExecResult::Aborted };
int m_screen_position { CenterWithinParent };
};