Merge branch 'master' into frameworks

This commit is contained in:
Emmanuel Pescosta 2014-09-11 10:50:56 +02:00
commit 32b51b7b92

View file

@ -488,7 +488,16 @@ void DolphinViewContainer::slotDirectoryLoadingCanceled()
void DolphinViewContainer::slotUrlIsFileError(const KUrl& url)
{
const KFileItem item(KFileItem::Unknown, KFileItem::Unknown, url);
slotItemActivated(item);
// Find out if the file can be opened in the view (for example, this is the
// case if the file is an archive). The mime type must be known for that.
item.determineMimeType();
const KUrl& folderUrl = DolphinView::openItemAsFolderUrl(item, true);
if (!folderUrl.isEmpty()) {
m_view->setUrl(folderUrl);
} else {
slotItemActivated(item);
}
}
void DolphinViewContainer::slotItemActivated(const KFileItem& item)