#include <KIO/Paste>
#include <KIO/PasteJob>
#include <KIO/RenameFileDialog>
+#include <KJob>
#include <KJobWidgets>
#include <KLocalizedString>
#include <KMessageBox>
using Iface = KIO::AskUserActionInterface;
auto *trashJob = new KIO::DeleteOrTrashJob(list, Iface::Delete, Iface::DefaultConfirmation, this);
- connect(trashJob, &KJob::result, this, &DolphinView::slotTrashFileFinished);
+ connect(trashJob, &KJob::result, this, &DolphinView::slotDeleteFileFinished);
m_selectNextItem = true;
trashJob->start();
}
connect(job, &KIO::CopyJob::result, this, &DolphinView::slotJobResult);
connect(job, &KIO::CopyJob::copying, this, &DolphinView::slotItemCreatedFromJob);
connect(job, &KIO::CopyJob::copyingDone, this, &DolphinView::slotItemCreatedFromJob);
+ connect(job, &KIO::CopyJob::warning, this, [this](KJob *job, const QString & /* warning */) {
+ Q_EMIT errorMessage(job->errorString(), job->error());
+ });
KIO::FileUndoManager::self()->recordCopyJob(job);
}
connect(job, &KIO::CopyJob::result, this, &DolphinView::slotJobResult);
connect(job, &KIO::CopyJob::moving, this, &DolphinView::slotItemCreatedFromJob);
connect(job, &KIO::CopyJob::copyingDone, this, &DolphinView::slotItemCreatedFromJob);
+ connect(job, &KIO::CopyJob::warning, this, [this](KJob *job, const QString & /*warning */) {
+ Q_EMIT errorMessage(job->errorString(), job->error());
+ });
KIO::FileUndoManager::self()->recordCopyJob(job);
}
connect(job, &KIO::CopyJob::result, this, &DolphinView::slotJobResult);
connect(job, &KIO::CopyJob::copyingDone, this, &DolphinView::slotItemCreatedFromJob);
connect(job, &KIO::CopyJob::copyingLinkDone, this, &DolphinView::slotItemLinkCreatedFromJob);
+ connect(job, &KIO::CopyJob::warning, this, [this](KJob *job, const QString & /*warning*/) {
+ Q_EMIT errorMessage(job->errorString(), job->error());
+ });
KIO::FileUndoManager::self()->recordCopyJob(job);
}
}
connect(job, &KIO::DropJob::copyJobStarted, this, [this](const KIO::CopyJob *copyJob) {
connect(copyJob, &KIO::CopyJob::copying, this, &DolphinView::slotItemCreatedFromJob);
connect(copyJob, &KIO::CopyJob::moving, this, &DolphinView::slotItemCreatedFromJob);
+ connect(copyJob, &KIO::CopyJob::warning, this, [this](KJob *job, const QString & /*warning*/) {
+ Q_EMIT errorMessage(job->errorString(), job->error());
+ });
connect(copyJob, &KIO::CopyJob::linking, this, [this](KIO::Job *job, const QString &src, const QUrl &dest) {
Q_UNUSED(job)
Q_UNUSED(src)
connect(job, &KIO::PasteJob::copyJobStarted, this, [this](const KIO::CopyJob *copyJob) {
connect(copyJob, &KIO::CopyJob::copying, this, &DolphinView::slotItemCreatedFromJob);
connect(copyJob, &KIO::CopyJob::moving, this, &DolphinView::slotItemCreatedFromJob);
+ connect(copyJob, &KIO::CopyJob::warning, this, [this](KJob *job, const QString & /*warning*/) {
+ Q_EMIT errorMessage(job->errorString(), job->error());
+ });
connect(copyJob, &KIO::CopyJob::linking, this, [this](KIO::Job *job, const QString &src, const QUrl &dest) {
Q_UNUSED(job)
Q_UNUSED(src)