qcam: Add the version string to the title

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.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Kieran Bingham
2019-07-02 12:38:09 +01:00
parent b3ad7b8654
commit 2976dd6a7e
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -14,6 +14,7 @@
#include <QTimer>
#include <libcamera/camera_manager.h>
#include <libcamera/version.h>
#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);
+1
View File
@@ -42,6 +42,7 @@ private:
const std::map<Stream *, Buffer *> &buffers);
int display(Buffer *buffer);
QString title_;
const OptionsParser::Options &options_;
std::shared_ptr<Camera> camera_;