1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:37:37 +00:00

LibGUI: Make AboutDialog APIs infallible

This commit is contained in:
Andreas Kling 2023-08-14 10:56:13 +02:00
parent bd61e75e0b
commit c838bb3f21
4 changed files with 10 additions and 12 deletions

View file

@ -16,10 +16,10 @@ namespace GUI {
class AboutDialog final : public Dialog {
C_OBJECT_ABSTRACT(AboutDialog)
public:
static ErrorOr<NonnullRefPtr<AboutDialog>> try_create(String name, String version, RefPtr<Gfx::Bitmap const> icon = nullptr, Window* parent_window = nullptr);
[[nodiscard]] static NonnullRefPtr<AboutDialog> create(String name, String version, RefPtr<Gfx::Bitmap const> icon = nullptr, Window* parent_window = nullptr);
virtual ~AboutDialog() override = default;
static ErrorOr<void> show(String name, String version, RefPtr<Gfx::Bitmap const> icon = nullptr, Window* parent_window = nullptr, RefPtr<Gfx::Bitmap const> window_icon = nullptr);
static void show(String name, String version, RefPtr<Gfx::Bitmap const> icon = nullptr, Window* parent_window = nullptr, RefPtr<Gfx::Bitmap const> window_icon = nullptr);
private:
AboutDialog(String name, String version, RefPtr<Gfx::Bitmap const> icon = nullptr, Window* parent_window = nullptr);