]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphintabwidget.cpp
Paint icons at the correct size
[dolphin.git] / src / dolphintabwidget.cpp
index b38cd5146140e51eec3ca9847a8662cd24b6b42d..5b26359e6298f4b4209ddd60d0e1640943dd0586 100644 (file)
@@ -23,7 +23,6 @@
 #include "dolphintabpage.h"
 #include "dolphinviewcontainer.h"
 #include "dolphin_generalsettings.h"
-#include "views/draganddrophelper.h"
 
 #include <QApplication>
 #include <KConfigGroup>
@@ -286,13 +285,8 @@ void DolphinTabWidget::openNewActivatedTab(int index)
 void DolphinTabWidget::tabDropEvent(int index, QDropEvent* event)
 {
     if (index >= 0) {
-        const DolphinView* view = tabPageAt(index)->activeViewContainer()->view();
-
-        QString error;
-        DragAndDropHelper::dropUrls(view->rootItem(), view->url(), event, error);
-        if (!error.isEmpty()) {
-            currentTabPage()->activeViewContainer()->showMessage(error, DolphinViewContainer::Error);
-        }
+        DolphinView* view = tabPageAt(index)->activeViewContainer()->view();
+        view->dropUrls(view->url(), event);
     }
 }
 
@@ -348,7 +342,7 @@ QString DolphinTabWidget::tabName(const QUrl& url) const
     if (url == QUrl("file:///")) {
         name = '/';
     } else {
-        name = url.fileName();
+        name = url.adjusted(QUrl::StripTrailingSlash).fileName();
         if (name.isEmpty()) {
             name = url.scheme();
         } else {