Skip to content
Commit a1cf305f authored by David Redondo's avatar David Redondo 🏎
Browse files

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
parent 5ad4d23b
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