┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index e68fab997..d358ad733 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -1139,6 +1139,16 @@ void DolphinMainWindow::handleUrl(const KUrl& url)
}
}
+void DolphinMainWindow::tabDropEvent(int tab, QDropEvent* event)
+{
+ const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
+ if (!urls.isEmpty() && tab != -1) {
+ const ViewTab& viewTab = m_viewTab[tab];
+ const KUrl destPath = viewTab.isPrimaryViewActive ? viewTab.primaryView->url() : viewTab.secondaryView->url();
+ DragAndDropHelper::instance().dropUrls(KFileItem(), destPath, event, m_tabBar);
+ }
+}
+
void DolphinMainWindow::slotCaptionStatFinished(KJob* job)
{
m_captionStatJob = 0;
@@ -1227,6 +1237,8 @@ void DolphinMainWindow::init()
this, SLOT(closeTab(int)));
connect(m_tabBar, SIGNAL(tabMoved(int, int)),
this, SLOT(slotTabMoved(int, int)));
+ connect(m_tabBar, SIGNAL(receivedDropEvent(int, QDropEvent*)),
+ this, SLOT(tabDropEvent(int, QDropEvent*)));
m_tabBar->blockSignals(true); // signals get unblocked after at least 2 tabs are open