-
Task
-
Resolution: Duplicate
-
P2: Important
-
None
-
6.9
-
None
An issue exists with series that expose the public function replace() (with passed in pointer types) as outlined by this example:
auto s1 = new QPieSlice("l1", 10); auto s2 = new QPieSlice("l2", 10); m_series->append(s1); m_series->replace(s1, s2); s1->series();
causing a crash as s1 is deleted. The remove(item*) function does the same but it has an alternative, take(item*), which doesnt delete the item. So it would make sense to have similar functionality for replace. Also, remove() and take() exist in QtCharts while replace does not, and it would be nice to have the same behavior for replace().
Related: QTBUG-128862