markg added a comment.
It pains me a bit to say this since it looks like you've spend quite a bit of time writing that code. But please do look at KIO::iconNameForUrl [1] (like also suggested by Kai on reviewboard). Much of the code can likely be replaced by just using that instead. [1] https://api.kde.org/frameworks/kio/html/namespaceKIO.html#a215707adb0153b5ba4b318785fc746ea REPOSITORY R135 Integration for Qt applications in Plasma REVISION DETAIL https://phabricator.kde.org/D5538 To: eshalygin, #plasma Cc: markg, plasma-devel, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol