diff --git a/src/gui/macOS/fileproviderdomainsyncstatus_mac.mm b/src/gui/macOS/fileproviderdomainsyncstatus_mac.mm index 6cc7efd42ae4..03de3e97636f 100644 --- a/src/gui/macOS/fileproviderdomainsyncstatus_mac.mm +++ b/src/gui/macOS/fileproviderdomainsyncstatus_mac.mm @@ -42,17 +42,19 @@ explicit MacImplementation(const QString &domainIdentifier, FileProviderDomainSy return; } - NSProgress *const downloadProgress = [_manager globalProgressForKind:NSProgressFileOperationKindDownloading]; - NSProgress *const uploadProgress = [_manager globalProgressForKind:NSProgressFileOperationKindUploading]; - _downloadProgressObserver = [[ProgressObserver alloc] initWithProgress:downloadProgress]; - _uploadProgressObserver = [[ProgressObserver alloc] initWithProgress:uploadProgress]; - - _downloadProgressObserver.progressKVOChangeHandler = ^(NSProgress *const progress){ - updateDownload(progress); - }; - _uploadProgressObserver.progressKVOChangeHandler = ^(NSProgress *const progress){ - updateUpload(progress); - }; + if (@available(macOS 11.3, *)) { + NSProgress *const downloadProgress = [_manager globalProgressForKind:NSProgressFileOperationKindDownloading]; + NSProgress *const uploadProgress = [_manager globalProgressForKind:NSProgressFileOperationKindUploading]; + _downloadProgressObserver = [[ProgressObserver alloc] initWithProgress:downloadProgress]; + _uploadProgressObserver = [[ProgressObserver alloc] initWithProgress:uploadProgress]; + + _downloadProgressObserver.progressKVOChangeHandler = ^(NSProgress *const progress){ + updateDownload(progress); + }; + _uploadProgressObserver.progressKVOChangeHandler = ^(NSProgress *const progress){ + updateUpload(progress); + }; + } } ~MacImplementation() = default;