From 96ce546508a920e10f2747ad3907da6eb87f4700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Mon, 28 Sep 2026 09:31:18 -0400 Subject: [PATCH] Find the Camera Raw clip buttons and swatches by their Qt base, as newer Qt requires --- TASKS.md | 1 + src/UI/CameraRawColorControls+Mixer.cpp | 3 ++- src/UI/CameraRawControls.cpp | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/TASKS.md b/TASKS.md index 4e4ea1d..6c573de 100644 --- a/TASKS.md +++ b/TASKS.md @@ -366,6 +366,7 @@ The panel of 4.6 shows and edits what the session holds so far. Each item adds i - 12.8r work: version 1.2.3 in CMakeLists.txt, the PKGBUILD and the flake; `versionupdate.md` says what changed since 1.0.1 and is the release's notes. Reviews now run on codex (`codex-reviewer`, GPT-6-Astra at max; the user's order, 2026-09-28: Fable 5.1 is gone). - 12.8r round 1: FAIL, the change log's words: format 9 is what every save writes, the blend modes are eleven new ones (three of Photoshop's still missing), the shortcuts window covers the defined shortcuts, the crash fixed is the export's hash allocations, and the Inner Shadow preview fix predates 1.0.1. All fixed, with its coverage notes. - 12.8r round 2: PASS, no findings. +- 12.8r release run: failed on every package: Qt 6.9 and later refuse `findChild` on a class without `Q_OBJECT`, and 12.8b's `ClipButton` and mixer `Swatch` were found that way (Qt 6.4 in the dev image allows it). Both are now found by their Qt base and name; `scripts/distro-check.sh arch` (Qt 6.11) built and passed 248 of 248. The tag moved to the fix, since nothing was published; the arch check now runs before every release tag. - [x] 12.8d A `std::bad_alloc` aborted `ProjectExportFailureTests` under a parallel run (seen in 12.7b and 12.8a; alone it passed ten of ten): the panel tests held a memory limit while dialogs painted, and the panel limits sat at the edge of what the panel and its snapshot need. - 12.8d round 1: PASS. Its notes taken: the snapshot's measured peak named in AGENTS.md, `malloc_trim` in `limited` named equivalent. - [ ] 12.9 Version 1.2.4: the finishing filters, stepped keyboard zoom, a steady tool rail and tab strip, the project format's version in one place. diff --git a/src/UI/CameraRawColorControls+Mixer.cpp b/src/UI/CameraRawColorControls+Mixer.cpp index 7cc6216..45256ed 100644 --- a/src/UI/CameraRawColorControls+Mixer.cpp +++ b/src/UI/CameraRawColorControls+Mixer.cpp @@ -293,7 +293,8 @@ void CameraRawMixerControls::synchronize() } } for (size_t index = 0; index < points.size(); ++index) { - auto *pick = m_picked->findChild(QStringLiteral("pickedColor%1").arg(index)); + // Newer Qt finds only Q_OBJECT classes: found by base. + auto *pick = static_cast(m_picked->findChild(QStringLiteral("pickedColor%1").arg(index))); pick->colour = hsb(points[index].hue, points[index].saturation, points[index].luminance); pick->chosen = int(index) == shown.pointIndex; pick->update(); diff --git a/src/UI/CameraRawControls.cpp b/src/UI/CameraRawControls.cpp index 61bbf59..4f7affd 100644 --- a/src/UI/CameraRawControls.cpp +++ b/src/UI/CameraRawControls.cpp @@ -380,8 +380,9 @@ void CameraRawControls::synchronize() "Right-click to show the vectorscope.") : QStringLiteral("Hue around the wheel, saturation outward from the center. Right-click to show the histogram.")); m_scope->setAccessibleName(histogram ? QStringLiteral("RGB histogram") : QStringLiteral("Vectorscope")); - for (auto *clip : m_scope->findChildren()) { - const bool shadows = clip->objectName() == QLatin1String("shadowClipping"); + // Found as QToolButtons: newer Qt finds only Q_OBJECT classes. + for (const bool shadows : {true, false}) { + auto *clip = static_cast(m_scope->findChild(shadows ? QStringLiteral("shadowClipping") : QStringLiteral("highlightClipping"))); clip->on = edit && (shadows ? edit->rawPanel.showsShadowClipping : edit->rawPanel.showsHighlightClipping); clip->update(); }