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

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

Details

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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
meven created this revision.Sep 2 2019, 10:15 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptSep 2 2019, 10:15 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
meven requested review of this revision.Sep 2 2019, 10:15 AM
meven added a comment.Sep 2 2019, 10:19 AM

Followup after D23650

ngraham accepted this revision.Sep 4 2019, 4:38 PM
This revision is now accepted and ready to land.Sep 4 2019, 4:38 PM
elvisangelaccio added inline comments.Sep 9 2019, 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.Sep 9 2019, 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.Sep 9 2019, 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.Sep 9 2019, 9:57 PM
meven updated this revision to Diff 65805.Sep 10 2019, 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.Sep 13 2019, 8:23 PM
This revision is now accepted and ready to land.Sep 13 2019, 8:23 PM
meven added a comment.Oct 18 2019, 9:35 AM

This does depend now on KF5 5.64.
So should I wait for the dependency bump or do it myself ?
https://phabricator.kde.org/D19989#inline-139775 mentions doing also.

This does depend now on KF5 5.64.
So should I wait for the dependency bump or do it myself ?
https://phabricator.kde.org/D19989#inline-139775 mentions doing also.

It's safest to wait until 5.64 is released (about two weeks) and then commit it alongside a change to bump the dependency version in CMake.

meven planned changes to this revision.Oct 18 2019, 1:29 PM

Wait for KF 5.64 release and bump dependency if not already done.

meven updated this revision to Diff 69595.Nov 11 2019, 5:15 PM

Rebase patch

This revision is now accepted and ready to land.Nov 11 2019, 5:15 PM
meven updated this revision to Diff 69596.Nov 11 2019, 5:18 PM

Bump KF5_MIN_VERSION to 5.64

This revision was automatically updated to reflect the committed changes.