#include "dolphintabpage.h"
#include "dolphinviewcontainer.h"
#include "dolphin_generalsettings.h"
-#include "views/draganddrophelper.h"
#include <QApplication>
#include <KConfigGroup>
// directories are shown inside one tab (see openDirectories()).
QList<QUrl> dirs;
foreach (const QUrl& url, files) {
- const QUrl dir(url.adjusted(QUrl::RemoveFilename).path());
+ const QUrl dir(url.adjusted(QUrl::RemoveFilename));
if (!dirs.contains(dir)) {
dirs.append(dir);
}
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);
}
}
if (url == QUrl("file:///")) {
name = '/';
} else {
- name = url.fileName();
+ name = url.adjusted(QUrl::StripTrailingSlash).fileName();
if (name.isEmpty()) {
name = url.scheme();
} else {