Diffusion KIO 074c91a58318

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

Authored by ngraham on Jun 28 2019, 6:05 PM.

Description

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

Summary:
KIO::iconNameForUrl() was doing a lot of redundant work on file items that KFileItem::iconName()
already does for us. This patch moves most of that logic into KIO::iconNameForUrl() when operating
on local files (but not for remote files, which may be slower, and for which we don't want to stat).

BUG: 356045
FIXED-IN: 5.60

Test Plan:
Functionality testing:

  • Tested that adding a directory with a custom icon to the Places panel resuts in the Places panel entry inheriting its custom icon:
  • Used the system with this patch in place for one year; did not find any instances of incorrect icons

Regression testing:

  • Tested that the trash changes its icon appropriately when adding an item to an empty trash, removing all items from the trash, and emptying the trash (testtrash test passes)
  • Tested that other icons on the Places panel look the same as they did before the patch

Unit testing:

  • No test regressions

Reviewers: Frameworks, broulik, meven, apol, dfaure

Reviewed By: dfaure

Subscribers: apol, kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D13048

Details

Committed
ngrahamJun 30 2019, 3:21 PM
Reviewer
dfaure
Differential Revision
D13048: Move redundant logic in KIO::iconNameForUrl() into KFileItem::iconName()
Parents
R241:ae84a6709389: Install KFileCustomDialog
Branches
Unknown
Tags
Unknown