D26357: Lazily load file entry icons

Kai Uwe Broulik noreply at phabricator.kde.org
Tue Jan 7 09:45:40 GMT 2020


broulik added inline comments.

INLINE COMMENTS

> archiveentry.cpp:208
> +        if (m_isDirectory) {
> +            m_icon = QIcon::fromTheme(db.mimeTypeForName(QStringLiteral("inode/directory")).iconName());
> +        } else {

Potentially you could even cache this icon as it's not going to change

> archiveentry.h:132
>      bool m_isPasswordProtected;
> +    QIcon m_icon;
>  };

If you made this `mutable` you could keep `icon()` `const` and save you some `const_cast`

REPOSITORY
  R36 Ark

REVISION DETAIL
  https://phabricator.kde.org/D26357

To: nicolasfella, #ark
Cc: broulik, kde-utils-devel, fbampaloukas, tctara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20200107/fe49bc37/attachment.html>


More information about the Kde-utils-devel mailing list