summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/GMessageBox.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-30 17:20:53 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-30 17:20:53 +0200
commit1a279c5b2aba17b0a22cfff0624124ebc3dbebc7 (patch)
tree93ffbe6e3b8ab2027304fa58fd7a49cef12a4ca2 /Libraries/LibGUI/GMessageBox.h
parentc5e057438c63a18c94251f0f350885152234f258 (diff)
downloadserenity-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.h3
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();