D11946: [Folder View] Simplify clearing of lists
Kai Uwe Broulik
noreply at phabricator.kde.org
Thu Apr 5 07:22:46 UTC 2018
broulik created this revision.
broulik added reviewers: Plasma, hein.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
broulik requested review of this revision.
REVISION SUMMARY
Avoids triple lookup (contains → value → remove)
`take()` removes the item from the list and returns it. It returns `nullptr` for non-existing items which is perfectly fine to call `delete` on.
TEST PLAN
Compiles. Just found that local change I made months ago and been using forever with no issues.
REPOSITORY
R119 Plasma Desktop
REVISION DETAIL
https://phabricator.kde.org/D11946
AFFECTED FILES
containments/desktop/plugins/folder/foldermodel.cpp
To: broulik, #plasma, hein
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180405/d71c74e9/attachment-0001.html>
More information about the Plasma-devel
mailing list