[libcamera-devel] [PATCH] qcam: main_window: Fix include ordering

Kieran Bingham kieran.bingham at ideasonboard.com
Wed Jul 6 11:09:07 CEST 2022


Quoting Laurent Pinchart (2022-07-05 21:30:10)
> On Tue, Jul 05, 2022 at 05:53:10PM +0100, Kieran Bingham via libcamera-devel wrote:
> > Quoting Utkarsh Tiwari (2022-07-05 17:46:40)
> > > On Tue, Jul 05, 2022 at 04:32:48PM +0100, Kieran Bingham via libcamera-devel wrote:
> > > > Fix the sort order of the QT headers to match the expected
> > > > sort from clang-format.
> > > > 
> > > > Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> > > > ---
> > > >  src/qcam/main_window.h | 17 +++++++++--------
> > > >  1 file changed, 9 insertions(+), 8 deletions(-)
> > > > 
> > > > diff --git a/src/qcam/main_window.h b/src/qcam/main_window.h
> > > > index 3fbe872c0b5b..fc70920f990c 100644
> > > > --- a/src/qcam/main_window.h
> > > > +++ b/src/qcam/main_window.h
> > > > @@ -10,14 +10,6 @@
> > > >  #include <memory>
> > > >  #include <vector>
> > > >  
> > > > -#include <QElapsedTimer>
> > > > -#include <QIcon>
> > > > -#include <QMainWindow>
> > > > -#include <QMutex>
> > > > -#include <QObject>
> > > > -#include <QQueue>
> > > > -#include <QTimer>
> > > > -
> > > >  #include <libcamera/camera.h>
> > > >  #include <libcamera/camera_manager.h>
> > > >  #include <libcamera/controls.h>
> > > > @@ -26,7 +18,16 @@
> > > >  #include <libcamera/request.h>
> > > >  #include <libcamera/stream.h>
> > > >  
> > > > +#include <QElapsedTimer>
> > > > +#include <QIcon>
> > > > +#include <QMainWindow>
> > > > +#include <QMutex>
> > > > +#include <QObject>
> > > > +#include <QQueue>
> > > > +#include <QTimer>
> > > > +
> > > >  #include "../cam/stream_options.h"
> > > > +
> > > >  #include "viewfinder.h"
> > > >  
> > > >  class QAction;
> > > > -- 
> > > > 2.34.1
> > > > 
> > > 
> > > This can also include the fix to ordering in main_window.cpp
> > > 
> > > --- a/src/qcam/main_window.cpp
> > > +++ b/src/qcam/main_window.cpp
> > > @@ -30,6 +30,7 @@
> > >  #include <QtDebug>
> > >  
> > >  #include "../cam/image.h"
> > > +
> > >  #include "dng_writer.h"
> > >  #ifndef QT_NO_OPENGL
> > >  #include "viewfinder_gl.h"
> > > 
> > 
> > Aha, that's what I get for sending out an old patch that I had in my
> > tree without 're-working' it.
> > 
> > The cam/image must have come in after I originally made this patch.

aha, this is in the .cpp file not the .h. That's why I didn't see it -
but yes, it's still relevant to update in this patch.

> > 
> > Thanks - I'll update and repost.
> 
> While at it, you can s/QT/Qt/ in the commit message.
> 
> -- 
> Regards,
> 
> Laurent Pinchart


More information about the libcamera-devel mailing list