Fix tracepoint build with Graph2D

6.10 branch didn't have that feature commit which adds barSeriesCount
variable to bar update functions.

Fixes: QTBUG-140957
Change-Id: I154dcad4a2d8d39366cda27d23bcaacda0965644
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
This commit is contained in:
Sami Varanka 2025-10-14 15:14:21 +03:00
parent 366a1cda65
commit ab1de53db0
1 changed files with 6 additions and 2 deletions

View File

@ -331,7 +331,9 @@ void BarsRenderer::updateVerticalBars(QBarSeries *series, qsizetype setCount, qs
int barSeriesIndex = 0;
QList<QLegendData> legendDataList;
auto barsets = series->barSets();
Q_TRACE(QGraphs2DBarsRendererUpdateVerticalBars_entry, setCount, valuesPerSet, barSeriesCount);
Q_TRACE(QGraphs2DBarsRendererUpdateVerticalBars_entry, setCount, valuesPerSet,
std::count_if(m_graph->m_seriesList.begin(), m_graph->m_seriesList.end(),
[](const auto &series) { return qobject_cast<QBarSeries *>(series); }));
for (auto s : std::as_const(barsets)) {
QVariantList v = s->values();
qsizetype valuesCount = v.size();
@ -446,7 +448,9 @@ void BarsRenderer::updateHorizontalBars(QBarSeries *series, qsizetype setCount,
int barSerieIndex = 0;
QList<QLegendData> legendDataList;
auto barsets = series->barSets();
Q_TRACE(QGraphs2DBarsRendererUpdateupdateHorizontalBars_entry, setCount, valuesPerSet, barSeriesCount);
Q_TRACE(QGraphs2DBarsRendererUpdateupdateHorizontalBars_entry, setCount, valuesPerSet,
std::count_if(m_graph->m_seriesList.begin(), m_graph->m_seriesList.end(),
[](const auto &series) { return qobject_cast<QBarSeries *>(series); }));
for (auto s : std::as_const(barsets)) {
QVariantList v = s->values();
qsizetype valuesCount = v.size();