1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:47:35 +00:00

BrowserSettings: Convert BrowserSettingsWidget to a failable factory

This commit is contained in:
Cameron Youell 2023-04-17 15:59:38 +10:00 committed by Andreas Kling
parent 2df0eeaa20
commit e9ad7b8eed
3 changed files with 19 additions and 6 deletions

View file

@ -13,15 +13,16 @@
#include <LibGUI/TextBox.h>
class BrowserSettingsWidget final : public GUI::SettingsWindow::Tab {
C_OBJECT(BrowserSettingsWidget)
C_OBJECT_ABSTRACT(BrowserSettingsWidget)
public:
static ErrorOr<NonnullRefPtr<BrowserSettingsWidget>> create();
virtual ~BrowserSettingsWidget() override = default;
virtual void apply_settings() override;
virtual void reset_default_values() override;
private:
BrowserSettingsWidget();
ErrorOr<void> setup();
RefPtr<GUI::TextBox> m_homepage_url_textbox;
RefPtr<GUI::TextBox> m_new_tab_url_textbox;