┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMéven Car <[email protected]>2025-06-29 11:20:44 +0200
committerMéven Car <[email protected]>2025-07-02 08:36:35 +0000
commit6dd5525131e13d42f515eba982a6e7cd1153effe (patch)
treec9d1e3813e399248d918e997c1547286c0dba506 /src
parent83949a88f289e61df180556a024fe0fd7c4dd594 (diff)
DolphinView: display errorMessage when copy errors occurs
when copying multiple files. CopyJob skip those by default (CopyJobPrivate::slotSubError), and emits warning. Hook this to errorMessage. We would need to improve this as only the last error Message will be visible. BUG: 506282
Diffstat (limited to 'src')
-rw-r--r--src/views/dolphinview.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index 9bbdc3b10..e8577e066 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -846,6 +846,9 @@ void DolphinView::copySelectedItems(const KFileItemList &selection, const QUrl &
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, [](KJob *job, const QString &warning) {
+ Q_EMIT errorMessage(job->errorString(), job->error());
+ });
KIO::FileUndoManager::self()->recordCopyJob(job);
}
@@ -865,6 +868,9 @@ void DolphinView::moveSelectedItems(const KFileItemList &selection, const QUrl &
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, [](KJob *job, const QString &warning) {
+ Q_EMIT errorMessage(job->errorString(), job->error());
+ });
KIO::FileUndoManager::self()->recordCopyJob(job);
}