From f9a133cb3e77ed75c1b45b71b6f19578875b544b 2013-06-13 08:18:26 From: Miikka Heikkinen Date: 2013-06-13 08:18:26 Subject: [PATCH] Remove TODOs No need to bring these back after release, tasks were created in JIRA for relevant TODOs. Change-Id: I4cf5fb09276ee720000329b9ac2a48021cfe0830 Reviewed-by: Mika Salmela --- diff --git a/plugins/declarative/plugin.cpp b/plugins/declarative/plugin.cpp index aef877b..c801a32 100644 --- a/plugins/declarative/plugin.cpp +++ b/plugins/declarative/plugin.cpp @@ -66,9 +66,6 @@ Q_DECLARE_METATYPE(QList) #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) -// NOTE: Hackish fixes for Qt5 (beta2). -// These should not be needed or at least they are not needed in Qt4. - Q_DECLARE_METATYPE(DeclarativeChart *) Q_DECLARE_METATYPE(DeclarativePolarChart *) Q_DECLARE_METATYPE(DeclarativeMargins *) diff --git a/src/animations/axisanimation.cpp b/src/animations/axisanimation.cpp index 2eabf50..1cbe510 100644 --- a/src/animations/axisanimation.cpp +++ b/src/animations/axisanimation.cpp @@ -58,11 +58,6 @@ void AxisAnimation::setValues(QVector &oldLayout, QVector &newLayo { if (state() != QAbstractAnimation::Stopped) stop(); -// TODO: cannot return even if layout is empty -// New layout is not set properly without it (crash) -// if (newLayout.count() == 0) -// return; - switch (m_type) { case ZoomOutAnimation: { QRectF rect = m_axis->gridGeometry(); diff --git a/src/areachart/areachartitem.cpp b/src/areachart/areachartitem.cpp index d809ef2..fc79953 100644 --- a/src/areachart/areachartitem.cpp +++ b/src/areachart/areachartitem.cpp @@ -31,8 +31,6 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE -//TODO: optimize : remove points which are not visible - AreaChartItem::AreaChartItem(QAreaSeries *areaSeries, QGraphicsItem* item) : ChartItem(areaSeries->d_func(),item), m_series(areaSeries), diff --git a/src/axis/categoryaxis/chartcategoryaxisx.cpp b/src/axis/categoryaxis/chartcategoryaxisx.cpp index 3903d8d..d5d53eb 100644 --- a/src/axis/categoryaxis/chartcategoryaxisx.cpp +++ b/src/axis/categoryaxis/chartcategoryaxisx.cpp @@ -68,7 +68,6 @@ QVector ChartCategoryAxisX::calculateLayout() const void ChartCategoryAxisX::updateGeometry() { - //TODO: this is not optimal when many categories :( , create only visible lables setLabels(m_axis->categoriesLabels() << ""); HorizontalAxis::updateGeometry(); } diff --git a/src/axis/polarchartaxisangular.cpp b/src/axis/polarchartaxisangular.cpp index ea62d89..d5ddb04 100644 --- a/src/axis/polarchartaxisangular.cpp +++ b/src/axis/polarchartaxisangular.cpp @@ -238,7 +238,6 @@ void PolarChartAxisAngular::createItems(int count) { if (arrowItems().count() == 0) { // angular axis line - // TODO: need class similar to LineArrowItem for click handling? QGraphicsEllipseItem *arrow = new QGraphicsEllipseItem(presenter()->rootItem()); arrow->setPen(axis()->linePen()); arrowGroup()->addToGroup(arrow); @@ -395,8 +394,6 @@ qreal PolarChartAxisAngular::preferredAxisRadius(const QSizeF &maxSize) QRectF PolarChartAxisAngular::moveLabelToPosition(qreal angularCoordinate, QPointF labelPoint, QRectF labelRect) const { - // TODO use fuzzy compare for "==" cases? - // TODO Adjust the rect position near 0, 90, 180, and 270 angles for smoother animation? if (angularCoordinate == 0.0) labelRect.moveCenter(labelPoint + QPointF(0, -labelRect.height() / 2.0)); else if (angularCoordinate < 90.0) diff --git a/src/axis/qabstractaxis.cpp b/src/axis/qabstractaxis.cpp index 395424d..e45de77 100644 --- a/src/axis/qabstractaxis.cpp +++ b/src/axis/qabstractaxis.cpp @@ -468,7 +468,6 @@ QPen QAbstractAxis::linePen() const return d_ptr->m_axisPen; } -//TODO: remove me 2.0 void QAbstractAxis::setLinePenColor(QColor color) { QPen p = d_ptr->m_axisPen; @@ -620,7 +619,6 @@ int QAbstractAxis::labelsAngle() const { return d_ptr->m_labelsAngle; } -//TODO: remove me 2.0 void QAbstractAxis::setLabelsColor(QColor color) { QBrush b = d_ptr->m_labelsBrush; @@ -878,8 +876,6 @@ void QAbstractAxis::setRange(const QVariant &min, const QVariant &max) /*! Returns the orientation in which the axis is being used (Vertical or Horizontal) */ -// NOTE: should have const but it breaks BC: -// http://techbase.kde.org/Policies/Binary_Compatibility_Examples#Change_the_CV-qualifiers_of_a_member_function Qt::Orientation QAbstractAxis::orientation() { return d_ptr->orientation(); @@ -944,7 +940,6 @@ void QAbstractAxisPrivate::setAlignment( Qt::Alignment alignment) void QAbstractAxisPrivate::initializeTheme(ChartTheme* theme, bool forced) { - //TODO: introduce axis brush if (forced || QChartPrivate::defaultPen() == m_axisPen) q_ptr->setLinePen(theme->axisLinePen()); diff --git a/src/axis/qabstractaxis.h b/src/axis/qabstractaxis.h index 9da2b76..f8624eb 100644 --- a/src/axis/qabstractaxis.h +++ b/src/axis/qabstractaxis.h @@ -145,7 +145,7 @@ public: void setShadesBorderColor(QColor color); QColor shadesBorderColor() const; - Qt::Orientation orientation(); //TODO: missing const <- BC (2.0) + Qt::Orientation orientation(); Qt::Alignment alignment() const; //range handling diff --git a/src/axis/valueaxis/qvalueaxis.h b/src/axis/valueaxis/qvalueaxis.h index 01dedf2..92e4eae 100644 --- a/src/axis/valueaxis/qvalueaxis.h +++ b/src/axis/valueaxis/qvalueaxis.h @@ -60,7 +60,6 @@ public: void setLabelFormat(const QString &format); QString labelFormat() const; - //TODO: deprecated! (2.0) void setNiceNumbersEnabled(bool enable = true); bool niceNumbersEnabled() const; diff --git a/src/axis/valueaxis/qvalueaxis_p.h b/src/axis/valueaxis/qvalueaxis_p.h index 7f7702b..e4a80ba 100644 --- a/src/axis/valueaxis/qvalueaxis_p.h +++ b/src/axis/valueaxis/qvalueaxis_p.h @@ -61,7 +61,7 @@ private: int m_tickCount; QString m_format; bool m_applying; - bool m_niceNumbersEnabled; //TODO: this deprecated (2.0) + bool m_niceNumbersEnabled; Q_DECLARE_PUBLIC(QValueAxis) }; diff --git a/src/chartpresenter_p.h b/src/chartpresenter_p.h index e0e468a..c1ced6b 100644 --- a/src/chartpresenter_p.h +++ b/src/chartpresenter_p.h @@ -136,7 +136,6 @@ public: void startAnimation(ChartAnimation *animation); - //TODO refactor void setState(State state,QPointF point); State state() const { return m_state; } QPointF statePoint() const { return m_statePoint; } diff --git a/src/chartthememanager.cpp b/src/chartthememanager.cpp index d1678f2..5bd5122 100644 --- a/src/chartthememanager.cpp +++ b/src/chartthememanager.cpp @@ -172,9 +172,6 @@ QList ChartThemeManager::generateSeriesGradients(const QList& qreal h = color.hsvHueF(); qreal s = color.hsvSaturationF(); - // TODO: tune the algorithm to give nice results with most base colors defined in - // most themes. The rest of the gradients we can define manually in theme specific - // implementation. QColor start = color; start.setHsvF(h, 0.0, 1.0); g.setColorAt(0.0, start); diff --git a/src/legend/qlegendmarker_p.h b/src/legend/qlegendmarker_p.h index c10be9b..df0893c 100644 --- a/src/legend/qlegendmarker_p.h +++ b/src/legend/qlegendmarker_p.h @@ -38,15 +38,8 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE -// TODO: check these class QAbstractSeries; -class QAreaSeries; -class QXYSeries; -class QBarSet; -class QAbstractBarSeries; -class QPieSlice; class QLegend; -class QPieSeries; class QLegendMarker; class LegendMarkerItem; diff --git a/src/scatterchart/scatterchartitem.cpp b/src/scatterchart/scatterchartitem.cpp index 146a822..200eda8 100644 --- a/src/scatterchart/scatterchartitem.cpp +++ b/src/scatterchart/scatterchartitem.cpp @@ -189,7 +189,6 @@ void ScatterChartItem::handleUpdated() setOpacity(m_series->opacity()); if (recreate) { - // TODO: optimize handleUpdate to recreate points only in case shape changed deletePoints(count); createPoints(count); diff --git a/src/xychart/xychart.cpp b/src/xychart/xychart.cpp index 27754eb..f1fb86a 100644 --- a/src/xychart/xychart.cpp +++ b/src/xychart/xychart.cpp @@ -31,8 +31,6 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE -//TODO: optimize : remove points which are not visible - XYChart::XYChart(QXYSeries *series, QGraphicsItem *item): ChartItem(series->d_func(),item), m_series(series),