Project

General

Profile

Actions

Bug #5290

open

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

Added by Drus Kor over 7 years ago. Updated over 7 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
Actions #1

Updated by Drus Kor over 7 years ago

tested on:

3.3.6

3.3.5

Actions #2

Updated by Koen Deforche over 7 years ago

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

Updated by Koen Deforche over 7 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)
Actions

Also available in: Atom PDF