[FolderModel] Simplify deleting existing drag image
ClosedPublic

Authored by broulik on Feb 26 2016, 2:11 PM.

Details

Summary

Instead of looking up three times (contains, value, remove) we just use take which removes the item and returns it and delete that. If there is no such item Qt promises to return a null pointer which is safe to delete.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik updated this revision to Diff 2472.Feb 26 2016, 2:11 PM
broulik retitled this revision from to [FolderModel] Simplify deleting existing drag image.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added reviewers: Plasma, hein.
broulik set the repository for this revision to R119 Plasma Desktop.
broulik added a project: Plasma.
Restricted Application added a subscriber: plasma-devel. · View Herald TranscriptFeb 26 2016, 2:11 PM
hein accepted this revision.Feb 26 2016, 3:07 PM
hein edited edge metadata.
This revision is now accepted and ready to land.Feb 26 2016, 3:07 PM
This revision was automatically updated to reflect the committed changes.