fix: cut logic
This commit is contained in:
parent
2a4727c522
commit
451b27ccaa
1 changed files with 13 additions and 1 deletions
|
@ -983,7 +983,19 @@ void FolderModel::paste()
|
|||
}
|
||||
|
||||
if (enable) {
|
||||
KIO::paste(mimeData, m_dirModel->dirLister()->url());
|
||||
// Copy a new MimeData.
|
||||
QMimeData *data = new QMimeData;
|
||||
for (QString mimetype : mimeData->formats()) {
|
||||
data->setData(mimetype, mimeData->data(mimetype));
|
||||
}
|
||||
|
||||
KIO::Job *job = KIO::paste(data, m_dirModel->dirLister()->url());
|
||||
job->start();
|
||||
|
||||
// Clear system clipboard.
|
||||
if (mimeData->hasFormat("application/x-kde-cutselection")) {
|
||||
QApplication::clipboard()->clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue