##// END OF EJS Templates
Fix a major memory leak
Jani Honkonen -
r204:a4ba86638d8d
parent child
Show More
@@ -29,6 +29,7 void ChartDataSet::addSeries(QChartSeries* series)
29 29 {
30 30 // TODO: we should check the series not already added
31 31 m_chartSeries << series;
32 series->setParent(this); // take ownership
32 33 m_domainIndex = 0;
33 34 m_domains.resize(1);
34 35
@@ -59,8 +59,7 QPieSeries::QPieSeries(QObject *parent) :
59 59
60 60 QPieSeries::~QPieSeries()
61 61 {
62 // slices destroyed by parent object
63 qDebug() << "~QPieSeries";
62
64 63 }
65 64
66 65 bool QPieSeries::setData(QList<qreal> data)
@@ -11,7 +11,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE
11 11
12 12 QChartView::QChartView(QWidget *parent) :
13 13 QGraphicsView(parent),
14 m_scene(new QGraphicsScene()),
14 m_scene(new QGraphicsScene(this)),
15 15 m_chart(new QChart()),
16 16 m_rubberBand(0),
17 17 m_verticalRubberBand(false),
@@ -24,7 +24,7 public:
24 24 //implement from QWidget
25 25 void resizeEvent(QResizeEvent *event);
26 26
27 void addSeries(QChartSeries* series);
27 void addSeries(QChartSeries* series); // takes ownership
28 28
29 29 // Convenience function
30 30 QChartSeries* createSeries(QChartSeries::QChartSeriesType type);
General Comments 0
You need to be logged in to leave comments. Login now