Always connect the drop job result with DolphinView::slotPasteJobResult

to receive the error message in case of an error also when the destUrl
is not equal to the current url in the view.

CCMAIL: faure@kde.org
This commit is contained in:
Emmanuel Pescosta 2015-01-05 12:50:53 +01:00
parent 7bd5bec219
commit 39b77e9861

View file

@ -1048,12 +1048,15 @@ void DolphinView::dropUrls(const QUrl &destUrl, QDropEvent *dropEvent)
{
KIO::DropJob* job = DragAndDropHelper::dropUrls(destUrl, dropEvent, this);
if (job && destUrl == url()) {
// Mark the dropped urls as selected.
m_clearSelectionBeforeSelectingNewItems = true;
m_markFirstNewlySelectedItemAsCurrent = true;
connect(job, &KIO::DropJob::itemCreated, this, &DolphinView::slotItemCreated);
if (job) {
connect(job, &KIO::DropJob::result, this, &DolphinView::slotPasteJobResult);
if (destUrl == url()) {
// Mark the dropped urls as selected.
m_clearSelectionBeforeSelectingNewItems = true;
m_markFirstNewlySelectedItemAsCurrent = true;
connect(job, &KIO::DropJob::itemCreated, this, &DolphinView::slotItemCreated);
}
}
}