mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 19:45:12 +00:00
LibGUI: Fix crash in GAboutDialog::show()
It needed some updating to the new ref-counted CObject ways.
This commit is contained in:
parent
61bc597b2d
commit
e38b454e11
Notes:
sideshowbarker
2024-07-19 11:53:03 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/e38b454e110
1 changed files with 4 additions and 3 deletions
|
@ -5,16 +5,17 @@
|
|||
class GAboutDialog final : public GDialog {
|
||||
C_OBJECT(GAboutDialog)
|
||||
public:
|
||||
GAboutDialog(const StringView& name, const GraphicsBitmap* icon = nullptr, CObject* parent = nullptr);
|
||||
virtual ~GAboutDialog() override;
|
||||
|
||||
static void show(const StringView& name, const GraphicsBitmap* icon = nullptr, CObject* parent = nullptr)
|
||||
{
|
||||
GAboutDialog dialog(name, icon, parent);
|
||||
dialog.exec();
|
||||
auto dialog = GAboutDialog::construct(name, icon, parent);
|
||||
dialog->exec();
|
||||
}
|
||||
|
||||
private:
|
||||
GAboutDialog(const StringView& name, const GraphicsBitmap* icon = nullptr, CObject* parent = nullptr);
|
||||
|
||||
String m_name;
|
||||
RefPtr<GraphicsBitmap> m_icon;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue