Message ID | 20200323142205.28342-3-laurent.pinchart@ideasonboard.com |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
Hi Laurent, On 23/03/2020 14:21, Laurent Pinchart wrote: > Include the headers corresponding to each compile unit at the very first > line to ensure they are self-contained. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > src/qcam/format_converter.cpp | 4 ++-- > src/qcam/main_window.cpp | 3 ++- > src/qcam/viewfinder.cpp | 3 ++- > 3 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/src/qcam/format_converter.cpp b/src/qcam/format_converter.cpp > index 483f7c1edfce..d8962a28c06c 100644 > --- a/src/qcam/format_converter.cpp > +++ b/src/qcam/format_converter.cpp > @@ -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)) > diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp > index 6f4f1cd770bd..66aaf40c5d45 100644 > --- a/src/qcam/main_window.cpp > +++ b/src/qcam/main_window.cpp > @@ -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; > diff --git a/src/qcam/viewfinder.cpp b/src/qcam/viewfinder.cpp > index e9d5cc1e014b..f4602f07c5d2 100644 > --- a/src/qcam/viewfinder.cpp > +++ b/src/qcam/viewfinder.cpp > @@ -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) >
diff --git a/src/qcam/format_converter.cpp b/src/qcam/format_converter.cpp index 483f7c1edfce..d8962a28c06c 100644 --- a/src/qcam/format_converter.cpp +++ b/src/qcam/format_converter.cpp @@ -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)) diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp index 6f4f1cd770bd..66aaf40c5d45 100644 --- a/src/qcam/main_window.cpp +++ b/src/qcam/main_window.cpp @@ -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; diff --git a/src/qcam/viewfinder.cpp b/src/qcam/viewfinder.cpp index e9d5cc1e014b..f4602f07c5d2 100644 --- a/src/qcam/viewfinder.cpp +++ b/src/qcam/viewfinder.cpp @@ -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)
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> --- src/qcam/format_converter.cpp | 4 ++-- src/qcam/main_window.cpp | 3 ++- src/qcam/viewfinder.cpp | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-)