D24723: Fix slideshow crashing in invalidate()

2019-10-21 Thread David Redondo
This revision was automatically updated to reflect the committed changes. Closed by commit R120:a1cf305ffb21: Fix slideshow crashing in invalidate() (authored by davidre). REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D24723?vs=68304=68407 REVISION

D24723: Fix slideshow crashing in invalidate()

2019-10-19 Thread David Redondo
davidre updated this revision to Diff 68304. davidre added a comment. Build the new order only after setting the source model. In invalidate just shuffling is enough. REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D24723?vs=68302=68304 BRANCH

D24723: Fix slideshow crashing in invalidate()

2019-10-19 Thread David Redondo
davidre updated this revision to Diff 68302. davidre marked 3 inline comments as done. davidre added a comment. Like this? I also changed the condition in image.cpp otherwise the order wouldn't have been random on the first run with these changes. REPOSITORY R120 Plasma Workspace

D24723: Fix slideshow crashing in invalidate()

2019-10-19 Thread David Edmundson
davidedmundson added a comment. Other than Kai's comments, ship it. REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D24723 To: davidre, #plasma Cc: davidedmundson, broulik, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen,

D24723: Fix slideshow crashing in invalidate()

2019-10-17 Thread David Redondo
davidre added inline comments. INLINE COMMENTS > slidefiltermodel.cpp:51 > +if(sourceModel) { > +connect(sourceModel, ::rowsInserted, this, > ::invalidate); > +connect(sourceModel, ::rowsRemoved, this, > ::invalidate); Good point. No need to invalidate in the other cases.

D24723: Fix slideshow crashing in invalidate()

2019-10-17 Thread Kai Uwe Broulik
broulik added inline comments. INLINE COMMENTS > slidefiltermodel.cpp:51 > +if(sourceModel) { > +connect(sourceModel, ::rowsInserted, this, > ::invalidate); > +connect(sourceModel, ::rowsRemoved, this, > ::invalidate); Perhaps only `invalidate` if order is actually set to

D24723: Fix slideshow crashing in invalidate()

2019-10-17 Thread David Redondo
davidre updated this revision to Diff 68117. davidre added a comment. Simplify the logic. In configmode we don't need the random order. We just use the order of the underlying model. REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE

D24723: Fix slideshow crashing in invalidate()

2019-10-17 Thread David Redondo
davidre updated this revision to Diff 68115. davidre added a comment. Need rebuild here, rowCount could have changed REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D24723?vs=68114=68115 BRANCH Plasma/5.17 REVISION DETAIL

D24723: Fix slideshow crashing in invalidate()

2019-10-17 Thread David Redondo
davidre created this revision. davidre added a reviewer: Plasma. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. davidre requested review of this revision. REVISION SUMMARY QSortFilterProxyModel uses std::stable_sort internally which requires that the comparison