chore: use cutefish cutselection
This commit is contained in:
parent
451b27ccaa
commit
46bd8a1215
1 changed files with 6 additions and 3 deletions
|
@ -987,13 +987,13 @@ void FolderModel::paste()
|
||||||
QMimeData *data = new QMimeData;
|
QMimeData *data = new QMimeData;
|
||||||
for (QString mimetype : mimeData->formats()) {
|
for (QString mimetype : mimeData->formats()) {
|
||||||
data->setData(mimetype, mimeData->data(mimetype));
|
data->setData(mimetype, mimeData->data(mimetype));
|
||||||
}
|
}
|
||||||
|
|
||||||
KIO::Job *job = KIO::paste(data, m_dirModel->dirLister()->url());
|
KIO::Job *job = KIO::paste(data, m_dirModel->dirLister()->url());
|
||||||
job->start();
|
job->start();
|
||||||
|
|
||||||
// Clear system clipboard.
|
// Clear system clipboard.
|
||||||
if (mimeData->hasFormat("application/x-kde-cutselection")) {
|
if (mimeData->hasFormat("application/x-cutefish-cutselection")) {
|
||||||
QApplication::clipboard()->clear();
|
QApplication::clipboard()->clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1009,7 +1009,10 @@ void FolderModel::cut()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QMimeData *mimeData = QSortFilterProxyModel::mimeData(m_selectionModel->selectedIndexes());
|
QMimeData *mimeData = QSortFilterProxyModel::mimeData(m_selectionModel->selectedIndexes());
|
||||||
KIO::setClipboardDataCut(mimeData, true);
|
|
||||||
|
mimeData->setData("application/x-kde-cutselection", QByteArray("1"));
|
||||||
|
mimeData->setData("application/x-cutefish-cutselection", QByteArray("1"));
|
||||||
|
|
||||||
QApplication::clipboard()->setMimeData(mimeData);
|
QApplication::clipboard()->setMimeData(mimeData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue