diff --git a/doc/src/examples-stackedbarchartdrilldown.qdoc b/doc/src/examples-stackedbarchartdrilldown.qdoc index 1132b0b..7fa3387 100644 --- a/doc/src/examples-stackedbarchartdrilldown.qdoc +++ b/doc/src/examples-stackedbarchartdrilldown.qdoc @@ -16,7 +16,7 @@ \snippet ../examples/stackedbarchartdrilldown/main.cpp 1 - To enable drilldown we create own view, which implements handler for right click. All QBarSeries derived classes send out rightClicked(QBarSet*, QString) signal when series is clicked with right mouse button. The parameters QBarSet and QString contain the pointer to clicked bar set and name of category, where click occured. + To enable drilldown we create own view, which implements handler for right click. All QBarSeries derived classes send out rightClicked(QBarSet*, QString) signal when series is clicked with right mouse button. The parameters QBarSet and QString contain the pointer to clicked bar set and name of category, where click occurred. In our DrilldownChart we implement handler, which selects the drilldown chart with the category. diff --git a/src/animations/chartanimator.cpp b/src/animations/chartanimator.cpp index ccde4eb..c5f831e 100644 --- a/src/animations/chartanimator.cpp +++ b/src/animations/chartanimator.cpp @@ -143,7 +143,7 @@ void ChartAnimator::updateLayout(Axis *item , QVector &newLayout) QRectF rect = item->geometry(); oldLayout.resize(newLayout.count()); - for(int i = 0, j = oldLayout.count() - 1; i < (oldLayout.count() + 1) / 2; i++, j--) { + for(int i = 0, j = oldLayout.count() - 1; i < (oldLayout.count() + 1) / 2; ++i, --j) { oldLayout[i] = item->axisType() == Axis::X_AXIS ? rect.left() : rect.bottom(); oldLayout[j] = item->axisType() == Axis::X_AXIS ? rect.right() : rect.top(); } @@ -161,7 +161,7 @@ void ChartAnimator::updateLayout(Axis *item , QVector &newLayout) case ScrollRightState: { oldLayout.resize(newLayout.count()); - for(int i = 0, j = i + 1; i < oldLayout.count() - 1; i++, j++) + for(int i = 0, j = i + 1; i < oldLayout.count() - 1; ++i, ++j) oldLayout[i]= oldLayout[j]; } break; @@ -169,14 +169,14 @@ void ChartAnimator::updateLayout(Axis *item , QVector &newLayout) case ScrollLeftState: { oldLayout.resize(newLayout.count()); - for(int i = oldLayout.count() - 1, j = i - 1; i > 0; i--, j--) + for(int i = oldLayout.count() - 1, j = i - 1; i > 0; --i, --j) oldLayout[i]= oldLayout[j]; } break; default: { oldLayout.resize(newLayout.count()); QRectF rect = item->geometry(); - for(int i = 0, j = oldLayout.count() - 1; i < oldLayout.count(); i++, j--) + for(int i = 0, j = oldLayout.count() - 1; i < oldLayout.count(); ++i, --j) oldLayout[i] = item->axisType() == Axis::X_AXIS ? rect.left() : rect.top(); } break; @@ -296,4 +296,6 @@ void ChartAnimator::setState(State state, const QPointF &point) m_point = point; } +#include "moc_chartanimator_p.cpp" + QTCOMMERCIALCHART_END_NAMESPACE diff --git a/src/animations/chartanimator_p.h b/src/animations/chartanimator_p.h index 24ae79a..7571f51 100644 --- a/src/animations/chartanimator_p.h +++ b/src/animations/chartanimator_p.h @@ -37,8 +37,9 @@ class ScatterChartItem; class LineChartItem; class XYChartItem; -class ChartAnimator : public QObject { - +class ChartAnimator : public QObject +{ + Q_OBJECT public: enum State{ShowState, ScrollUpState, ScrollDownState, ScrollLeftState, ScrollRightState, ZoomInState, ZoomOutState}; diff --git a/src/animations/splineanimation.cpp b/src/animations/splineanimation.cpp index 6ee9cbb..9447064 100644 --- a/src/animations/splineanimation.cpp +++ b/src/animations/splineanimation.cpp @@ -118,7 +118,7 @@ QVariant SplineAnimation::interpolated(const QVariant &start, const QVariant &en break; case LineDrawAnimation:{ Q_ASSERT(endPair.first.count() * 2 - 2 == endPair.second.count()); - int count = endPair.first.count()* qBound(0.0, progress, 1.0); + int count = endPair.first.count()* qBound(qreal(0), progress, qreal(1)); for(int i = 0; i < count; i++) { result.first << endPair.first[i]; if(i + 1 == count) diff --git a/src/animations/xyanimation.cpp b/src/animations/xyanimation.cpp index 857088c..6b57398 100644 --- a/src/animations/xyanimation.cpp +++ b/src/animations/xyanimation.cpp @@ -85,7 +85,7 @@ QVariant XYAnimation::interpolated(const QVariant &start, const QVariant &end, q } break; case LineDrawAnimation: { - for(int i = 0; i < endVector.count() * qBound(0.0, progress, 1.0); i++) + for(int i = 0; i < endVector.count() * qBound(qreal(0), progress, qreal(1)); i++) result << endVector[i]; } break; diff --git a/src/areachart/qareaseries.cpp b/src/areachart/qareaseries.cpp index e668278..4c03618 100644 --- a/src/areachart/qareaseries.cpp +++ b/src/areachart/qareaseries.cpp @@ -110,7 +110,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE /*! Constructs area series object which is a child of \a upperSeries. Area will be spanned between \a upperSeries line and \a lowerSeries line. If no \a lowerSeries is passed to constructor, area is specified by axis x (y=0) instead. - When series object is added to QChartView or QChart instance ownerships is transfered. + When series object is added to QChartView or QChart instance ownerships is transferred. */ QAreaSeries::QAreaSeries(QLineSeries *upperSeries, QLineSeries *lowerSeries) : QSeries(*new QAreaSeriesPrivate(upperSeries,lowerSeries,this),upperSeries) diff --git a/src/axis/qchartaxiscategories.cpp b/src/axis/qchartaxiscategories.cpp index 5815ebc..83e5742 100644 --- a/src/axis/qchartaxiscategories.cpp +++ b/src/axis/qchartaxiscategories.cpp @@ -37,7 +37,7 @@ QChartAxisCategories::~QChartAxisCategories() void QChartAxisCategories::insert(const QBarCategories &categories) { int i=1; - foreach (QString string , categories) { + foreach (const QString& string , categories) { d_ptr->m_map.insert(i,string); i++; } diff --git a/src/barchart/barchartmodel.cpp b/src/barchart/barchartmodel.cpp index 7a2eb4a..d6a42a5 100644 --- a/src/barchart/barchartmodel.cpp +++ b/src/barchart/barchartmodel.cpp @@ -195,4 +195,4 @@ QString BarChartModel::categoryName(int category) #include "moc_barchartmodel_p.cpp" -QTCOMMERCIALCHART_END_NAMESPACE \ No newline at end of file +QTCOMMERCIALCHART_END_NAMESPACE diff --git a/src/barchart/qbarseries.cpp b/src/barchart/qbarseries.cpp index e896ff8..ae44375 100644 --- a/src/barchart/qbarseries.cpp +++ b/src/barchart/qbarseries.cpp @@ -38,7 +38,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \class QBarSeries \brief part of QtCommercial chart API. - QBarSeries represents a series of data shown as bars. One QBarSeries can contain multible + QBarSeries represents a series of data shown as bars. One QBarSeries can contain multiple QBarSet data sets. QBarSeries groups the data from sets to categories, which are defined by QStringList. @@ -103,7 +103,7 @@ void QBarSeries::appendBarSet(QBarSet *set) } /*! - Removes a set of bars from series. Releases ownership of \a set. Doesnt delete \a set. + Removes a set of bars from series. Releases ownership of \a set. Doesn't delete \a set. Disconnects the clicked(QString, Qt::MouseButtons) signal of \a set from this series */ @@ -131,7 +131,7 @@ void QBarSeries::appendBarSets(QList sets) } /*! - Removes a list of barsets from series. Releases ownership of \a sets. Doesnt delete \a sets. + Removes a list of barsets from series. Releases ownership of \a sets. Doesn't delete \a sets. Disconnects the clicked(QString, Qt::MouseButtons) signal of \a sets from this series */ @@ -231,7 +231,7 @@ bool QBarSeries::setModel(QAbstractItemModel *model) Parameter \a bottomBoundry indicates the column/row where the first bar set is located in the model. Parameter \a topBoundry indicates the column/row where the last bar set is located in the model. All the columns/rows inbetween those two values are also used as data for bar sets. - The \a orientation paramater specifies whether the data is in columns or in rows. + The \a orientation parameter specifies whether the data is in columns or in rows. */ void QBarSeries::setModelMapping(int categories, int bottomBoundary, int topBoundary, Qt::Orientation orientation) { diff --git a/src/barchart/qpercentbarseries.cpp b/src/barchart/qpercentbarseries.cpp index 6aee276..c6952f1 100644 --- a/src/barchart/qpercentbarseries.cpp +++ b/src/barchart/qpercentbarseries.cpp @@ -33,7 +33,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \brief part of QtCommercial chart API. QPercentBarSeries represents a series of data shown as bars. Each bar of QBarSet is shown as percentage - of all bars in category. One QPercentBarSeries can contain multible QBarSet data sets. + of all bars in category. One QPercentBarSeries can contain multiple QBarSet data sets. QBarSeries groups the data from sets to categories, which are defined by QStringList. \mainclass diff --git a/src/barchart/qstackedbarseries.cpp b/src/barchart/qstackedbarseries.cpp index dc51787..e691a84 100644 --- a/src/barchart/qstackedbarseries.cpp +++ b/src/barchart/qstackedbarseries.cpp @@ -33,7 +33,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \brief part of QtCommercial chart API. QStackedBarSeries represents a series of data shown as bars. All bars in same category are - stacked on top of each other. One QStackedBarSeries can contain multible QBarSet data sets. + stacked on top of each other. One QStackedBarSeries can contain multiple QBarSet data sets. QStackedBarSeries groups the data from sets to categories, which are defined by QStringList. \mainclass diff --git a/src/chartdataset.cpp b/src/chartdataset.cpp index 4aad0af..d0eeb55 100644 --- a/src/chartdataset.cpp +++ b/src/chartdataset.cpp @@ -52,13 +52,8 @@ void ChartDataSet::addSeries(QSeries* series, QChartAxis *axisY) return; } - if(!series->parent()){ - series->setParent(this); // take ownership - }; - - if(!axisY->parent()){ - axisY->setParent(this); // take ownership - } + series->setParent(this); // take ownership + axisY->setParent(this); // take ownership Domain* domain = m_axisDomainMap.value(axisY); @@ -111,26 +106,23 @@ void ChartDataSet::addSeries(QSeries* series, QChartAxis *axisY) } -void ChartDataSet::removeSeries(QSeries* series) +QChartAxis* ChartDataSet::removeSeries(QSeries* series) { - QChartAxis* axis = m_seriesAxisMap.value(series); if(!axis){ qWarning()<<"Can not remove series. Series not found on the chart."; - return; + return 0; } + emit seriesRemoved(series); + m_seriesAxisMap.remove(series); int key = seriesIndex(series); Q_ASSERT(key!=-1); m_indexSeriesMap.remove(key); - - if(series->parent()==this){ - delete series; - series=0; - } + series->setParent(0); QList axes = m_seriesAxisMap.values(); @@ -140,10 +132,7 @@ void ChartDataSet::removeSeries(QSeries* series) Domain* domain = m_axisDomainMap.take(axis); emit axisRemoved(axis); if(axis!=axisY()){ - if(axis->parent()==this){ - delete axis; - axis=0; - } + axis->setParent(0); } delete domain; } @@ -153,20 +142,28 @@ void ChartDataSet::removeSeries(QSeries* series) m_axisXInitialized=false; emit axisRemoved(axisX()); } + + return axis; } void ChartDataSet::removeAllSeries() { - QList series = m_seriesAxisMap.keys(); - + QList axes; foreach(QSeries* s , series) { - removeSeries(s); + QChartAxis* axis = removeSeries(s); + if(axis==axisY()) continue; + int i = axes.indexOf(axis); + if(i==-1){ + axes<setPos(-m_offsetX,m_rect.top()); } break; @@ -326,7 +326,7 @@ void QLegendPrivate::setOffset(qreal x, qreal y) if(m_height<=m_rect.height()) return; if (y != m_offsetY) { - m_offsetY = qBound(0.0, y, m_height - m_rect.height()); + m_offsetY = qBound(qreal(0), y, m_height - m_rect.height()); m_markers->setPos(m_rect.left(),-m_offsetY); } break; diff --git a/src/linechart/qlineseries.cpp b/src/linechart/qlineseries.cpp index f977d2b..fb65d45 100644 --- a/src/linechart/qlineseries.cpp +++ b/src/linechart/qlineseries.cpp @@ -56,7 +56,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE /*! Constructs empty series object which is a child of \a parent. - When series object is added to QChartView or QChart instance ownerships is transfered. + When series object is added to QChartView or QChart instance ownerships is transferred. */ QLineSeries::QLineSeries(QObject *parent) : QXYSeries(*new QLineSeriesPrivate(this),parent) { diff --git a/src/linechart/qlineseries.h b/src/linechart/qlineseries.h index 60d89f5..1714a45 100644 --- a/src/linechart/qlineseries.h +++ b/src/linechart/qlineseries.h @@ -32,7 +32,7 @@ class QLineSeriesPrivate; class QTCOMMERCIALCHART_EXPORT QLineSeries : public QXYSeries { public: - explicit QLineSeries(QObject *parent=0); + explicit QLineSeries(QObject *parent = 0); ~QLineSeries(); QSeries::QSeriesType type() const; diff --git a/src/piechart/qpieseries.cpp b/src/piechart/qpieseries.cpp index afa169c..0a48457 100644 --- a/src/piechart/qpieseries.cpp +++ b/src/piechart/qpieseries.cpp @@ -82,7 +82,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE The value is a relative value to the chart rectangle where: \list - \o 0.0 is the minumum size (pie not drawn). + \o 0.0 is the minimum size (pie not drawn). \o 1.0 is the maximum size that can fit the chart. \endlist @@ -484,7 +484,7 @@ bool QPieSeries::setModel(QAbstractItemModel* model) Sets column/row specified by \a modelValuesLine to be used as a list of pie slice values for the pie. Parameter \a modelValuesLine indicates the column/row where the values for the pie slices are located in the model. Parameter \a modelLabelsLine indicates the column/row where the labels for the pie slices are located in the model. - The \a orientation paramater specifies whether the data is in columns or in rows. + The \a orientation parameter specifies whether the data is in columns or in rows. */ void QPieSeries::setModelMapping(int modelValuesLine, int modelLabelsLine, Qt::Orientation orientation) { diff --git a/src/qseries.cpp b/src/qseries.cpp index 29a3766..6b6dfbb 100644 --- a/src/qseries.cpp +++ b/src/qseries.cpp @@ -126,6 +126,7 @@ QSeriesPrivate::~QSeriesPrivate() } #include "moc_qseries.cpp" +#include "moc_qseries_p.cpp" QTCOMMERCIALCHART_END_NAMESPACE diff --git a/src/qseries_p.h b/src/qseries_p.h index 55ebc12..788f538 100644 --- a/src/qseries_p.h +++ b/src/qseries_p.h @@ -44,6 +44,7 @@ class QLegend; class QSeriesPrivate : public QObject { + Q_OBJECT public: QSeriesPrivate(QSeries *q); ~QSeriesPrivate(); diff --git a/src/scroller.cpp b/src/scroller.cpp index dce7817..f1e7c27 100644 --- a/src/scroller.cpp +++ b/src/scroller.cpp @@ -245,4 +245,6 @@ void ScrollTicker::timerEvent(QTimerEvent *event) m_scroller->scrollTick(); } +#include "moc_scroller_p.cpp" + QTCOMMERCIALCHART_END_NAMESPACE diff --git a/src/scroller_p.h b/src/scroller_p.h index aca2ab7..6515875 100644 --- a/src/scroller_p.h +++ b/src/scroller_p.h @@ -44,6 +44,7 @@ class QLegend; class ScrollTicker : public QObject { + Q_OBJECT public: explicit ScrollTicker(Scroller *scroller,QObject *parent = 0); void start(int interval); diff --git a/src/splinechart/qsplineseries.cpp b/src/splinechart/qsplineseries.cpp index 3a25e7e..14765bd 100644 --- a/src/splinechart/qsplineseries.cpp +++ b/src/splinechart/qsplineseries.cpp @@ -47,7 +47,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE /*! Constructs empty series object which is a child of \a parent. - When series object is added to QChartView or QChart instance then the ownerships is transfered. + When series object is added to QChartView or QChart instance then the ownerships is transferred. */ QSplineSeries::QSplineSeries(QObject *parent) : @@ -201,7 +201,7 @@ void QSplineSeriesPrivate::updateControlPoints() /*//! \fn bool QSplineSeries::setModelMapping(int modelX, int modelY, Qt::Orientation orientation) Sets the \a modelX to be used as a data source for x coordinate and \a modelY to be used - as a data source for y coordinate. The \a orientation paramater specifies whether the data + as a data source for y coordinate. The \a orientation parameter specifies whether the data is in columns or in rows. */ //void QSplineSeries::setModelMapping(int modelX, int modelY, Qt::Orientation orientation) diff --git a/src/xychart/qxyseries.cpp b/src/xychart/qxyseries.cpp index 51bb723..b5ec425 100644 --- a/src/xychart/qxyseries.cpp +++ b/src/xychart/qxyseries.cpp @@ -92,7 +92,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \internal Constructs empty series object which is a child of \a parent. - When series object is added to QChartView or QChart instance ownerships is transfered. + When series object is added to QChartView or QChart instance ownerships is transferred. */ QXYSeries::QXYSeries(QXYSeriesPrivate &d,QObject *parent):QSeries(d,parent) { @@ -560,7 +560,7 @@ bool QXYSeries::setModel(QAbstractItemModel *model) /*! \fn bool QXYSeries::setModelMapping(int modelX, int modelY, Qt::Orientation orientation) Sets the \a modelX to be used as a data source for x coordinate and \a modelY to be used - as a data source for y coordinate. The \a orientation paramater specifies whether the data + as a data source for y coordinate. The \a orientation parameter specifies whether the data is in columns or in rows. \sa setModel(), setModelMappingRange() */ diff --git a/test/auto/chartdataset/tst_chartdataset.cpp b/test/auto/chartdataset/tst_chartdataset.cpp index c78cff3..4f02641 100644 --- a/test/auto/chartdataset/tst_chartdataset.cpp +++ b/test/auto/chartdataset/tst_chartdataset.cpp @@ -150,6 +150,13 @@ void tst_ChartDataSet::addSeries() QCOMPARE(spy2.count(), 3); QCOMPARE(spy3.count(), 0); + if(axis0==0) axis0 = dataSet.axisY(); + if(axis1==0) axis1 = dataSet.axisY(); + if(axis2==0) axis2 = dataSet.axisY(); + + QVERIFY(axis0 == dataSet.removeSeries(series0)); + QVERIFY(axis1 == dataSet.removeSeries(series1)); + QVERIFY(axis2 == dataSet.removeSeries(series2)); } void tst_ChartDataSet::removeSeries_data() @@ -190,36 +197,37 @@ void tst_ChartDataSet::removeSeries() void tst_ChartDataSet::removeAllSeries_data() { - addSeries_data(); + } void tst_ChartDataSet::removeAllSeries() { - QFETCH(QLineSeries*, series0); - QFETCH(QChartAxis*, axis0); - QFETCH(QLineSeries*, series1); - QFETCH(QChartAxis*, axis1); - QFETCH(QLineSeries*, series2); - QFETCH(QChartAxis*, axis2); - QFETCH(int, axisCount); - - ChartDataSet dataSet; - - dataSet.addSeries(series0,axis0); - dataSet.addSeries(series1,axis1); - dataSet.addSeries(series2,axis2); - - QSignalSpy spy0(&dataSet, SIGNAL(axisAdded(QChartAxis*,Domain*))); - QSignalSpy spy1(&dataSet, SIGNAL(axisRemoved(QChartAxis*))); - QSignalSpy spy2(&dataSet, SIGNAL(seriesAdded(QSeries*,Domain*))); - QSignalSpy spy3(&dataSet, SIGNAL(seriesRemoved(QSeries*))); - - dataSet.removeAllSeries(); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), axisCount); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 3); + QLineSeries* series0 = new QLineSeries(this); + QLineSeries* series1 = new QLineSeries(this); + QLineSeries* series2 = new QLineSeries(this); + + QChartAxis* axis0 = new QChartAxis(this); + QChartAxis* axis1 = new QChartAxis(this); + QChartAxis* axis2 = new QChartAxis(this); + + + ChartDataSet dataSet; + + dataSet.addSeries(series0, axis0); + dataSet.addSeries(series1, axis1); + dataSet.addSeries(series2, axis2); + + QSignalSpy spy0(&dataSet, SIGNAL(axisAdded(QChartAxis*,Domain*))); + QSignalSpy spy1(&dataSet, SIGNAL(axisRemoved(QChartAxis*))); + QSignalSpy spy2(&dataSet, SIGNAL(seriesAdded(QSeries*,Domain*))); + QSignalSpy spy3(&dataSet, SIGNAL(seriesRemoved(QSeries*))); + + dataSet.removeAllSeries(); + + QCOMPARE(spy0.count(), 0); + QCOMPARE(spy1.count(), 4); + QCOMPARE(spy2.count(), 0); + QCOMPARE(spy3.count(), 3); } @@ -295,6 +303,10 @@ void tst_ChartDataSet::seriesCount() QCOMPARE(spy1.count(), 0); QCOMPARE(spy2.count(), 0); QCOMPARE(spy3.count(), 0); + + dataSet.removeSeries(series0); + dataSet.removeSeries(series1); + dataSet.removeSeries(series2); } void tst_ChartDataSet::seriesIndex_data() @@ -382,6 +394,10 @@ void tst_ChartDataSet::seriesIndex() QCOMPARE(dataSet.seriesIndex(series1),1); QCOMPARE(dataSet.seriesIndex(series2),0); + dataSet.removeSeries(series0); + dataSet.removeSeries(series1); + dataSet.removeSeries(series2); + } void tst_ChartDataSet::domain_data() @@ -418,6 +434,10 @@ void tst_ChartDataSet::domain() QCOMPARE(spy1.count(), 0); QCOMPARE(spy2.count(), 0); QCOMPARE(spy3.count(), 0); + + dataSet.removeSeries(series0); + dataSet.removeSeries(series1); + dataSet.removeSeries(series2); } void tst_ChartDataSet::zoomInDomain_data() @@ -455,6 +475,10 @@ void tst_ChartDataSet::zoomInDomain() QCOMPARE(spy0.count(), 1); QCOMPARE(spy1.count(), 1); QCOMPARE(spy2.count(), 1); + + dataSet.removeSeries(series0); + dataSet.removeSeries(series1); + dataSet.removeSeries(series2); } void tst_ChartDataSet::zoomOutDomain_data() @@ -493,6 +517,10 @@ void tst_ChartDataSet::zoomOutDomain() QCOMPARE(spy0.count(), 1); QCOMPARE(spy1.count(), 1); QCOMPARE(spy2.count(), 1); + + dataSet.removeSeries(series0); + dataSet.removeSeries(series1); + dataSet.removeSeries(series2); } void tst_ChartDataSet::scrollDomain_data() @@ -531,6 +559,10 @@ void tst_ChartDataSet::scrollDomain() QCOMPARE(spy0.count(), 1); QCOMPARE(spy1.count(), 1); QCOMPARE(spy2.count(), 1); + + dataSet.removeSeries(series0); + dataSet.removeSeries(series1); + dataSet.removeSeries(series2); } QTEST_MAIN(tst_ChartDataSet) diff --git a/test/auto/qchart/tst_qchart.cpp b/test/auto/qchart/tst_qchart.cpp index f263eb2..e7851d3 100644 --- a/test/auto/qchart/tst_qchart.cpp +++ b/test/auto/qchart/tst_qchart.cpp @@ -198,6 +198,8 @@ void tst_QChart::addSeries() if(!axis) axis = m_chart->axisY(); m_chart->addSeries(series,axis); QCOMPARE(m_chart->axisY(series),axis); + m_chart->removeSeries(series); + } void tst_QChart::animationOptions_data()