summaryrefslogtreecommitdiffstats
path: root/kde/patch/kde-baseapps/dolphin_kdebug_327224.patch
blob: 8210d8772e59b14e9b70ab3d1d8b872a9f3eef3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Revert "Files passed as arguments: Ignore unsupported files"

This reverts commit cd9e50ae4f3ded5a78d0cfb09a67684a9c15d726.

See bug#327224 for details. 

--- a/dolphin/src/dolphinmainwindow.cpp
+++ b/dolphin/src/dolphinmainwindow.cpp
@@ -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"
@@ -244,20 +243,8 @@
         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;
     }
 
@@ -267,12 +254,12 @@
 
     // 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.begin();
-    while (it != urlsToOpen.end()) {
+    QList<KUrl>::const_iterator it = dirs.begin();
+    while (it != dirs.end()) {
         openNewTab(*it);
         ++it;
 
-        if (hasSplitView && (it != urlsToOpen.end())) {
+        if (hasSplitView && (it != dirs.end())) {
             const int tabIndex = m_viewTab.count() - 1;
             m_viewTab[tabIndex].secondaryView->setUrl(*it);
             ++it;