void DolphinView::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* event)
{
+ KUrl destUrl;
KFileItem destItem = fileItemModel()->fileItem(index);
if (destItem.isNull()) {
destItem = fileItemModel()->rootItem();
- if (destItem.isNull()) {
- kWarning() << "No destination item available for drop operation.";
- return;
- }
+ destUrl = url();
+ } else {
+ destUrl = destItem.url();
}
QDropEvent dropEvent(event->pos().toPoint(),
event->buttons(),
event->modifiers());
- const QString error = DragAndDropHelper::dropUrls(destItem, &dropEvent);
+ const QString error = DragAndDropHelper::dropUrls(destItem, destUrl, &dropEvent);
if (!error.isEmpty()) {
emit errorMessage(error);
}
emit selectionChanged(selectedItems());
}
-void DolphinView::dropUrls(const KFileItem& destItem,
- const KUrl& destPath,
- QDropEvent* event)
-{
- Q_UNUSED(destItem);
- Q_UNUSED(destPath);
- markPastedUrlsAsSelected(event->mimeData());
- //DragAndDropHelper::instance().dropUrls(destItem, destPath, event, this);
-}
-
void DolphinView::updateSorting(DolphinView::Sorting sorting)
{
ViewProperties props(url());