Merge lp:~aacid/dee-qt/behave_better into lp:dee-qt
Proposed by
Albert Astals Cid
Status: | Merged |
---|---|
Approved by: | Michal Hruby |
Approved revision: | 83 |
Merged at revision: | 81 |
Proposed branch: | lp:~aacid/dee-qt/behave_better |
Merge into: | lp:dee-qt |
Diff against target: |
65 lines (+12/-4) 1 file modified
deelistmodel.cpp (+12/-4) |
To merge this branch: | bzr merge lp:~aacid/dee-qt/behave_better |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Michal Hruby (community) | Approve | ||
Review via email: mp+181258@code.launchpad.net |
Commit message
Be a better behaved QAbstractListModel
That means:
* decrement/increment the count between the begin/end calls
* Add a workaround so that data() ignores the not really removed row after endRemoveRows has been called
We still are not good behaved in the fact that we call beginInsertRows
after the model has been internall modified, but luckily it seems
not much people listens to that signal's data
We also rely on the fact that nothing will call data() between us
resetting m_rowBeingRemoved to -1 at the end of DeeListModelPri
and the internal dee model actually removing the row
To post a comment you must log in.
Looks reasonable, it certainly isn't ideal, but that's as far as we can go since changes to dee models emit just a single signal, which isn't easy to map to Qt's begin and end change model.