From b47c90f0e0de420f3c78bca4e2a8394b25aba3da Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Thu, 24 Aug 2017 20:00:39 +0800 Subject: [PATCH] Setup parent ownership to avoid memory leak --- src/gui/properties/speedwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/properties/speedwidget.cpp b/src/gui/properties/speedwidget.cpp index daba84043..83013d981 100644 --- a/src/gui/properties/speedwidget.cpp +++ b/src/gui/properties/speedwidget.cpp @@ -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);