+void TreeViewSidebarPage::dropUrls(const KUrl::List& urls,
+ const QModelIndex& index)
+{
+ if (index.isValid()) {
+#if defined(USE_PROXY_MODEL)
+ const QModelIndex& dirIndex = m_proxyModel->mapToSource(index);
+ KFileItem* item = m_dirModel->itemForIndex(dirIndex);
+#else
+ KFileItem* item = m_dirModel->itemForIndex(index);
+#endif
+ Q_ASSERT(item != 0);
+ if (item->isDir()) {
+ mainWindow()->dropUrls(urls, item->url());
+ }
+ }
+}
+