1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:28:11 +00:00

LibGUI: Fix crash in GAboutDialog::show()

It needed some updating to the new ref-counted CObject ways.
This commit is contained in:
Andreas Kling 2019-09-29 20:37:02 +02:00
parent 61bc597b2d
commit e38b454e11

View file

@ -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;
};