Refactoring the hidding/showing animation use within KFilePlacesView
ClosedPublic

Authored by franckarrecot on Nov 27 2017, 11:32 AM.

Details

Summary

Depends on D8367
Depends on D8450

Test Plan

manual testing on the context menu

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
franckarrecot created this revision.Nov 27 2017, 11:32 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 27 2017, 11:32 AM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
franckarrecot requested review of this revision.Nov 27 2017, 11:32 AM
ervin requested changes to this revision.Nov 28 2017, 9:40 AM
ervin added inline comments.
src/filewidgets/kfileplacesview.cpp
811–831

This whole change on the if structure there is unrelated to the rest of the patch so please remove it. Beside this seems to change the semantic, we never tested for result being nullptr or not before, we tested for the various actions to be there, you changed that logic completely that smells dangerous to me.

src/filewidgets/kfileplacesview.h
111–112 ↗(On Diff #23026)

They are never used as slots AFAICT so this should go away I think.

This revision now requires changes to proceed.Nov 28 2017, 9:40 AM
franckarrecot marked 2 inline comments as done.Nov 28 2017, 10:22 AM
franckarrecot added inline comments.
src/filewidgets/kfileplacesview.cpp
811–831

Indeed the structural change could be in an other patch. Not sure to see where it's dangerous tho, previous code testing the nullptr where doing it on a variable eg: empty trash, and only if result variable was equal to empty trash, which had to be differnt from nullptr it would go on, I think this endup being the same with the new change.

If result is different from nullptr AND equal to empty trash is equivalent to result being equal to emptyTrash and emptyTrash being different to nulltpr. The code is not doing anything for result being equal to nullptr alone, so no new behavior AFAIK.

Removing it, maybe in an other commit :-)

franckarrecot marked an inline comment as done.

update

ervin accepted this revision.Nov 28 2017, 11:37 AM
This revision is now accepted and ready to land.Nov 28 2017, 11:37 AM

rebase to master

This revision was automatically updated to reflect the committed changes.