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

Ladybird/Qt: Do not "share" ownership of Qt objects

When a QObject subclass (widgets, etc.) are provided a parent, then
ownership of that object is passed to the parent. Similarly, objects
added to a QLayout are owned by the layout.

Thus, do not store these objects in an OwnPtr.
This commit is contained in:
Timothy Flynn 2023-12-04 09:39:22 -05:00 committed by Andrew Kaster
parent a21998003c
commit 4653733a0d
9 changed files with 103 additions and 92 deletions

View file

@ -30,7 +30,7 @@ public:
private:
void closeEvent(QCloseEvent*) override;
OwnPtr<WebContentView> m_inspector_view;
WebContentView* m_inspector_view;
OwnPtr<WebView::InspectorClient> m_inspector_client;
};