KonqOperations: KIO::pasteMimeData -> KIO::paste, update signal and simplify dolphin accordingly.

This commit is contained in:
David Faure 2014-11-02 17:17:24 +01:00
parent 3e14a97a0f
commit 30175dcbde
2 changed files with 1 additions and 15 deletions

View file

@ -1050,9 +1050,7 @@ void DolphinView::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* even
// Mark the dropped urls as selected. // Mark the dropped urls as selected.
m_clearSelectionBeforeSelectingNewItems = true; m_clearSelectionBeforeSelectingNewItems = true;
m_markFirstNewlySelectedItemAsCurrent = true; m_markFirstNewlySelectedItemAsCurrent = true;
connect(job, static_cast<void(KonqOperations::*)(const QList<QUrl>&)>(&KonqOperations::aboutToCreate), this, &DolphinView::slotAboutToCreate); connect(job, &KonqOperations::itemCreated, this, &DolphinView::slotItemCreated);
// TODO
//connect(job, &KIO::InteractiveDropJob::itemCreated, this, &DolphinView::slotItemCreated);
//connect(job, &KIO::InteractiveDropJob::result, this, &DolphinView::slotPasteJobResult); //connect(job, &KIO::InteractiveDropJob::result, this, &DolphinView::slotPasteJobResult);
} }
@ -1089,17 +1087,6 @@ void DolphinView::slotMouseButtonPressed(int itemIndex, Qt::MouseButtons buttons
} }
} }
void DolphinView::slotAboutToCreate(const QList<QUrl>& urls)
{
if (!urls.isEmpty()) {
if (m_markFirstNewlySelectedItemAsCurrent) {
markUrlAsCurrent(urls.first());
m_markFirstNewlySelectedItemAsCurrent = false;
}
m_selectedUrls << KDirModel::simplifiedUrlList(urls);
}
}
void DolphinView::slotItemCreated(const QUrl& url) void DolphinView::slotItemCreated(const QUrl& url)
{ {
if (m_markFirstNewlySelectedItemAsCurrent) { if (m_markFirstNewlySelectedItemAsCurrent) {

View file

@ -577,7 +577,6 @@ private slots:
* Is called after all pasted or dropped items have been copied to destination. * Is called after all pasted or dropped items have been copied to destination.
*/ */
void slotPasteJobResult(KJob *job); void slotPasteJobResult(KJob *job);
void slotAboutToCreate(const QList<QUrl> &urls);
/** /**
* Emits the signal \a selectionChanged() with a small delay. This is * Emits the signal \a selectionChanged() with a small delay. This is