D22612: Fix assert when pressing enter really quickly
David Edmundson
noreply at phabricator.kde.org
Sun Jul 21 15:26:20 BST 2019
davidedmundson created this revision.
davidedmundson added a reviewer: Plasma.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
davidedmundson requested review of this revision.
REVISION SUMMARY
runCurrentIndex checks if "currentItem" is valid.
currentItem relies on the ListView being up-to-date.
The ListView also updates in response to QAIM::modelReset, the same
connection this code is attached to, so run afterwards.
This means the guard for currentItem is potentially out of date, and we
will call SourcesModel::run without a valid index on an empty source
model. This hits an assert.
modelReset and countChanged are identical as update resets
the model (which is wrong but a task for another day)
TEST PLAN
Could reproduce the crash by typing ":q <enter>" really quickly
Could no longer reproduce
REPOSITORY
R112 Milou
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D22612
AFFECTED FILES
lib/qml/ResultsView.qml
To: davidedmundson, #plasma
Cc: plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190721/6237131d/attachment-0001.html>
More information about the Plasma-devel
mailing list