D13048: Move redundant logic in KIO::iconNameForUrl() into KFileItem::iconName()

Aleix Pol Gonzalez noreply at phabricator.kde.org
Tue May 22 23:51:07 UTC 2018


apol added inline comments.

INLINE COMMENTS

> global.cpp:332
> +    KIO::StatJob *job = KIO::stat(url);
> +    job->exec();
> +    KIO::UDSEntry entry = job->statResult();

having a blocking stat isn't good. stat will take a while on some protocols and it's not even all that quick on local file systems. I guess that's why we had this code twice.

> kfileitem.cpp:951
> +
> +    if (d->m_iconName == QStringLiteral("inode-directory")) {
> +        d->m_iconName = QStringLiteral("folder");

Why's this needed if `inode-directory` is the same as `folder`?

REPOSITORY
  R241 KIO

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

To: ngraham, #frameworks, broulik
Cc: apol, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180522/f1ffc94c/attachment.html>


More information about the Kde-frameworks-devel mailing list