[{"id":2159,"web_url":"https://patchwork.libcamera.org/comment/2159/","msgid":"<20190704134726.GM6569@pendragon.ideasonboard.com>","date":"2019-07-04T13:47:26","subject":"Re: [libcamera-devel] [PATCH v2 4/5] qcam: Add the version string\n\tto the title","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Thu, Jul 04, 2019 at 02:03:46PM +0100, Kieran Bingham wrote:\n> Provide the version string reported by the libcamera library on the qcam\n> test utility.\n> \n> This helps confirm the exact version of the library that is being used\n> while testing.\n> \n> The version string is stored in the MainWindow so that it can be reused\n> without reconstructing.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/qcam/main_window.cpp | 4 ++++\n>  src/qcam/main_window.h   | 1 +\n>  2 files changed, 5 insertions(+)\n> \n> diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp\n> index 0f737d852960..d61369109d66 100644\n> --- a/src/qcam/main_window.cpp\n> +++ b/src/qcam/main_window.cpp\n> @@ -14,6 +14,7 @@\n>  #include <QTimer>\n>  \n>  #include <libcamera/camera_manager.h>\n> +#include <libcamera/version.h>\n>  \n>  #include \"main_window.h\"\n>  #include \"viewfinder.h\"\n> @@ -25,6 +26,9 @@ MainWindow::MainWindow(const OptionsParser::Options &options)\n>  {\n>  \tint ret;\n>  \n> +\ttitle_ = \"QCam \" + QString::fromStdString(libcamera::version);\n> +\tsetWindowTitle(title_);\n> +\n>  \tviewfinder_ = new ViewFinder(this);\n>  \tsetCentralWidget(viewfinder_);\n>  \tviewfinder_->setFixedSize(500, 500);\n> diff --git a/src/qcam/main_window.h b/src/qcam/main_window.h\n> index 345bdaaed354..46a494a9d783 100644\n> --- a/src/qcam/main_window.h\n> +++ b/src/qcam/main_window.h\n> @@ -42,6 +42,7 @@ private:\n>  \t\t\t     const std::map<Stream *, Buffer *> &buffers);\n>  \tint display(Buffer *buffer);\n>  \n> +\tQString title_;\n>  \tconst OptionsParser::Options &options_;\n>  \n>  \tstd::shared_ptr<Camera> camera_;","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 410C96156B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  4 Jul 2019 15:47:47 +0200 (CEST)","from pendragon.ideasonboard.com\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 DAF9424B;\n\tThu,  4 Jul 2019 15:47:46 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1562248067;\n\tbh=mJ26RtM5Ij+tWVW7UTBZkTD8k/+aDRK6CZuTrB8yMkI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=U8SX92hVC4Yus9aK6PmxzInLjCrNiV1MDfezNRTXRmvfMM35b/BcrnYgOGrS2lhWL\n\tbdOOcAJWjYfvJlxlcmSAMo3kjVvqx4uKhLjPnweWF2b8rDH+wAQedFxQs9zcUXaXQI\n\tkTPH/iQbqumvPVs1vo3XhARAhH0xZyi1RCCg5nGg=","Date":"Thu, 4 Jul 2019 16:47:26 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20190704134726.GM6569@pendragon.ideasonboard.com>","References":"<20190704130347.9372-1-kieran.bingham@ideasonboard.com>\n\t<20190704130347.9372-9-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190704130347.9372-9-kieran.bingham@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v2 4/5] qcam: Add the version string\n\tto the title","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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":"Thu, 04 Jul 2019 13:47:47 -0000"}}]