From patchwork Thu Jul 4 13:03:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 1611 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 864716156E for ; Thu, 4 Jul 2019 15:03:54 +0200 (CEST) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1D4F12AF; Thu, 4 Jul 2019 15:03:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1562245434; bh=9jt9ECg5d8u9WDVYRjR6zfsO3RO9ryAkDlqqRP2IOP4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f88vpU1qzV19UXbtJ5MYhMoZoCf1u3EId16sHkGiYlbEd5kjbAymNV8bVBonpJ9uD 8zXiO5NN+fLf3qxHHw8rksY+Qbh6EHUKHYM7Skvo/TWJx/sH6SiNGy91PWECffH2ar F5beSIyx/eFllBmnS+G7JPU5DTMlRsqxVdWcAyIA= From: Kieran Bingham To: LibCamera Devel Date: Thu, 4 Jul 2019 14:03:46 +0100 Message-Id: <20190704130347.9372-9-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190704130347.9372-1-kieran.bingham@ideasonboard.com> References: <20190704130347.9372-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 4/5] qcam: Add the version string to the title X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 13:03:55 -0000 Provide the version string reported by the libcamera library on the qcam test utility. This helps confirm the exact version of the library that is being used while testing. The version string is stored in the MainWindow so that it can be reused without reconstructing. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/qcam/main_window.cpp | 4 ++++ src/qcam/main_window.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp index 0f737d852960..d61369109d66 100644 --- a/src/qcam/main_window.cpp +++ b/src/qcam/main_window.cpp @@ -14,6 +14,7 @@ #include #include +#include #include "main_window.h" #include "viewfinder.h" @@ -25,6 +26,9 @@ MainWindow::MainWindow(const OptionsParser::Options &options) { int ret; + title_ = "QCam " + QString::fromStdString(libcamera::version); + setWindowTitle(title_); + viewfinder_ = new ViewFinder(this); setCentralWidget(viewfinder_); viewfinder_->setFixedSize(500, 500); diff --git a/src/qcam/main_window.h b/src/qcam/main_window.h index 345bdaaed354..46a494a9d783 100644 --- a/src/qcam/main_window.h +++ b/src/qcam/main_window.h @@ -42,6 +42,7 @@ private: const std::map &buffers); int display(Buffer *buffer); + QString title_; const OptionsParser::Options &options_; std::shared_ptr camera_;