From d079f233a46bc284a5b52354ce3c53a1b1300fdf Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Wed, 20 Nov 2019 09:07:59 +0100 Subject: [PATCH] Revert "Janitor : Fix memory leak" This reverts commit 88d961e516798da2e3a9c88146cf9790a8a2159b. --- ApplicationCode/UserInterface/RiuQwtPlotCurve.cpp | 2 +- ApplicationCode/UserInterface/RiuQwtPlotCurve.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ApplicationCode/UserInterface/RiuQwtPlotCurve.cpp b/ApplicationCode/UserInterface/RiuQwtPlotCurve.cpp index 6656d8ef36..b53ca9d2db 100644 --- a/ApplicationCode/UserInterface/RiuQwtPlotCurve.cpp +++ b/ApplicationCode/UserInterface/RiuQwtPlotCurve.cpp @@ -52,7 +52,7 @@ RiuQwtPlotCurve::RiuQwtPlotCurve( const QString& title ) m_symbolSkipPixelDistance = 10.0f; - m_errorBars = std::unique_ptr( new QwtPlotIntervalCurve() ); + m_errorBars = new QwtPlotIntervalCurve(); m_errorBars->setStyle( QwtPlotIntervalCurve::CurveStyle::NoCurve ); m_errorBars->setSymbol( new QwtIntervalSymbol( QwtIntervalSymbol::Bar ) ); m_errorBars->setItemAttribute( QwtPlotItem::Legend, false ); diff --git a/ApplicationCode/UserInterface/RiuQwtPlotCurve.h b/ApplicationCode/UserInterface/RiuQwtPlotCurve.h index d4006d20fd..596e2d7160 100644 --- a/ApplicationCode/UserInterface/RiuQwtPlotCurve.h +++ b/ApplicationCode/UserInterface/RiuQwtPlotCurve.h @@ -152,10 +152,10 @@ private: std::vector> m_polyLineStartStopIndices; float m_symbolSkipPixelDistance; - bool m_showErrorBars; - std::unique_ptr m_errorBars; - QwtPlot* m_attachedToPlot; - bool m_blackAndWhiteLegendIcon; + bool m_showErrorBars; + QwtPlotIntervalCurve* m_errorBars; + QwtPlot* m_attachedToPlot; + bool m_blackAndWhiteLegendIcon; std::vector m_perPointLabels; };