Skip to content

Feature/macos vfs - #3

Draft
restot wants to merge 61 commits into
mainfrom
feature/macos-vfs
Draft

Feature/macos vfs#3
restot wants to merge 61 commits into
mainfrom
feature/macos-vfs

Conversation

@restot

@restot restot commented Dec 28, 2025

Copy link
Copy Markdown
Owner

@restot restot self-assigned this Dec 28, 2025
@restot
restot marked this pull request as draft December 28, 2025 03:36
restot and others added 30 commits February 17, 2026 00:16
- Add -fobjc-arc compiler flag for 3 FileProvider files in CMakeLists.txt
- Convert manual retain/release to ARC bridging casts in fileproviderxpc_mac.mm
- Remove manual memory management in fileproviderdomainmanager_mac.mm

Under ARC, void* storage requires __bridge_retained/__bridge_transfer,
and QHash<QString, NSObject*> handles retain/release automatically.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
bd-20k: Add columnString() helper that guards sqlite3_column_text NULL
returns. Replaces 10 unsafe String(cString:) calls in metadataFromRow
that would invoke undefined behavior on any SQL NULL column value.

bd-1zv: Replace BFS+individual-delete loop in deleteDirectoryAndSubdirectories
with a single recursive CTE DELETE wrapped in a transaction. Reduces
O(n) SELECT+DELETE round trips to one query and ensures atomicity.
Replace all 4 DISPATCH_TIME_FOREVER waits with 30-second timeouts:
- fileproviderdomainmanager_mac.mm: findExistingFileProviderDomains
- fileproviderdomainmanager_mac.mm: removeAllDomains inner group
- fileproviderdomainmanager_mac.mm: removeAllDomains outer group
- fileproviderxpc_mac.mm: connectToFileProviderDomains

The XPC wait fires from the main thread via QTimer - guaranteed deadlock
if completion never fires. On timeout, a warning is logged and execution
continues gracefully.
Replace heuristic auth type detection (password length/prefix) with
explicit authType parameter propagated through the XPC call chain.

- ClientCommunicationProtocol.h: add new 6-param method with authType
  ('bearer' or 'basic'); old 5-param method kept for backward compat
- ClientCommunicationService.swift: implement new authType method;
  legacy method forwards with authType='bearer' (C++ always sends OAuth)
- FileProviderExtension.swift: setupDomainAccount accepts authType param
  (defaults 'bearer'); uses explicit type instead of length/prefix guess;
  persists/restores authType via UserDefaults key fp_credential_authType
# Conflicts:
#	src/gui/macOS/fileproviderdomainmanager_mac.mm
…ties fix

- XPC: use dispatch_group_notify instead of dispatch_group_wait to avoid
  deadlocking the Qt main thread; auto-authenticate after connections
  are established
- Don't unauthenticate/disconnect FileProvider domain on transient
  AccountState::Disconnected (network hiccups cause rapid state cycling)
- Don't clear registered domains on removeAllDomains timeout to prevent
  duplicate domain registrations
- FileProviderItem capabilities: reading is always implicit for items
  returned by PROPFIND; folders always get content enumeration
- Set DEVELOPMENT_TEAM=S6P3V9X548 in Xcode project for all targets
- Add tools/cleanup-fileprovider.sh: all-in-one cleanup/build/sign/deploy
- Bump version to 3.1.12
Bundle dylibs, sign with Developer ID, notarize, create DMG,
and optionally upload to GitHub release — all in one script.
Qt frameworks link to Craft-built libs (brotli, ssl, icu, etc.) via
absolute paths, not @rpath. The bundler now detects both, rewrites
absolute paths to @rpath after each copy pass, and iterates until
the full transitive closure is resolved (typically 3 passes).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MacOS: Files on demand, FileProvider Api

1 participant