KIO::iconNameForUrl(): handle the case of a file/folder under trash:/
ClosedPublic

Authored by ahmadsamir on Mar 5 2020, 11:23 AM.

Details

Summary

For trash:/ we have two individual cases:

  • trash:/ itself, show empty/full trash icon
  • trash:/file and trash:/folder/, show icon for the file mimetype or inode/directory respectively

Less if nesting by using a ternary.

This fixes the testtrash unit test.

Extend kfileitemtest to test all cases.

Test Plan

make && ctest

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ahmadsamir created this revision.Mar 5 2020, 11:23 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptMar 5 2020, 11:23 AM
ahmadsamir requested review of this revision.Mar 5 2020, 11:23 AM
dfaure accepted this revision.Mar 5 2020, 11:30 AM

Yay for unittests :-)

This revision is now accepted and ready to land.Mar 5 2020, 11:30 AM
meven accepted this revision.Mar 5 2020, 11:40 AM
This revision was automatically updated to reflect the committed changes.