Skip to content

build: master's macOS build is red in shared/qt/platform/qt-host-macos.cpp.hpp's modifier return (#2625, #2872) #2946

Closed

Description

@zackees

Location

shared/qt/platform/qt-host-macos.cpp.hpp:43 — qt_platform::translate_modifiers():

uint32_t translate_modifiers(Qt::KeyboardModifiers mods)
{
	int obsModifiers = INTERACT_NONE;
	...
	return obsModifiers;
}

Class

Build break (conversion diagnostic), no behaviour change: obsModifiers is int and the function returns uint32_t; every INTERACT_* flag is a non-negative constant, so the returned value is unchanged.

How it is reached

Every macOS app build with the conversion ratchet on (#2625/#2872). Found on master f67176296 in the scheduled.yaml run 40915924585, job Build 🧱 / macOS 🍏 (x86_64) (123597371164):

shared/qt/platform/qt-host-macos.cpp.hpp:43:9: error: implicit conversion changes signedness:
      'int' to 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-conversion]
   43 |         return obsModifiers;
      |                ^~~~~~~~~~~~

Build 🧱 / macOS 🍏 (arm64) and Analyze 🔬 / macOS 🍏 (clang-analyze) in the same run compile the same file and are the next lanes to look at once this one is stated. The obs-outputs conversions this run also reported (mp4-mux.c.h, rtmp-hevc.c.h) are already fixed on master by #2922 and #2925.

Proposed fix and failing test

The same statement the POSIX sibling already carries (commit 5298ad7ec, #2900):

	return static_cast<uint32_t>(obsModifiers);

shared/qt/platform/qt-host-posix.cpp.hpp:47 was stated that way and the local stays int, so the macOS file matches its sibling and nothing else changes. The windows sibling has the same unstated return, but MSVC's /W4 does not enable -Wsign-conversion, so it is not reported by any lane and is left alone here.

RED: the job above. GREEN: a scheduled.yaml workflow_dispatch on the fixing branch with the three macOS jobs past qt-host-macos.cpp.hpp (a PR run does not select the macOS app build).

Tiers that do not apply: no Rust unit, C test, protocol or runtime behaviour change; no C test or public header is touched.

Activity

  1. added
    bug
    ready
    P1
    on Oct 29, 2026
  2. zackees commented on Oct 29, 2026

    @zackees
    MemberAuthor

    Claiming: the macOS Qt host's modifier return

    Plan:

    1. One PR: static_cast<uint32_t>(obsModifiers) in shared/qt/platform/qt-host-macos.cpp.hpp, the statement qt-host-posix.cpp.hpp:47 already carries — no local-type change, no flag, pin or target change.
    2. Evidence: a scheduled.yaml workflow_dispatch on the fixing branch, because a PR run does not select the macOS app build; the green condition is the three macOS jobs getting past this file.

    First PR within the hour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1bugready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions