Show a patch.

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

{
    "id": 18582,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/18582/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/18582/",
    "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": "<20230502175551.70018-1-pobrn@protonmail.com>",
    "date": "2023-05-02T17:55:53",
    "name": "[libcamera-devel,v1] qcam: Remove redundant check",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "ccbbc1e2baa9060c0fa74e9334da0a72cfa985b6",
    "submitter": {
        "id": 133,
        "url": "https://patchwork.libcamera.org/api/1.1/people/133/?format=api",
        "name": "Pőcze Barnabás",
        "email": "pobrn@protonmail.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/18582/mbox/",
    "series": [
        {
            "id": 3860,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3860/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3860",
            "date": "2023-05-02T17:55:53",
            "name": "[libcamera-devel,v1] qcam: Remove redundant check",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3860/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/18582/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/18582/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 446F1BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 May 2023 17:56:11 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 89AB3627DC;\n\tTue,  2 May 2023 19:56:10 +0200 (CEST)",
            "from mail-40133.protonmail.ch (mail-40133.protonmail.ch\n\t[185.70.40.133])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2D30860538\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 May 2023 19:56:09 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1683050170;\n\tbh=04H/DXKI5LlhmPajHoyUUnxN3EAtSN4UWhA3FDBCHXM=;\n\th=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=rHF9eVAy3fxMP3IYpU6jang9wf/7TeotkIXi+hgkDq1W4U6qOKadgPao59ZcfJXOA\n\te8udKvpf9/lU2U5/w6PztBsCcJCo9PDsm147GA1h3yBtdLbNQ933N4h4ZGApzRwjx/\n\t7nmQ7tXoGD9Gsg4eFjK6hz6mk1GZs9iSld5PeBBWMka1vY+3NW4AJRM8IiGS+nDUJZ\n\t3sNMoDRxRHno2TCbmAE6iFL2ErKi6B0rwVeOorsCVeDu+6GhnSfozAGTkFB5n7usFT\n\t9LhQkxrCqQR+F1UBoEDh8pbO/rkixNzL63ZC3SpJ1Jjl1Q+PksZR8fYSbUBz9kJ5fP\n\tv2CwUfQJ//njQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1683050168; x=1683309368;\n\tbh=04H/DXKI5LlhmPajHoyUUnxN3EAtSN4UWhA3FDBCHXM=;\n\th=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date:\n\tSubject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector;\n\tb=AA31HTur5N7HvN13cvrs/PiO3I9Bp9IDk8FdJD1ZLZz2yix75+97zEkuEkVqp26fX\n\tRiJ6B8FrlnCo1ouC4j9Tu86xaJpqQtTbgNIdbMKIdFNd/HbFCxpGQSN+fM3bmh3FO0\n\tHarE/tly5hIeeS2XHEB7a47NyPl/GZXODdiIRqRwmg4Za8SZQluxyyXCoYvj1azeVE\n\tcHodz/hrEs8eODtKI31u0jpB3nI64g08b9ukWbb5uIMC/s+HijFnjXkSd0/+Y4VIJY\n\tA/Q5tZCJBfn3W3seAaxOQrvCuVz0xHMriDHtkJ3aDqAHm86EjfosSdbyAkeW1x7K41\n\tgEw/RQwAvMtOQ=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=protonmail.com\n\theader.i=@protonmail.com\n\theader.b=\"AA31HTur\"; dkim-atps=neutral",
        "Date": "Tue, 02 May 2023 17:55:53 +0000",
        "To": "libcamera-devel@lists.libcamera.org",
        "Message-ID": "<20230502175551.70018-1-pobrn@protonmail.com>",
        "Feedback-ID": "20568564:user:proton",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=utf-8",
        "Content-Transfer-Encoding": "quoted-printable",
        "Subject": "[libcamera-devel] [PATCH v1] qcam: Remove redundant check",
        "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>",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze_via_libcamera-devel?=\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The switch statement checks `roles.size()` with cases for 1 and 2,\nso in the `default` branch, `role.size() > 2`, i.e. it is always\ndifferent from 1, so the check is unnecessary.\n\nSigned-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n---\n src/apps/qcam/main_window.cpp | 7 ++-----\n 1 file changed, 2 insertions(+), 5 deletions(-)\n\n--\n2.40.1",
    "diff": "diff --git a/src/apps/qcam/main_window.cpp b/src/apps/qcam/main_window.cpp\nindex fb2db4aa..680668df 100644\n--- a/src/apps/qcam/main_window.cpp\n+++ b/src/apps/qcam/main_window.cpp\n@@ -381,11 +381,8 @@ int MainWindow::startCapture()\n \t\t}\n \t\tbreak;\n \tdefault:\n-\t\tif (roles.size() != 1) {\n-\t\t\tqWarning() << \"Unsupported stream configuration\";\n-\t\t\treturn -EINVAL;\n-\t\t}\n-\t\tbreak;\n+\t\tqWarning() << \"Unsupported stream configuration\";\n+\t\treturn -EINVAL;\n \t}\n\n \t/* Configure the camera. */\n",
    "prefixes": [
        "libcamera-devel",
        "v1"
    ]
}