From a4b289ebac837c4cfeced9b9145aa5e15cb3281e Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Tue, 23 Jul 2024 18:05:50 +0100 Subject: [PATCH] UI/Qt: Don't crash when launching Inspector with Qt networking enabled --- Ladybird/Qt/InspectorWidget.cpp | 2 +- Ladybird/Qt/WebContentView.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Ladybird/Qt/InspectorWidget.cpp b/Ladybird/Qt/InspectorWidget.cpp index 5f13be260d7..9bffe15084d 100644 --- a/Ladybird/Qt/InspectorWidget.cpp +++ b/Ladybird/Qt/InspectorWidget.cpp @@ -22,7 +22,7 @@ extern bool is_using_dark_system_theme(QWidget&); InspectorWidget::InspectorWidget(QWidget* tab, WebContentView& content_view) : QWidget(tab, Qt::Window) { - m_inspector_view = new WebContentView(this, {}, {}); + m_inspector_view = new WebContentView(this, content_view.web_content_options(), {}); if (is_using_dark_system_theme(*this)) m_inspector_view->update_palette(WebContentView::PaletteMode::Dark); diff --git a/Ladybird/Qt/WebContentView.h b/Ladybird/Qt/WebContentView.h index 83288e6837e..3310cd2c0a4 100644 --- a/Ladybird/Qt/WebContentView.h +++ b/Ladybird/Qt/WebContentView.h @@ -85,6 +85,8 @@ public: QPoint map_point_to_global_position(Gfx::IntPoint) const; + WebContentOptions const& web_content_options() const { return m_web_content_options; } + signals: void urls_dropped(QList const&);