LibWebView+UI: Don't declare a magic ctor for Application subclasses

You would have to just know that you need to define the constructor with
this declaration. Let's allow subclasses to define constructors as they
see fit.
This commit is contained in:
Timothy Flynn 2025-06-10 19:13:03 -04:00 committed by Tim Flynn
parent 3a4f2faf2e
commit b425ce93b1
Notes: github-actions[bot] 2025-06-11 11:27:40 +00:00
7 changed files with 24 additions and 33 deletions

View file

@ -16,6 +16,8 @@ class Application final : public WebView::Application {
WEB_VIEW_APPLICATION(Application)
private:
explicit Application();
virtual Optional<ByteString> ask_user_for_download_folder() const override;
virtual NonnullOwnPtr<Core::EventLoop> create_platform_event_loop() override;
};

View file

@ -17,9 +17,7 @@
namespace Ladybird {
Application::Application(Badge<WebView::Application>)
{
}
Application::Application() = default;
Optional<ByteString> Application::ask_user_for_download_folder() const
{

View file

@ -48,10 +48,7 @@ public:
}
};
Application::Application(Badge<WebView::Application>)
{
}
Application::Application() = default;
Application::~Application() = default;
void Application::create_platform_options(WebView::BrowserOptions&, WebView::WebContentOptions& web_content_options)

View file

@ -29,6 +29,8 @@ public:
void set_active_window(BrowserWindow& w) { m_active_window = &w; }
private:
explicit Application();
virtual void create_platform_options(WebView::BrowserOptions&, WebView::WebContentOptions&) override;
virtual NonnullOwnPtr<Core::EventLoop> create_platform_event_loop() override;