Fix slideshow crashing in invalidate()

Authored by davidre on Oct 17 2019, 8:58 AM.

Description

Fix slideshow crashing in invalidate()

Summary:
QSortFilterProxyModel uses std::stable_sort internally which requires that the
comparison function generates a strict weak ordering. Returning true or false
randomly didn't fullfil this requirement causing a crash in some calls to invalidate.
To keep the random order consistent a vector of row indices is used which records
the current random order.

BUG: 413018
FIXED-IN: 5.17.1

Test Plan:
To reproduce the bug use a slideshow in random order with few pictures and a small
time intervall.

Reviewers: Plasma, broulik

Reviewed By: Plasma, broulik

Subscribers: davidedmundson, broulik, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D24723

Details

Committed
davidreOct 21 2019, 8:51 AM
Reviewer
Plasma
Differential Revision
D24723: Fix slideshow crashing in invalidate()
Parents
R120:5ad4d23bf6b0: SVN_SILENT made messages (.desktop file) - always resolve ours
Branches
Unknown
Tags
Unknown