#include "treeviewsidebarpage.h"
+#include "dolphindropcontroller.h"
#include "dolphinmodel.h"
#include "dolphinsortfilterproxymodel.h"
#include "dolphinview.h"
m_treeView(0),
m_leafDir()
{
- setLayoutDirection(Qt::LeftToRight);
+ setLayoutDirection(Qt::LeftToRight);
}
TreeViewSidebarPage::~TreeViewSidebarPage()
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()));
}
}
-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);
}
}
}