Project

General

Profile

Bug #5290

beginRemoveRows (const WModelIndex &parent, int first, int last)

Added by Drus Kor about 5 years ago. Updated almost 5 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
Target version:
-
Start date:
09/23/2016
Due date:
% Done:

0%

Estimated time:

Description

crash after remove some count of rows;

code inside;


Files

simple_test.tar.gz (2.6 KB) simple_test.tar.gz Drus Kor, 09/23/2016 03:20 PM
#1

Updated by Drus Kor about 5 years ago

tested on:

3.3.6

3.3.5

#2

Updated by Koen Deforche about 5 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
#3

Updated by Koen Deforche almost 5 years ago

  • Status changed from InProgress to Feedback

Hey, there seems to be an issue with you organize your model internal pointers, to quote the documentation, an internal pointer must identify the parent of the corresponding item. In your code you organized it that the internalPointer() references the item itself. This is an intentional choice within the library as it has as consequences:

  • there cannot be an inconsistency between row and internalPointer() --- otherwise there would be a redundancy
  • a user can organize internal pointers so that they are needed only for intermediate nodes (with at least one child)
  • the views can adjust indexes in one go (and not half before and half after the change)

Also available in: Atom PDF