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 * format_convert.cpp - qcam - Convert buffer to RGB
*/ */
#include "format_converter.h"
#include <errno.h> #include <errno.h>
#include <QImage> #include <QImage>
#include "format_converter.h"
#define RGBSHIFT 8 #define RGBSHIFT 8
#ifndef MAX #ifndef MAX
#define MAX(a,b) ((a)>(b)?(a):(b)) #define MAX(a,b) ((a)>(b)?(a):(b))

View file

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

View file

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