update KParts' ReadOnlyPart::localFilePath in DolphinPart::openUrl()
AbandonedPublic

Authored by pdabrowski on Mar 2 2020, 6:45 PM.

Details

Reviewers
elvisangelaccio
ngraham
Group Reviewers
Dolphin
Summary

Fixes #416989 caused by D26140.

See also (KParts): D27148 (abandoned)

BUG: 416989

Diff Detail

Repository
R318 Dolphin
Lint
Lint Skipped
Unit
Unit Tests Skipped
pdabrowski created this revision.Mar 2 2020, 6:45 PM
Restricted Application added a project: Dolphin. · View Herald TranscriptMar 2 2020, 6:45 PM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
pdabrowski requested review of this revision.Mar 2 2020, 6:45 PM
pdabrowski edited the summary of this revision. (Show Details)Mar 2 2020, 6:51 PM
pdabrowski updated this revision to Diff 77364.Mar 10 2020, 4:34 PM
pdabrowski retitled this revision from Don't use KParts::ReadOnlyPart::localFilePath() in DolphinPart to update KParts' ReadOnlyPart::localFilePath in DolphinPart::openUrl().
pdabrowski edited the summary of this revision. (Show Details)

"update KParts' ReadOnlyPart::localFilePath in DolphinPart::openUrl()"
instead of reverting by:
"don't use KParts::ReadOnlyPart::localFilePath() in DolphinPart"

src/dolphinpart.cpp
322

Have you tried to use KParts::ReadOnlyPart::openUrl() instead? (as described here: https://bugs.kde.org/show_bug.cgi?id=416989#c0)

src/dolphinpart.cpp
322
pdabrowski marked 2 inline comments as done.Dec 29 2020, 4:16 PM
pdabrowski added inline comments.
src/dolphinpart.cpp
322

Yes, KParts::ReadOnlyPart::openUrl() seems to work fine here.
I'm not sure if there were any corner cases, but I tested this now with Konqueror, and it works.
Added merge request: https://invent.kde.org/system/dolphin/-/merge_requests/151/

pdabrowski marked 2 inline comments as done.Dec 29 2020, 4:17 PM
pdabrowski added inline comments.Dec 29 2020, 4:37 PM
src/dolphinpart.cpp
322

No, it doesn't work for remote addresses (tested: fish://localhost/).
It shows remote directory contents, but also an error.
It's because KParts::ReadOnlyPart::openUrl() has its own routine for opening remote urls, which shouldn't be called here:

} else {
    d->openRemoteFile();
    return true;
}
src/dolphinpart.cpp
322

Thanks for the test. I merged the invent patch, can you abandon this one?

pdabrowski abandoned this revision.Dec 29 2020, 10:58 PM