Show a patch.

GET /api/1.1/patches/23916/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 23916,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/23916/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23916/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20250723223914.23733-1-laurent.pinchart@ideasonboard.com>",
    "date": "2025-07-23T22:39:14",
    "name": "qcam: Silence false positive warnings with Qt 6.9.0 and newer",
    "commit_ref": "2e8de41413d3fa6da0bd5f4dc51ebad0eff14f3b",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "28ec8fbc34e3e735197468a9080fee0d77a88cde",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23916/mbox/",
    "series": [
        {
            "id": 5318,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5318/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5318",
            "date": "2025-07-23T22:39:14",
            "name": "qcam: Silence false positive warnings with Qt 6.9.0 and newer",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5318/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23916/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23916/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 657CFBDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 23 Jul 2025 22:39:20 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 079D069076;\n\tThu, 24 Jul 2025 00:39:20 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D4BB469068\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jul 2025 00:39:17 +0200 (CEST)",
            "from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 23F79B0B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jul 2025 00:38:39 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"T4qvrHxK\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1753310319;\n\tbh=7+38HEgMp3dG2pU0DcJ3oeCCt8lT2HshM9QSqjZEPBg=;\n\th=From:To:Subject:Date:From;\n\tb=T4qvrHxKgp3YZchxEVodMqFKxHfl+yRZv0iiIGNSWwSJo8sEbVVZOBwJpTJWP81X1\n\tZs2XytpAsB9oQ/mvqFFwmctMPDpJXHNHNR+8moDkd8FmctQhgtLTzJoOgT7AW53fp1\n\tsw9xSCxTGjQdU5TfkQ9l8pqgl52su3S1dhGPNcYY=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[PATCH] qcam: Silence false positive warnings with Qt 6.9.0 and\n\tnewer",
        "Date": "Thu, 24 Jul 2025 01:39:14 +0300",
        "Message-ID": "<20250723223914.23733-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.49.1",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "In Qt 6.9.0 the qtmochelpers.h header introduced a construct that gcc 12\nand gcc 13 incorrectly flag as variable shadowing:\n\nIn file included from src/apps/qcam/qcam.p/moc_viewfinder_gl.cpp:12:\n/usr/include/qt6/QtCore/qtmochelpers.h: In instantiation of ‘constexpr void QtMocHelpers::detail::UintDataStorage<std::integer_sequence<int, Idx ...>, T ...>::forEach(F&&) const [with F = QtMocHelpers::UintData<QtMocHelpers::SignalData<void(libcamera::FrameBuffer*)> >::copyTo<{anonymous}::qt_meta_tag_ZN12ViewFinderGLE_t, QtMocHelpers::MetaObjectContents<24, 10, 60, 3> >(QtMocHelpers::MetaObjectContents<24, 10, 60, 3>&, size_t, uint&) const::<lambda(const auto:39&)>; int ...Idx = {0}; T = {QtMocHelpers::SignalData<void(libcamera::FrameBuffer*)>}]’:\n/usr/include/qt6/QtCore/qtmochelpers.h:255:21:   required from ‘constexpr const QtMocHelpers::MetaObjectContents<24, 10, 60, 3> ViewFinderGL::qt_staticMetaObjectContent<{anonymous}::qt_meta_tag_ZN12ViewFinderGLE_t>’\nsrc/apps/qcam/qcam.p/../../../../../../src/apps/qcam/viewfinder_gl.h:32:2:   required from ‘constexpr const auto ViewFinderGL::qt_staticMetaObjectStaticContent<{anonymous}::qt_meta_tag_ZN12ViewFinderGLE_t>’\nsrc/apps/qcam/qcam.p/moc_viewfinder_gl.cpp:63:5:   required from here\nsrc/apps/qcam/qcam.p/../../../../../../src/apps/qcam/viewfinder_gl.h:32:2:   in ‘constexpr’ expansion of ‘ViewFinderGL::qt_create_metaobjectdata<{anonymous}::qt_meta_tag_ZN12ViewFinderGLE_t>()’\nsrc/apps/qcam/qcam.p/moc_viewfinder_gl.cpp:58:87:   in ‘constexpr’ expansion of ‘QtMocHelpers::metaObjectData<ViewFinderGL, {anonymous}::qt_meta_tag_ZN12ViewFinderGLE_t, StringRefStorage<char [13], char [15], char [1], char [24], char [7]>, UintData<SignalData<void(libcamera::FrameBuffer*)> >, UintData<>, UintData<> >(0, qt_stringData, qt_methods, qt_properties, qt_enums, QtMocHelpers::UintData<>(), const QtMocHelpers::detail::UintDataBlock<0, 0>{uint [1](), uint [1]()})’\n/usr/include/qt6/QtCore/qtmochelpers.h:563:36:   in ‘constexpr’ expansion of ‘(& methods)->QtMocHelpers::UintData<QtMocHelpers::SignalData<void(libcamera::FrameBuffer*)> >::copyTo<{anonymous}::qt_meta_tag_ZN12ViewFinderGLE_t, QtMocHelpers::MetaObjectContents<24, 10, 60, 3> >(result, ((size_t)dataoffset), metatypeoffset)’\n/usr/include/qt6/QtCore/qtmochelpers.h:201:57: error: declaration of ‘entry’ shadows a member of ‘QtMocHelpers::detail::UintDataStorage<std::integer_sequence<int, 0>, QtMocHelpers::SignalData<void(libcamera::FrameBuffer*)> >’ [-Werror=shadow]\n  201 |         [[maybe_unused]] auto invoke = [&f](const auto &entry) { f(entry.entry); return 0; };\n      |                                             ~~~~~~~~~~~~^~~~~\n/usr/include/qt6/QtCore/qtmochelpers.h:180:7: note: shadowed declaration is here\n  180 |     T entry;\n      |       ^~~~~\n\nThere is little we can do but silence the warning. Do so selectively\nbased on the Qt and gcc versions, to still detect variable shadowing\nwith compilers unaffected by the issue.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/apps/qcam/meson.build | 7 +++++++\n 1 file changed, 7 insertions(+)\n\n\nbase-commit: b65df7e7554b45e2d3d7fdb5b37c2ab7df3db4fe",
    "diff": "diff --git a/src/apps/qcam/meson.build b/src/apps/qcam/meson.build\nindex f7c140643373..9ca047b0f927 100644\n--- a/src/apps/qcam/meson.build\n+++ b/src/apps/qcam/meson.build\n@@ -42,6 +42,13 @@ qt6_cpp_args = [\n     '-Wno-extra-semi',\n ]\n \n+# gcc 12 and 13 output a false positive variable shadowing warning with Qt\n+# 6.9.0 and newer. Silence it.\n+if qt6_dep.version().version_compare('>=6.9.0') and \\\n+   cxx.version().version_compare('>=12') and cxx.version().version_compare('<14')\n+    qt6_cpp_args += ['-Wno-shadow']\n+endif\n+\n resources = qt6.preprocess(moc_headers : qcam_moc_headers,\n                            qresources : qcam_resources,\n                            dependencies : qt6_dep)\n",
    "prefixes": []
}