Skip to content

frontend: dropped files through the platform facade (#873) - #2019

Merged
zackees merged 2 commits into
masterfrom
infra/873-dropfiles
Oct 24, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/873-dropfiles

Conversation

@zackees

@zackees zackees commented Oct 24, 2026

Copy link
Copy Markdown
Member

Refs #873 (OBSBasic_Dropfiles)

Moves the 5 _WIN32 branches in frontend/widgets/OBSBasic_Dropfiles.cpp.hpp behind frontend/utility/platform.hpp. Each host implements the new calls in platform-{windows,osx,x11}:

Facade Windows macOS / Linux
IsPlatformImageExtension(suffix) jxr none
GetPlatformTextSourceId() text_gdiplus text_ft2_source
SetPlatformTextFileSettings(settings, file, name) read_from_file, file, and the file name as the source name from_file, text_file
ResolvePlatformDroppedFile(file, info, urlTarget) offers a .url shortcut's URL; follows .lnk shortcuts no change
  • Behavior: the same on each host. The one ordering change: jxr is now checked right after the image extension list instead of inside it, so it still maps to an image source.
  • PCH: QSettings leaves frontend-widgets.pch.hpp, where it was behind _WIN32. frontend-windows-platform.pch.hpp gains QFileInfo, QSettings and QUrl.
  • Ratchet: the baseline goes down by 6 (Dropfiles 5 → 0, widgets PCH 8 → 7).

RED ci/test_frontend_cmake_facade.py::test_dropped_files_go_through_the_facade fails on master. GREEN it passes, and ./lint is clean.

This changes a PCH, so BUILD.md requires a full Windows and macOS run before merge: dispatched ci.yml run https://github.com/obs-rust/obs-studio/actions/runs/40048228839. I'll mark the PR ready when that run is green.

@zackees

zackees commented Oct 24, 2026

Copy link
Copy Markdown
Member Author

Full run 40048228839: Windows x64/arm64, macOS arm64/x86_64, Ubuntu (OBS-Studio-Rust), Flatpak and the Windows/macOS Rust cross lint all passed. Tier 2 on macOS/Windows is still running there; this PR touches no libobs code.

@zackees
zackees marked this pull request as ready for review October 24, 2026 01:22
@zackees
zackees added this pull request to the merge queue Oct 24, 2026
Merged via the queue into master with commit 446d373 Oct 24, 2026
66 checks passed
@zackees
zackees deleted the infra/873-dropfiles branch October 26, 2026 15:45
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