From 714830f8dda873fbefa6de9704c90220e16a6133 Mon Sep 17 00:00:00 2001 From: Sebastian Englbrecht Date: Sat, 23 May 2026 17:40:25 +0200 Subject: dolphinview,mountpointobserver: kill in-flight KIO jobs in destructor Both objects start KIO jobs that can outlive the object if it is destroyed before the job finishes. Store the pending job and call kill(Quietly) in the destructor to avoid leaks and dangling callbacks. --- src/statusbar/mountpointobserver.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/statusbar/mountpointobserver.h') diff --git a/src/statusbar/mountpointobserver.h b/src/statusbar/mountpointobserver.h index 7c146c7a0..b2ca863e0 100644 --- a/src/statusbar/mountpointobserver.h +++ b/src/statusbar/mountpointobserver.h @@ -7,9 +7,10 @@ #ifndef MOUNTPOINTOBSERVER_H #define MOUNTPOINTOBSERVER_H -#include +#include #include +#include #include /** @@ -41,7 +42,7 @@ class MountPointObserver : public QObject Q_OBJECT explicit MountPointObserver(const QUrl &url, QObject *parent = nullptr); - ~MountPointObserver() override = default; + ~MountPointObserver() override; public: /** @@ -90,6 +91,7 @@ private Q_SLOTS: private: const QUrl m_url; int m_referenceCount; + QPointer m_pendingJob; friend class MountPointObserverCache; }; -- cgit v1.3.1