ladybird/Libraries/LibGUI/GAboutDialog.h
Andreas Kling e38b454e11 LibGUI: Fix crash in GAboutDialog::show()
It needed some updating to the new ref-counted CObject ways.
2019-09-29 20:37:02 +02:00

22 lines
549 B
C++

#pragma once
#include <LibGUI/GDialog.h>
class GAboutDialog final : public GDialog {
C_OBJECT(GAboutDialog)
public:
virtual ~GAboutDialog() override;
static void show(const StringView& name, const GraphicsBitmap* icon = nullptr, CObject* parent = nullptr)
{
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;
};