mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 10:19:20 +00:00
LibWebView+UI: Do not create a QApplication in headless mode
This is causing errors on the WPT runner, which does not have a display output. To do this requires shuffling around the Main::Arguments struct, as we now need access to it from overridden WebView::Application methods after construction.
This commit is contained in:
parent
f66cac3417
commit
fa164083fd
Notes:
github-actions[bot]
2025-06-10 22:11:59 +00:00
Author: https://github.com/trflynn89
Commit: fa164083fd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5051
Reviewed-by: https://github.com/tcl3 ✅
6 changed files with 64 additions and 49 deletions
|
@ -15,17 +15,12 @@
|
|||
|
||||
namespace Ladybird {
|
||||
|
||||
class Application
|
||||
: public QApplication
|
||||
, public WebView::Application {
|
||||
Q_OBJECT
|
||||
class Application : public WebView::Application {
|
||||
WEB_VIEW_APPLICATION(Application)
|
||||
|
||||
public:
|
||||
virtual ~Application() override;
|
||||
|
||||
virtual bool event(QEvent* event) override;
|
||||
|
||||
Function<void(URL::URL)> on_open_file;
|
||||
|
||||
BrowserWindow& new_window(Vector<URL::URL> const& initial_urls, BrowserWindow::IsPopupWindow is_popup_window = BrowserWindow::IsPopupWindow::No, Tab* parent_tab = nullptr, Optional<u64> page_index = {});
|
||||
|
@ -39,6 +34,7 @@ private:
|
|||
|
||||
virtual Optional<ByteString> ask_user_for_download_folder() const override;
|
||||
|
||||
OwnPtr<QApplication> m_application;
|
||||
BrowserWindow* m_active_window { nullptr };
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue