aboutsummaryrefslogtreecommitdiffstats
path: root/community/kio/0001-fix-crash-retry.patch
blob: a4b87821e203aedacb68a81749fabbc7494a8173 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From a183dd0d1ee0659e5341c7cb4117df27edd6f125 Mon Sep 17 00:00:00 2001
From: Ahmad Samir <a.samirh78@gmail.com>
Date: Tue, 2 Feb 2021 11:31:40 +0200
Subject: [PATCH] CopyJob: fix crash with skip/retry

The crash was happening because I was disconnecting the wrong signal in
the lambda connected to KIO::AskUserActionInterface::askUserSkipResult...

BUG: 431731
FIXED-IN: 5.79
---
 src/core/copyjob.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/core/copyjob.cpp b/src/core/copyjob.cpp
index cee40a62..cb16010f 100644
--- a/src/core/copyjob.cpp
+++ b/src/core/copyjob.cpp
@@ -1578,8 +1578,8 @@ void CopyJobPrivate::slotResultErrorCopyingFiles(KJob *job)
             QObject::connect(askUserActionInterface, &KIO::AskUserActionInterface::askUserSkipResult,
                              q, [=](SkipDialog_Result result, KJob *parentJob) {
                 Q_ASSERT(parentJob == q);
-                // Only receive askUserRenameResult once per rename dialog
-                QObject::disconnect(askUserActionInterface, &KIO::AskUserActionInterface::askUserRenameResult,
+                // Only receive askUserSkipResult once per skip dialog
+                QObject::disconnect(askUserActionInterface, &KIO::AskUserActionInterface::askUserSkipResult,
                                     q, nullptr);
                 processFileRenameDialogResult(it, result, QUrl() /* no new url in skip */, QDateTime{});
             });
-- 
GitLab