[PATCH] CopyJob: fix crash with skip/retry
authorAhmad Samir <a.samirh78@gmail.com>
Tue, 2 Feb 2021 09:31:40 +0000 (11:31 +0200)
committerNorbert Preining <norbert@preining.info>
Thu, 15 Jul 2021 01:20:01 +0000 (02:20 +0100)
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

Gbp-Pq: Name upstream-a183dd0d1ee0-copyjob-fix-crash-skip-retry.patch

src/core/copyjob.cpp

index 7e71e4b97fd418b3b44edf9e83f19a38624f933b..b59fa4da40840b5003ee249e60a98dce5aa2de8d 100644 (file)
@@ -1581,8 +1581,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{});
             });