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.
Details
Details
- Reviewers
hein - Group Reviewers
Plasma - Commits
- R119:d59af0bff7b2: [FolderModel] Simplify deleting existing drag image
Diff Detail
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.