Fix crash with animations disabled
ClosedPublic

Authored by sandsmark on Oct 2 2019, 2:28 PM.

Details

Reviewers
mlaurent
meven
ngraham
yurchor
tommo
Group Reviewers
Gwenview
Summary

If animations are disabled pretendFadeInFinished() gets called, which iterates over mAddedViews and calls slotFadeInFinished which removes stuff from mAddedViews, with spectacular results.

I'm not sure if this didn't surface before because Q_FOREACH is safer?

Test Plan

Disable animations, it doesn't consistently crash anymore.

Diff Detail

Repository
R260 Gwenview
Lint
Lint Skipped
Unit
Unit Tests Skipped
sandsmark created this revision.Oct 2 2019, 2:28 PM
Restricted Application added a project: Gwenview. ยท View Herald TranscriptOct 2 2019, 2:28 PM
sandsmark requested review of this revision.Oct 2 2019, 2:28 PM

Gwenview does not crash after the patch, but still animates the GIF's when "None" for animation is checked in the settings. Is this expected?

Gwenview does not crash after the patch, but still animates the GIF's when "None" for animation is checked in the settings. Is this expected?

This setting is for UI animations, not for playing videos and animated image files.

ngraham accepted this revision.Oct 5 2019, 1:51 PM
This revision is now accepted and ready to land.Oct 5 2019, 1:51 PM
sandsmark closed this revision.Oct 11 2019, 7:10 PM

Already fixed with another approach in master.