kio: add favicon to the overlays from KFileItem::overlays()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-05-28 10:41:08 +03:00
parent fe6daca7c7
commit 93a71cccd8

View file

@ -636,6 +636,14 @@ QStringList KFileItem::overlays() const
names.append("application-zip");
}
// only for URLs with http or https as protocol
if (!d->m_bIsLocalUrl) {
const QString favIcon = KMimeType::favIconForUrl(d->m_url);
if (!favIcon.isEmpty()) {
names.append(favIcon);
}
}
return names;
}