Commit da77f501 authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Simplify code in ThumbnailProvider::appendItems

KFileItem supports hashing so we can construct a set directly from
mItems rather than needing to insert things manually.
parent c7ccb617
......@@ -214,13 +214,10 @@ void ThumbnailProvider::setThumbnailGroup(ThumbnailGroup::Enum group)
void ThumbnailProvider::appendItems(const KFileItemList& items)
if (!mItems.isEmpty()) {
QSet<QString> itemSet;
for (const KFileItem & item : qAsConst(mItems)) {
QSet<KFileItem> itemSet{mItems.begin(), mItems.end()};
for (const KFileItem & item : items) {
if (!itemSet.contains(item.url().url())) {
if (!itemSet.contains(item)) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment