Fix crash with animations disabled
ClosedPublic

Authored by sandsmark on Wed, Oct 2, 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.Wed, Oct 2, 2:28 PM
Restricted Application added a project: Gwenview. · View Herald TranscriptWed, Oct 2, 2:28 PM
sandsmark requested review of this revision.Wed, Oct 2, 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.Sat, Oct 5, 1:51 PM
This revision is now accepted and ready to land.Sat, Oct 5, 1:51 PM
sandsmark closed this revision.Fri, Oct 11, 7:10 PM

Already fixed with another approach in master.