From e314fd05e748af3f4dcd194f1426b3ffb3bd18f5 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 10 Jan 2024 00:16:15 +0800 Subject: [PATCH] Acquire upload/download progress in domain sync status Signed-off-by: Claudio Cambra --- src/gui/macOS/fileproviderdomainsyncstatus_mac.mm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/macOS/fileproviderdomainsyncstatus_mac.mm b/src/gui/macOS/fileproviderdomainsyncstatus_mac.mm index a89ccbc50..065bc79e7 100644 --- a/src/gui/macOS/fileproviderdomainsyncstatus_mac.mm +++ b/src/gui/macOS/fileproviderdomainsyncstatus_mac.mm @@ -36,7 +36,11 @@ public: if (_manager == nil) { qCWarning(lcMacFileProviderDomainSyncStatus) << "Could not get manager for domain" << domainIdentifier; + return; } + + _downloadProgress = [_manager globalProgressForKind:NSProgressFileOperationKindDownloading]; + _uploadProgress = [_manager globalProgressForKind:NSProgressFileOperationKindUploading]; } ~MacImplementation() = default; @@ -44,6 +48,9 @@ public: private: NSFileProviderDomain *_domain; NSFileProviderManager *_manager; + NSProgress *_downloadProgress; + NSProgress *_uploadProgress; + QTimer _timer; FileProviderDomainSyncStatus *q; };