Преглед изворни кода

UI/Qt: Don't crash when launching Inspector with Qt networking enabled

Tim Ledbetter пре 1 година
родитељ
комит
a4b289ebac
2 измењених фајлова са 3 додато и 1 уклоњено
  1. 1 1
      Ladybird/Qt/InspectorWidget.cpp
  2. 2 0
      Ladybird/Qt/WebContentView.h

+ 1 - 1
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);

+ 2 - 0
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<QUrl> const&);