mirror of https://github.com/qt/qtgraphs.git
Get rid of some clazy warnings in graphs2d/barchart folder
Fix "c++11 range-loop might detach Qt container" warnings. Pick-to: 6.9 6.10 Change-Id: Icd1edd6ef07294b9929a7a68a6192c3a8a530f73 Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io>
This commit is contained in:
parent
59d8120076
commit
1499c04fa7
|
|
@ -910,7 +910,7 @@ bool QBarSeries::replace(const QList<QBarSet *> &sets)
|
|||
return false;
|
||||
}
|
||||
|
||||
for (const auto set : d->m_barSets) {
|
||||
for (const auto set : std::as_const(d->m_barSets)) {
|
||||
remove(set);
|
||||
}
|
||||
|
||||
|
|
@ -1090,7 +1090,7 @@ void QBarSeries::setBarDelegate(QQmlComponent *newBarDelegate)
|
|||
void QBarSeries::selectAll()
|
||||
{
|
||||
Q_D(QBarSeries);
|
||||
for (auto s : d->m_barSets) {
|
||||
for (auto s : std::as_const(d->m_barSets)) {
|
||||
s->selectAllBars();
|
||||
}
|
||||
}
|
||||
|
|
@ -1099,7 +1099,7 @@ void QBarSeries::selectAll()
|
|||
void QBarSeries::deselectAll()
|
||||
{
|
||||
Q_D(QBarSeries);
|
||||
for (auto s : d->m_barSets) {
|
||||
for (auto s : std::as_const(d->m_barSets)) {
|
||||
s->deselectAllBars();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue