call beginRemoveRows before removing the data
ClosedPublic

Authored by davidedmundson on Mar 23 2018, 1:58 PM.

Details

Summary

It's perfectly valid to call ::data() from within beginRemoveRows, proxy
models will do it all the time. Also at the time of calling rowCount()
should be correct at the time of calling beginRemoveRows, this throws an
assert on Qt5.11.

This patch follows the normal beginRemoveRows / actual removal /
endRemoveRows policy.

Data insertion is unchaged in this patch, it's less of an issue to have
data before you announce it than the other way round.

Test Plan

Plasma stayed up for more than a few minutes

Diff Detail

Repository
R115 Plasma Audio Volume Applet
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Mar 23 2018, 1:58 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 23 2018, 1:58 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Mar 23 2018, 1:58 PM
drosca accepted this revision.Mar 26 2018, 2:04 PM
This revision is now accepted and ready to land.Mar 26 2018, 2:04 PM

Into Plasma/5.12 please.

This revision was automatically updated to reflect the committed changes.