qcam: Ensure headers are self-contained

Include the headers corresponding to each compile unit at the very first
line to ensure they are self-contained.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2020-03-23 01:27:33 +02:00
parent 01590c3f78
commit ac02d741dc
3 changed files with 6 additions and 4 deletions

View file

@ -5,12 +5,12 @@
* format_convert.cpp - qcam - Convert buffer to RGB
*/
#include "format_converter.h"
#include <errno.h>
#include <QImage>
#include "format_converter.h"
#define RGBSHIFT 8
#ifndef MAX
#define MAX(a,b) ((a)>(b)?(a):(b))

View file

@ -5,6 +5,8 @@
* main_window.cpp - qcam - Main application window
*/
#include "main_window.h"
#include <iomanip>
#include <iostream>
#include <string>
@ -25,7 +27,6 @@
#include <libcamera/camera_manager.h>
#include <libcamera/version.h>
#include "main_window.h"
#include "viewfinder.h"
using namespace libcamera;

View file

@ -5,13 +5,14 @@
* viewfinder.cpp - qcam - Viewfinder
*/
#include "viewfinder.h"
#include <QImage>
#include <QImageWriter>
#include <QMutexLocker>
#include <QPainter>
#include "format_converter.h"
#include "viewfinder.h"
ViewFinder::ViewFinder(QWidget *parent)
: QWidget(parent), format_(0), width_(0), height_(0), image_(nullptr)