diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-03-01 21:29:14 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-03-02 08:11:33 +0100 |
commit | f289b0b14d174d7c891a225c4e81f67573d8c555 (patch) | |
tree | fb75d515bd9865c1fd8bea76f38c0ab90be7dd2c /examples/datavisualization/graphgallery/surfacegraph.cpp | |
parent | 75e6c7570478442324267a9ea5681571e807e356 (diff) |
graphgallery example: Fix leaking modifier classes
The modifier classes were leaking. Pass a parent to ensure their
destruction. Remove the deletion of the graphs from their
destructors since they are QWindows, which are deleted by QtGui.
Pick-to: 6.5
Task-number: QTBUG-110698
Change-Id: Ied32dad62c93b730f63fa95994c4fc281254c800
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'examples/datavisualization/graphgallery/surfacegraph.cpp')
-rw-r--r-- | examples/datavisualization/graphgallery/surfacegraph.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/datavisualization/graphgallery/surfacegraph.cpp b/examples/datavisualization/graphgallery/surfacegraph.cpp index 86ff4145..5de2b7cd 100644 --- a/examples/datavisualization/graphgallery/surfacegraph.cpp +++ b/examples/datavisualization/graphgallery/surfacegraph.cpp @@ -253,7 +253,7 @@ bool SurfaceGraph::initialize() vLayout->addWidget(enableTexture); // Create the controller - SurfaceGraphModifier *modifier = new SurfaceGraphModifier(m_surfaceGraph, labelSelectedItem); + SurfaceGraphModifier *modifier = new SurfaceGraphModifier(m_surfaceGraph, labelSelectedItem, this); // Connect widget controls to controller QObject::connect(heightMapModelRB, &QRadioButton::toggled, |