Skip to content

build: state the frontend conversion sites the app lanes stop on (#2938) - #2940

Merged
zackees merged 1 commit into
masterfrom
fix/2938-frontend-conversion-sites
Oct 29, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/2938-frontend-conversion-sites

Conversation

@zackees

@zackees zackees commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Refs #2938 (a first slice; the issue stays open until every group compiles).

RED (how it fails)

Master's app lanes fail in the frontend C++ compile after #2909 turned on
-Wconversion;-Wsign-conversion;-Wfloat-conversion for the obs-studio target
with 63 files still unconverted. Reported on #2938 from workflow_dispatch of
scheduled.yaml on fix/2921-mp4-mux-conversions:

frontend/utility/ExtraBrowsersModel.cpp.hpp:20:34: error: conversion from 'qsizetype' {aka 'long long int'} to 'int' may change value [-Werror=conversion]
frontend/utility/ExtraBrowsersModel.cpp.hpp:33:31: error: ... same
frontend/utility/ExtraBrowsersModel.cpp.hpp:108:32: error: ... same
frontend/utility/ExtraBrowsersModel.cpp.hpp:190:37: error: ... same

[obs-studio] Compiling qt-wrappers.host-macos+.hpp.cpp
##[error]implicit conversion changes signedness: 'int' to 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-conversion]
   43 |         return obsModifiers;

The same macOS error reproduces on current master in my own dispatch
(ci/macos-evidence-2921-2928, run 40908013605,
job Build 🧱 / macOS 🍏 (x86_64)), so it is master, not another PR.

GREEN (what this changes)

  • frontend/utility/ExtraBrowsersModel.cpp.hpp: the four items.size() /
    items.count() results are cast to int at the assignment, matching the
    int row indices the model already uses.
  • shared/qt/platform/qt-host-{macos,posix,windows}.cpp.hpp:
    translate_modifiers() returns uint32_t, so its accumulator is now
    uint32_t instead of int. The flag values are unchanged; the ORs are the
    same INTERACT_* bits.

No compiler flag, pin or target change: the conversions are stated at the call
site.

Local: ./lint clean. The Linux Qt lane on this PR is the check that the
ExtraBrowsersModel file compiles under -Wconversion; the macOS/Ubuntu app
lanes only run from scheduled.yaml, so a dispatch on this branch follows once
this lands its first feedback. The remaining unconverted frontend groups are
the rest of #2938.

Scope after #2944

#2944 removes #2909's second conversion block, so the app target is back on the
global pins for -Wconversion/-Wfloat-conversion and the Ubuntu/Flatpak lanes
stop failing on ExtraBrowsersModel. This PR still carries the part that is
needed: the qt-host-*.cpp.hpp translate_modifiers() accumulator is a
-Wsign-conversion finding, the group the app target keeps, and it is what
master's macOS lanes report (they were already red before #2909). Keep the
ExtraBrowsersModel casts — they are the first group of the eventual
-Wconversion ratchet — and drop this PR's claim about the Qt lane being the
proof for that group.

Master's app lanes stop in the frontend C++ compile now that #2909 turned
on -Wconversion/-Wsign-conversion for the obs-studio target:

  ExtraBrowsersModel.cpp.hpp:20,33,108,246  'qsizetype' to 'int' may change value
  qt-host-{macos,posix,windows}.cpp.hpp     'int' to 'uint32_t' in translate_modifiers

`items.size()`/`count()` is `qsizetype`, and `translate_modifiers()` returns
`uint32_t` while its accumulator was `int`; both are stated at the call site,
with no flag change.
@zackees

zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

Worker tick (2026-10-29): the RED this PR answers is measured on master's own app lanes, and the branch is rebased clean (mergeStateStatus: CLEAN), so this slice is ready — marking it ready and queueing.

Evidence recap: Build 🧱 / macOS 🍏 (arm64) on the current Release OBS-Studio-Rust run 40906899118 (job 123564868505 for Linux x86_64, 123568590357 for the macOS gate) stops in the frontend C++ compile on frontend/utility/ExtraBrowsersModel.cpp.hpp:20:34 (qsizetype → int, -Werror=conversion) and on qt-wrappers.host-macos+.hpp.cpp ('int' → uint32_t in shared/qt/platform/qt-host-macos.cpp.hpp).

Sibling PR #2944 restores the global pins for the app target so the lanes go green now; this one states the sites, so the group can be re-enabled file by file. Neither conflicts: different files.

Merged via the queue into master with commit 741ec0c Oct 29, 2026
50 of 74 checks passed
@zackees
zackees deleted the fix/2938-frontend-conversion-sites branch October 29, 2026 18:28
MCPVOT pushed a commit to MCPVOT/obs-studio that referenced this pull request Oct 30, 2026
…s on (obs-rust#2938) (obs-rust#2971)

`ExtraBrowsersModel::CheckToRemove()` builds its loop index from
`deleted.size()`, which is a `qsizetype`, so the release lane's frontend
compile stops on it:

```
frontend/utility/ExtraBrowsersModel.cpp.hpp:190:37: error: conversion from
'qsizetype' {aka 'long long int'} to 'int' may change value
[-Werror=conversion]
```

RED evidence: `Release OBS-Studio-Rust` run 40906899118 on master `3bff1d7c`,
job `Build linux x86_64` (and the same site again in
`Release gate / Flatpak`), 2026-10-29 16:13 UTC. obs-rust#2940 stated the three other
sites in this file (lines 20, 33, 108) and this one was left, so the file still
cannot compile with the frontend target's conversion group.

GREEN: the cast matches the same file's idiom (`(int)items.size()` at 20, 33,
108, 246). No behavior change: the list is a row index that starts at the
model's own item count. `./lint` is clean.

Refs obs-rust#2938, Refs obs-rust#2625.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant