diff options
author | Tamas Martinec <tamas.martinec@symbio.com> | 2021-01-15 11:00:22 +0200 |
---|---|---|
committer | Tamas Martinec <tamas.martinec@symbio.com> | 2021-01-15 11:51:45 +0200 |
commit | 8fbbe10910c1eb2fece94e065c81f6b94c35f02a (patch) | |
tree | 1f43173e19251606c1e6c9127ca205a67d1001ac /src/charts/qchartglobal_p.h | |
parent | 130463160b4923069eb98da49edaf7d93180f4f8 (diff) |
QtCharts: Append branch condition fix in QLegend
Qlist insert was called with -1 as position in
QLegendPrivate::handleCountChanged, as pos = indexOfSeries(series,
m_markers) is used as insert pos, which has -1 if the series is not
found in the markers. The branch condition that should handle this use
case was mistaken and the else branch executed which was not inteded.
The else branch was still functional since the insert position
protection adjusted it to 0 but it gave an assert because of the -1 as
insert position. The assert and warning for negative indices was added
in 5.15, which is why there was no warning before.
Corrected the condition. The issue doesn't look platform dependent.
Fixes: QTBUG-85909
Change-Id: I78c7dba3b4793ad23f1508c11bd43bca8b4533ed
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/charts/qchartglobal_p.h')
0 files changed, 0 insertions, 0 deletions