Show a patch.

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

{
    "id": 2047,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/2047/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/2047/",
    "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": "<20190928152238.23752-6-laurent.pinchart@ideasonboard.com>",
    "date": "2019-09-28T15:22:31",
    "name": "[libcamera-devel,05/12] libcamera: controls: Remove the unused ControlList::update() method",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "4d2b11b44672d6275733b8fa2481cde4a6fa5af2",
    "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/2047/mbox/",
    "series": [
        {
            "id": 511,
            "url": "https://patchwork.libcamera.org/api/1.1/series/511/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=511",
            "date": "2019-09-28T15:22:26",
            "name": "Improve the application-facing controls API",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/511/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/2047/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/2047/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<laurent.pinchart@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BE09760BBA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 28 Sep 2019 17:22:57 +0200 (CEST)",
            "from pendragon.bb.dnainternet.fi\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5D961593\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 28 Sep 2019 17:22:57 +0200 (CEST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1569684177;\n\tbh=PWL7w3Qzlg3me3nqZo+QH5r4wW8kpm8361YLEuzOC4A=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=ZGmIQwZVkLLZX2cUKxr3B2k49G51/XioOkNzkiiceYbtY/pd17Co9HwW6AyxKa6k7\n\t4edTdwfgtiLeUTziQZcajeZi4lFyKIRome/RrDZxsHKRSh6K9xGBcNd6aUzac5mPki\n\t2+6blsIXwY2Z274AJvE4kSYgcmifbjC9zn8zvvcY=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sat, 28 Sep 2019 18:22:31 +0300",
        "Message-Id": "<20190928152238.23752-6-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190928152238.23752-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20190928152238.23752-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 05/12] libcamera: controls: Remove the\n\tunused ControlList::update() method",
        "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>",
        "X-List-Received-Date": "Sat, 28 Sep 2019 15:22:58 -0000"
    },
    "content": "The ControlList::update() method is unused. While it is meant to fulfil\na need of applications, having no user means that it is most probably\nnot correctly designed. Remove the method, we will add it back later if\nneeded.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/controls.h   |  2 --\n src/libcamera/controls.cpp     | 28 ----------------------\n test/controls/control_list.cpp | 43 ----------------------------------\n 3 files changed, 73 deletions(-)",
    "diff": "diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h\nindex 9698bd1dd383..d4a74ada1b6a 100644\n--- a/include/libcamera/controls.h\n+++ b/include/libcamera/controls.h\n@@ -158,8 +158,6 @@ public:\n \t\tval->set<T>(value);\n \t}\n \n-\tvoid update(const ControlList &list);\n-\n private:\n \tconst ControlValue *find(const ControlId &id) const;\n \tControlValue *find(const ControlId &id);\ndiff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp\nindex 8886660b7617..62cb2ff822bb 100644\n--- a/src/libcamera/controls.cpp\n+++ b/src/libcamera/controls.cpp\n@@ -511,32 +511,4 @@ ControlValue *ControlList::find(const ControlId &id)\n \treturn &controls_[&id];\n }\n \n-/**\n- * \\brief Update the list with a union of itself and \\a other\n- * \\param other The other list\n- *\n- * Update the control list to include all values from the \\a other list.\n- * Elements in the list whose control IDs are contained in \\a other are updated\n- * with the value from \\a other. Elements in the \\a other list that have no\n- * corresponding element in the list are added to the list with their value.\n- *\n- * The behaviour is undefined if the two lists refer to different Camera\n- * instances.\n- */\n-void ControlList::update(const ControlList &other)\n-{\n-\tif (other.camera_ != camera_) {\n-\t\tLOG(Controls, Error)\n-\t\t\t<< \"Can't update ControlList from a different camera\";\n-\t\treturn;\n-\t}\n-\n-\tfor (auto it : other) {\n-\t\tconst ControlId *id = it.first;\n-\t\tconst ControlValue &value = it.second;\n-\n-\t\tcontrols_[id] = value;\n-\t}\n-}\n-\n } /* namespace libcamera */\ndiff --git a/test/controls/control_list.cpp b/test/controls/control_list.cpp\nindex 053696814b67..8469ecf09439 100644\n--- a/test/controls/control_list.cpp\n+++ b/test/controls/control_list.cpp\n@@ -141,49 +141,6 @@ protected:\n \t\t\treturn TestFail;\n \t\t}\n \n-\t\t/*\n-\t\t * Test list merging. Create a new list, add two controls with\n-\t\t * one overlapping the existing list, merge the lists and clear\n-\t\t * the old list. Verify that the new list is empty and that the\n-\t\t * new list contains the expected items and values.\n-\t\t */\n-\t\tControlList newList(camera_.get());\n-\n-\t\tnewList.set(controls::Brightness, 128);\n-\t\tnewList.set(controls::Saturation, 255);\n-\t\tnewList.update(list);\n-\n-\t\tlist.clear();\n-\n-\t\tif (list.size() != 0) {\n-\t\t\tcout << \"Old List should contain zero items\" << endl;\n-\t\t\treturn TestFail;\n-\t\t}\n-\n-\t\tif (!list.empty()) {\n-\t\t\tcout << \"Old List should be empty\" << endl;\n-\t\t\treturn TestFail;\n-\t\t}\n-\n-\t\tif (newList.size() != 3) {\n-\t\t\tcout << \"New list has incorrect size\" << endl;\n-\t\t\treturn TestFail;\n-\t\t}\n-\n-\t\tif (!newList.contains(controls::Brightness) ||\n-\t\t    !newList.contains(controls::Contrast) ||\n-\t\t    !newList.contains(controls::Saturation)) {\n-\t\t\tcout << \"New list contains incorrect items\" << endl;\n-\t\t\treturn TestFail;\n-\t\t}\n-\n-\t\tif (newList.get(controls::Brightness) != 10 ||\n-\t\t    newList.get(controls::Contrast) != 20 ||\n-\t\t    newList.get(controls::Saturation) != 255) {\n-\t\t\tcout << \"New list contains incorrect values\" << endl;\n-\t\t\treturn TestFail;\n-\t\t}\n-\n \t\treturn TestPass;\n \t}\n \n",
    "prefixes": [
        "libcamera-devel",
        "05/12"
    ]
}