Ensure url from KActivity resources are properly built
AbandonedPublic

Authored by meven on Jun 22 2019, 4:01 PM.

Details

Reviewers
hein
broulik
Group Reviewers
Plasma
Summary

Similar to D24728

Diff Detail

Repository
R119 Plasma Desktop
Branch
arcpatch-D22005
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17803
Build 17821: arc lint + arc unit
broulik created this revision.Jun 22 2019, 4:01 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 22 2019, 4:01 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Jun 22 2019, 4:01 PM
ngraham edited the summary of this revision. (Show Details)Jun 22 2019, 4:19 PM
apol added a subscriber: apol.Jun 23 2019, 9:26 AM
apol added inline comments.
applets/kicker/plugin/actionlist.cpp
256 ↗(On Diff #60372)
if (QDir::isAbsolutePath(resource)) {
    resource = QUrl::fromLocalFile(resource);
}
meven added a subscriber: meven.Jul 26 2019, 8:47 AM
meven added inline comments.
applets/kicker/plugin/actionlist.cpp
256 ↗(On Diff #60372)

This should be done in applets/kicker/plugin/kastatsfavoritesmodel.cpp as well line 162 and line 275.

I have a patch ready @broulik I can take over if you'd like.

@meven Yes, please do. Thanks.

meven commandeered this revision.Oct 17 2019, 12:59 PM
meven added a reviewer: broulik.
meven updated this revision to Diff 68127.Oct 17 2019, 12:59 PM

Use QDir::isAbsolutePath and rebase

meven retitled this revision from Accept local paths to Refactor code for better correctness.Oct 17 2019, 1:06 PM
meven edited the summary of this revision. (Show Details)
meven edited the test plan for this revision. (Show Details)
meven retitled this revision from Refactor code for better correctness to Ensure url from KActivity resources are properly built.
meven updated this revision to Diff 68132.Oct 17 2019, 1:14 PM

amend commit message

ivan added a subscriber: ivan.Oct 17 2019, 5:51 PM
ivan added inline comments.
applets/taskmanager/plugin/backend.cpp
322

resultIt->resource() (when you are at it :) )

meven updated this revision to Diff 68193.Oct 17 2019, 7:02 PM

Avoid an unnecessary dereference

meven edited the summary of this revision. (Show Details)Oct 21 2019, 7:35 AM
meven marked an inline comment as done.
hein accepted this revision.Jan 24 2020, 9:00 PM
This revision is now accepted and ready to land.Jan 24 2020, 9:00 PM
meven abandoned this revision.Jan 25 2020, 2:40 PM

After further check, my patch does not do much, just allowed me to discover bug about dolphin's recent folder list missing.

if (QDir::isAbsolutePath(resource)) {
    resource = QUrl::fromLocalFile(resource).toString();
}

Here QDir::isAbsolutePath will always be true because at line 312 | Url::file(); we requested files only.

Same is true for D24728

applets/taskmanager/plugin/backend.cpp
336

This prevents filemanager (or apps that opens dirs) to display their recent directories will fix.
Same goes in D24728.