Unused code in Qt Charts module
Solved
General and Desktop
-
In chartaxiselement.cpp theres a variable n which is not used.
QStringList ChartAxisElement::createDateTimeLabels(qreal min, qreal max,int ticks, const QString &format) const { QStringList labels; if (max <= min || ticks < 1) return labels; int n = qMax(int(-qFloor(std::log10((max - min) / (ticks - 1)))), 0); n++; for (int i = 0; i < ticks; i++) { qreal value = min + (i * (max - min) / (ticks - 1)); labels << presenter()->locale().toString(QDateTime::fromMSecsSinceEpoch(value), format); } return labels; }
-
Please consider notifying the developers via https://bugreports.qt.io, or submitting a patch yourself.
-
Looks like it's a copy'n'paste leftover from the other two ChartAxisElement::createFoo() functions where 'n' is used for the label strings. But yes, please provide a bug report and maybe link it here.
-