fix(qt): MainThreadMarker::new() needs objc2-foundation's NSThread feature

Second one the Mac build caught and Linux could not: the type resolved, but
`new()` did not exist — it is gated on `NSThread`
(objc2-foundation-0.2.2/src/thread.rs:210-213), leaving only the unsafe
`new_unchecked`. That is precisely the wrong half: the point of the call is
to ASK whether we are on the AppKit main thread and no-op when we are not.

cc
This commit is contained in:
vicrodh committed 2026-08-04 16:39:00 -06:00
1 parent 1b18adcde0
commit 024ed615e8
1 file changed
+6
+6
View File
@@ -178,6 +178,12 @@ cxx-qt-build = "0.7"
# dependency because nothing here names a type from it.
objc2-foundation = { version = "0.2", default-features = false, features = [
"std",
# NSThread gates `MainThreadMarker::new()` itself
# (objc2-foundation-0.2.2/src/thread.rs:210-213) — without it the type
# exists but only the UNSAFE `new_unchecked` does, which is not what this
# wants: the whole point is to ASK whether we are on the AppKit main
# thread and no-op if not. Caught by the Mac build; invisible on Linux.
"NSThread",
] }
objc2-app-kit = { version = "0.2", default-features = false, features = [
"std",