Setup parent ownership to avoid memory leak

This commit is contained in:
Chocobo1 2017-08-24 20:00:39 +08:00 committed by sledgehammer999
parent b2b63be798
commit 400f8dc2d8
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2

View file

@ -87,7 +87,7 @@ SpeedWidget::SpeedWidget(PropertiesWidget *parent)
m_graphsMenu->addAction(tr("Tracker Download"));
m_graphsMenuActions = m_graphsMenu->actions();
m_graphsSignalMapper = new QSignalMapper();
m_graphsSignalMapper = new QSignalMapper(this);
for (int id = SpeedPlotView::UP; id < SpeedPlotView::NB_GRAPHS; ++id) {
QAction *action = m_graphsMenuActions.at(id);