[PATCH] DeleteOrTrashJob: Add started signal
authorKai Uwe Broulik <kde@privat.broulik.de>
Thu, 1 May 2025 17:01:23 +0000 (19:01 +0200)
committerAurélien COUDERC <coucouf@debian.org>
Sun, 8 Jun 2025 12:42:29 +0000 (14:42 +0200)
It's emitted when the user has confirmed emptying trash and
it will actually commence emptying it.

Gbp-Pq: Name upstream_17cd1c9b_DeleteOrTrashJob-Add-started-signal.patch

src/widgets/deleteortrashjob.cpp
src/widgets/deleteortrashjob.h

index 1f182c99c99d466c7ecff7215b5a072065b4399d..1af01a2367ad796d776336bab0df9320e549ad30 100644 (file)
@@ -87,6 +87,8 @@ void DeleteOrTrashJobPrivate::slotAskUser(bool allowDelete, const QList<QUrl> &u
         // show the "File is too large to Trash" error message
         job->uiDelegate()->setAutoErrorHandlingEnabled(false);
         q->addSubjob(job);
+
+        Q_EMIT q->started();
     }
 }
 
index 298e6f5bdb00ebaa4e6422a01b210d2d3d472833..ef6328530b223131335620c9f2fc083bb62458f5 100644 (file)
@@ -68,6 +68,17 @@ public:
      */
     void start() override;
 
+Q_SIGNALS:
+    /**
+     * Emitted when the actual delete or trash job has been started.
+     *
+     * This can be used to display a busy indicator after the user has confirmed
+     * this operation.
+     *
+     * @since 6.15
+     */
+    void started();
+
 private:
     void slotResult(KJob *job) override;