mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:57:47 +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
1 changed files with 4 additions and 3 deletions
|
@ -5,16 +5,17 @@
|
||||||
class GAboutDialog final : public GDialog {
|
class GAboutDialog final : public GDialog {
|
||||||
C_OBJECT(GAboutDialog)
|
C_OBJECT(GAboutDialog)
|
||||||
public:
|
public:
|
||||||
GAboutDialog(const StringView& name, const GraphicsBitmap* icon = nullptr, CObject* parent = nullptr);
|
|
||||||
virtual ~GAboutDialog() override;
|
virtual ~GAboutDialog() override;
|
||||||
|
|
||||||
static void show(const StringView& name, const GraphicsBitmap* icon = nullptr, CObject* parent = nullptr)
|
static void show(const StringView& name, const GraphicsBitmap* icon = nullptr, CObject* parent = nullptr)
|
||||||
{
|
{
|
||||||
GAboutDialog dialog(name, icon, parent);
|
auto dialog = GAboutDialog::construct(name, icon, parent);
|
||||||
dialog.exec();
|
dialog->exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
GAboutDialog(const StringView& name, const GraphicsBitmap* icon = nullptr, CObject* parent = nullptr);
|
||||||
|
|
||||||
String m_name;
|
String m_name;
|
||||||
RefPtr<GraphicsBitmap> m_icon;
|
RefPtr<GraphicsBitmap> m_icon;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue