[Information Panel] Allows to refresh icon and metadata for urls such as trash:/
AcceptedPublic

Authored by meven on Mon, Sep 2, 10:15 AM.

Details

Reviewers
ngraham
elvisangelaccio
Group Reviewers
Dolphin
Summary

CCBUG: 392882

Test Plan
  1. Create a file
  2. Remove it, so that it goes to the trash
  3. Open trash
  4. Empty trash

Before:
Information panel icon is still user-trash-full

After:
Information panel icon is changed to user-trash

Diff Detail

Repository
R318 Dolphin
Branch
arcpatch-D23668
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 16353
Build 16371: arc lint + arc unit
meven created this revision.Mon, Sep 2, 10:15 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptMon, Sep 2, 10:15 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
meven requested review of this revision.Mon, Sep 2, 10:15 AM
meven added a comment.Mon, Sep 2, 10:19 AM

Followup after D23650

ngraham accepted this revision.Wed, Sep 4, 4:38 PM
This revision is now accepted and ready to land.Wed, Sep 4, 4:38 PM
elvisangelaccio added inline comments.Mon, Sep 9, 9:23 AM
src/panels/information/informationpanel.cpp
322

Can you explain what the problem is? Is it because trash:/ is not local?

meven added inline comments.Mon, Sep 9, 11:17 AM
src/panels/information/informationpanel.cpp
322

Yes indeed, only file:/ and scheme less urls are locals, thrash:/ or recentlyused:/ are not.
QUrl::fromLocalFile(fileName) with a fileName trash:/ returns file:/trash:/ which is not correct.

And this may needed to do this in other knotify slot* in the future.

I can add this in comment, if you file it is needed.

elvisangelaccio requested changes to this revision.Mon, Sep 9, 9:57 PM
elvisangelaccio added inline comments.
src/panels/information/informationpanel.cpp
322

Looking at the git history, this was a KF5 porting bug. KUrl(fileName) was wrongly ported to QUrl::fromLocalFile(), while we should use QUrl::fromUserInput() instead.

While at it, we should fix all the occurrences in this file (e.g. slotFilesRemoved() and so on).

This revision now requires changes to proceed.Mon, Sep 9, 9:57 PM
meven updated this revision to Diff 65805.Tue, Sep 10, 8:50 PM
meven marked 3 inline comments as done.

Use QUrl::fromUserInput as we should have, now need D23851 to work

elvisangelaccio accepted this revision.Fri, Sep 13, 8:23 PM
This revision is now accepted and ready to land.Fri, Sep 13, 8:23 PM