mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Merge branch 'KDE/4.14'
This commit is contained in:
commit
4a774cb250
|
@ -463,7 +463,16 @@ void DolphinViewContainer::slotDirectoryLoadingCanceled()
|
||||||
void DolphinViewContainer::slotUrlIsFileError(const KUrl& url)
|
void DolphinViewContainer::slotUrlIsFileError(const KUrl& url)
|
||||||
{
|
{
|
||||||
const KFileItem item(KFileItem::Unknown, KFileItem::Unknown, 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)
|
void DolphinViewContainer::slotItemActivated(const KFileItem& item)
|
||||||
|
|
Loading…
Reference in a new issue