diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-30 17:20:53 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-30 17:20:53 +0200 |
commit | 1a279c5b2aba17b0a22cfff0624124ebc3dbebc7 (patch) | |
tree | 93ffbe6e3b8ab2027304fa58fd7a49cef12a4ca2 /Libraries/LibGUI/GMessageBox.h | |
parent | c5e057438c63a18c94251f0f350885152234f258 (diff) | |
download | serenity-1a279c5b2aba17b0a22cfff0624124ebc3dbebc7.zip |
GMessageBox: Hide the constructor and fix broken usages
We no longer support creating CObjects on the stack. Use construct().
Diffstat (limited to 'Libraries/LibGUI/GMessageBox.h')
-rw-r--r-- | Libraries/LibGUI/GMessageBox.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Libraries/LibGUI/GMessageBox.h b/Libraries/LibGUI/GMessageBox.h index efaf9fab01..6fe2a0655b 100644 --- a/Libraries/LibGUI/GMessageBox.h +++ b/Libraries/LibGUI/GMessageBox.h @@ -17,12 +17,13 @@ public: OKCancel, }; - explicit GMessageBox(const StringView& text, const StringView& title, Type type = Type::None, InputType = InputType::OK, CObject* parent = nullptr); virtual ~GMessageBox() override; static int show(const StringView& text, const StringView& title, Type type = Type::None, InputType = InputType::OK, CObject* parent = nullptr); private: + explicit GMessageBox(const StringView& text, const StringView& title, Type type = Type::None, InputType = InputType::OK, CObject* parent = nullptr); + bool should_include_ok_button() const; bool should_include_cancel_button() const; void build(); |