Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-128894

Series with replace() invokeable should have a pointer delete and non-delete option

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Duplicate
    • Icon: P2: Important P2: Important
    • None
    • 6.9
    • Graphs: 2D
    • 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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            owaisakhtar Owais Akhtar
            owaisakhtar Owais Akhtar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes