Skip to content
Commit 722ee383 authored by David Edmundson's avatar David Edmundson
Browse files

call beginRemoveRows before removing the data

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

Reviewers: #plasma, drosca

Reviewed By: drosca

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D11613
parent 700a20f7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment