]> cloud.milkyroute.net Git - dolphin.git/commit
Make it possible to open archives via the command line
authorFrank Reininghaus <frank78ac@googlemail.com>
Sun, 31 Aug 2014 22:06:18 +0000 (00:06 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Sun, 31 Aug 2014 22:06:18 +0000 (00:06 +0200)
commit47bd2048048f71163e5e15785132abeeaf7ea69e
tree9d2ede54ebffbb12030e3fcb4317ac4512f9489d
parentdc378935d3f92c45a48349d08f96cac63411fd50
Make it possible to open archives via the command line

This used to work before afcf8961f6666a912e0e6e5072a000837f7cf6aa (only
if "Open archives as folder" was enabled in the settings though). The
reason why this commit broke it is that the mime type of a file is not
determined automatically any more before asking
KProtocolManager::protocolForArchiveMimetype for the correct protocol,
so the determination of the protocol may fail.

Keeping the isMimeTypeKnown() check in DolphinView::openItemAsFolderUrl
still makes sense, because it prevents GUI blocking if the user tries
to open many files at the same time.

Therefore, we now call determineMimeType() in
DolphinViewContainer::slotUrlIsFileError(const KUrl&) and then try to
determine the correct protocol and use it to open the archive in the
view, rather than hoping that slotItemActivated(item) will do the right
thing.

BUG: 333078
REVIEW: 119877
FIXED-IN: 4.14.1
src/dolphinviewcontainer.cpp