mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Merge branch 'KDE/4.11' into KDE/4.12
Revert "Files passed as arguments: Ignore unsupported files"
This reverts commit cd9e50ae4f
.
See bug#327224 for details.
This commit is contained in:
commit
ee92ff0d42
|
@ -31,7 +31,6 @@
|
|||
#include "panels/information/informationpanel.h"
|
||||
#include "settings/dolphinsettingsdialog.h"
|
||||
#include "statusbar/dolphinstatusbar.h"
|
||||
#include "views/dolphinview.h"
|
||||
#include "views/dolphinviewactionhandler.h"
|
||||
#include "views/dolphinremoteencoding.h"
|
||||
#include "views/draganddrophelper.h"
|
||||
|
@ -248,20 +247,8 @@ void DolphinMainWindow::openDirectories(const QList<KUrl>& dirs)
|
|||
return;
|
||||
}
|
||||
|
||||
// dirs could contain URLs that actually point to archives or other files.
|
||||
// Replace them by URLs we can open where possible and filter the rest out.
|
||||
QList<KUrl> urlsToOpen;
|
||||
foreach (const KUrl& rawUrl, dirs) {
|
||||
const KFileItem& item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, rawUrl);
|
||||
item.determineMimeType();
|
||||
const KUrl& url = DolphinView::openItemAsFolderUrl(item);
|
||||
if (!url.isEmpty()) {
|
||||
urlsToOpen.append(url);
|
||||
}
|
||||
}
|
||||
|
||||
if (urlsToOpen.count() == 1) {
|
||||
m_activeViewContainer->setUrl(urlsToOpen.first());
|
||||
if (dirs.count() == 1) {
|
||||
m_activeViewContainer->setUrl(dirs.first());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -271,12 +258,12 @@ void DolphinMainWindow::openDirectories(const QList<KUrl>& dirs)
|
|||
|
||||
// Open each directory inside a new tab. If the "split view" option has been enabled,
|
||||
// always show two directories within one tab.
|
||||
QList<KUrl>::const_iterator it = urlsToOpen.constBegin();
|
||||
while (it != urlsToOpen.constEnd()) {
|
||||
QList<KUrl>::const_iterator it = dirs.begin();
|
||||
while (it != dirs.end()) {
|
||||
openNewTab(*it);
|
||||
++it;
|
||||
|
||||
if (hasSplitView && (it != urlsToOpen.constEnd())) {
|
||||
if (hasSplitView && (it != dirs.end())) {
|
||||
const int tabIndex = m_viewTab.count() - 1;
|
||||
m_viewTab[tabIndex].secondaryView->setUrl(*it);
|
||||
++it;
|
||||
|
|
Loading…
Reference in a new issue