X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/9b7e0607003a5e1d8145bae261be8e77e20961b2..a124f2ada3bc3f36862dd2e207ceb68672610929:/src/treeviewsidebarpage.cpp diff --git a/src/treeviewsidebarpage.cpp b/src/treeviewsidebarpage.cpp index ef393964b..6cf2ede18 100644 --- a/src/treeviewsidebarpage.cpp +++ b/src/treeviewsidebarpage.cpp @@ -19,6 +19,7 @@ #include "treeviewsidebarpage.h" +#include "dolphindropcontroller.h" #include "dolphinmodel.h" #include "dolphinsortfilterproxymodel.h" #include "dolphinview.h" @@ -53,7 +54,7 @@ TreeViewSidebarPage::TreeViewSidebarPage(QWidget* parent) : m_treeView(0), m_leafDir() { - setLayoutDirection(Qt::LeftToRight); + setLayoutDirection(Qt::LeftToRight); } TreeViewSidebarPage::~TreeViewSidebarPage() @@ -164,8 +165,8 @@ void TreeViewSidebarPage::showEvent(QShowEvent* event) connect(m_treeView, SIGNAL(clicked(const QModelIndex&)), this, SLOT(updateActiveView(const QModelIndex&))); - connect(m_treeView, SIGNAL(urlsDropped(const KUrl::List&, const QModelIndex&)), - this, SLOT(dropUrls(const KUrl::List&, const QModelIndex&))); + connect(m_treeView, SIGNAL(urlsDropped(const QModelIndex&, QDropEvent*)), + this, SLOT(dropUrls(const QModelIndex&, QDropEvent*))); connect(m_treeView, SIGNAL(pressed(const QModelIndex&)), this, SLOT(updateMouseButtons())); @@ -203,15 +204,14 @@ void TreeViewSidebarPage::updateActiveView(const QModelIndex& index) } } -void TreeViewSidebarPage::dropUrls(const KUrl::List& urls, - const QModelIndex& index) +void TreeViewSidebarPage::dropUrls(const QModelIndex& index, QDropEvent* event) { if (index.isValid()) { const QModelIndex dirIndex = m_proxyModel->mapToSource(index); KFileItem item = m_dolphinModel->itemForIndex(dirIndex); Q_ASSERT(!item.isNull()); if (item.isDir()) { - emit urlsDropped(urls, item.url()); + DolphinDropController::dropUrls(item, item.url(), event, this); } } }