[KUrlNavigator] List subdirs of a parent folder of an archive
Needs ReviewPublic

Authored by thsurrel on Fri, Nov 30, 10:23 PM.

Details

Reviewers
None
Group Reviewers
Frameworks
Summary

When we are navigating in an archive, trying to use the navigator
buttons to list the subdir of a parent folder of the archive was
not working because the protocol would still be 'tar' instead of
'file'.

Test Plan

In Dolphin, click on a zip file. Then in the URL bar (breadcrumb
mode), try to list the sub directories of the folder containing
that zip file by clicking on the litlle arrow on the right of the
folder's name.

Diff Detail

Repository
R241 KIO
Branch
arc_urlnavigatorbutton (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 5564
Build 5582: arc lint + arc unit
thsurrel created this revision.Fri, Nov 30, 10:23 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptFri, Nov 30, 10:23 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
thsurrel requested review of this revision.Fri, Nov 30, 10:23 PM
thsurrel updated this revision to Diff 46589.Fri, Nov 30, 10:24 PM

Fix deleted empty line.

gregormi added inline comments.
src/filewidgets/kurlnavigatorbutton.cpp
414

When I click a zip file I get this in the URL bar:

krarc:/home/gregor/Downloads/kfk_10p.zip/

This could mean that "krarc" should be added to this if statement.

elvisangelaccio added inline comments.
src/filewidgets/kurlnavigatorbutton.cpp
414

Or we could use mimetype detection like we do in KUrlNavigator::Private::isCompressedPath().

417

Coding sytle: variable names need to be camelCase.

thsurrel added inline comments.Mon, Dec 3, 12:53 PM
src/filewidgets/kurlnavigatorbutton.cpp
414

What would be the clean way to expose this function ? I wouldn't like to duplicate the code.
And btw, the "if ((m_url.scheme() == QLatin1String("tar")) || (m_url.scheme() == QLatin1String("zip")))" condition was taken from KUrlNavigator::setLocationUrl, so there must be a bugfix to be made there as well with the 'krarc' case gregormi reports.